theforeman/puppet-foreman — pull request #166 by domcleal (2014-03-10 14:28:41+00:00)
Title: Improve response when server-side Foreman errors occurs

No longer parse YAML in "ensure" block (which included) errors, now only when
--no-environment is used. Add pointer to Foreman's production.log.

Previously:

# puppet agent -t
Warning: Unable to fetch my node definition, but the agent run will continue:
Warning: Error 400 on SERVER: Failed to find foreman.example.com via exec: Execution of '/etc/puppet/node.rb foreman.example.com' returned 1: --- false

Info: Retrieving plugin
Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Failed when searching for node foreman.example.com: Failed to find foreman.example.com via exec: Execution of '/etc/puppet/node.rb foreman.example.com' returned 1: --- false

Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run

Now:

# puppet agent -t
Warning: Unable to fetch my node definition, but the agent run will continue:
Warning: Error 400 on SERVER: Failed to find foreman.example.com via exec: Execution of '/etc/puppet/node.rb foreman.example.com' returned 1: Error retrieving node foreman.example.com: Net::HTTPForbidden
Check Foreman's /var/log/foreman/production.log for more information.

Info: Retrieving plugin
Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Failed when searching for node foreman.example.com: Failed to find foreman.example.com via exec: Execution of '/etc/puppet/node.rb foreman.example.com' returned 1: Error retrieving node foreman.example.com: Net::HTTPForbidden
Check Foreman's /var/log/foreman/production.log for more information.

Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run