Project

General

Profile

Actions

Bug #5209

closed

Negative timeout config value causes errors

Added by Tomáš Strachota over 10 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Normal
Category:
Foreman commands (obsolete)
Target version:
Difficulty:
Triaged:
Team Backlog:
Fixed in Releases:
Found in Releases:
In Kanboard:

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

Also available in: Atom PDF