threefoldtecharchive / 0-templates

0-robot templates
Apache License 2.0
1 stars 1 forks source link

set `timeout` for all wait(die=True) calls #216

Closed 0xIslamTaha closed 5 years ago

0xIslamTaha commented 5 years ago

Description As I can see we call wait(die=True) lots of time in all templates specially s3 and s3_redundant and in some cases, the action is hanging forever cause it uses die=True without any timeout conditions. I suggest setting timeout=BIG_VALUE to make sure that we r not hanging forever.

serboctor commented 5 years ago

@zaibon wouldnt it make more sense to add an appropriate default timeout in 0-robot and only increase/decrease it in certain actions whenever needed?

zaibon commented 5 years ago

yeah but the problem is what is an appropriate timeout ? Cause we have action that can take 1s like 15 minutes. but yeah we should have a default timeout so we never get stuck forever

zaibon commented 5 years ago

Since https://github.com/threefoldtech/0-robot/issues/51 task can be canceled when someone is waiting on them with a timeout. That can prevent any dead lock