Bug #5209

Negative timeout config value causes errors

Added by Tomáš Strachota over 3 years ago. Updated over 3 years ago.

Status:Closed
Priority:Normal
Assigned To:Tomáš Strachota
Category:Foreman commands
Target version:Foreman - Sprint 23
Difficulty: Bugzilla link:
Found in release: Pull request:
Story points-
Velocity based estimate-

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.

Associated revisions

Revision 337cba41
Added by Tomas Strachota over 3 years ago

FIxes #5209 - negative timeout config value causes errors

Revision 8b0c2294
Added by Tomas Strachota over 3 years ago

Merge pull request #113 from tstrachota/timeout_docs

FIxes #5209 - negative timeout config value causes errors

Revision e89ff889
Added by Tomas Strachota over 3 years ago

Fixes #5209 - setting infinite timeouts

Revision f18c41cd
Added by Tomas Strachota over 3 years ago

Merge pull request #114 from tstrachota/timeout_docs

Fixes #5209 - setting infinite timeouts

History

#1 Updated by Tomáš Strachota over 3 years ago

  • Status changed from New to Ready For Testing
  • Assigned To set to Tomáš Strachota
  • Target version set to Sprint 22

#2 Updated by Dmitri Dolguikh over 3 years ago

  • Target version changed from Sprint 22 to Sprint 23

#3 Updated by Dmitri Dolguikh over 3 years ago

  • Target version changed from Sprint 23 to Sprint 22

#4 Updated by Dmitri Dolguikh over 3 years ago

  • Target version changed from Sprint 22 to Sprint 23

#5 Updated by Anonymous over 3 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100

Applied in changeset hammer-cli-foreman|commit:337cba41bbb5c6472bf1c557367deff48d2da589.

#6 Updated by Tomáš Strachota over 3 years ago

  • Status changed from Closed to Ready For Testing

Re-opening as I found some issues with different versions of rest-client:
https://github.com/theforeman/hammer-cli-foreman/pull/114

#7 Updated by Anonymous over 3 years ago

  • Status changed from Ready For Testing to Closed

Applied in changeset hammer-cli-foreman|commit:e89ff88932a1ff37bf436b36175fbaa35ea7f2d0.

Also available in: Atom PDF