Project

General

Profile

Actions

Bug #15539

open

ENC node.rb fails to return cached yaml when server is unreachable

Added by Greg Koch about 8 years ago. Updated about 7 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

When the Foreman server is down/unreachable the node.rb ENC script will return 1 with an error message of

Error retrieving node da1haln01pe.stsky.biz: Net::HTTPServiceUnavailable
Check Foreman's /var/log/foreman/production.log for more information.

Adding "RuntimeError" to the list of rescues on line 347 fixes the issue.

rescue TimeoutError, SocketError, Errno::EHOSTUNREACH, Errno::ECONNREFUSED, RuntimeError

This is the version of node.rb I am using: https://github.com/theforeman/puppet-foreman/blob/master/files/external_node_v2.rb

Actions

Also available in: Atom PDF