Actions
Bug #5209
closedNegative timeout config value causes errors
Status:
Closed
Priority:
Normal
Assignee:
Category:
Foreman commands (obsolete)
Target version:
Description
Our example config file advises to use -1 for infinite timeouts.
https://github.com/theforeman/hammer-cli-foreman/blob/master/config/foreman.yml#L10
This can cause "time interval must be positive (ArgumentError)" exception on some ruby versions.
According to the docs the solution seems to be using 0 instead of -1.
http://ruby-doc.org/stdlib-1.9.3/libdoc/timeout/rdoc/Timeout.html#method-c-timeout
We should change our sample config and check values < 0 before the timeout is set.
Actions