Bug #10420
closedUsing Run Puppet button fails on Foreman 1.8.0
Description
Clicking the Run Puppet button on a single host returns: ERF12-4252 [ProxyAPI::ProxyException]: Unable to execute Puppet run ([RestClient::InternalServerError]: 500 Internal Server Error)
This is because it is trying to execute the mcollective puppet run with no host in the "-I" option, and produced the following error in /var/log/foreman-proxy/proxy.log
D, [2015-05-07T04:20:46.563412 #21204] DEBUG -- : about to execute: /usr/bin/sudo u root /usr/bin/mco puppet runonce -I ''
W, [2015-05-07T04:21:28.061875 #21204] WARN - : Non-null exit code when executing '/usr/bin/sudo-uroot/usr/bin/mcopuppetrunonce-I'''
E, [2015-05-07T04:21:28.064903 #21204] ERROR -- : Failed puppet run: Check Log files
10.246.80.119 - - [07/May/2015 04:21:28] "POST /run HTTP/1.1" 500 34 41.5272
We were able to apply a patch to restore functionality to the Run Puppet button. The code change can be found below:
/app/models/host/managed.rb Line 567
#ProxyAPI::Puppet.new({:url => puppet_proxy.url}).run fqdn
ProxyAPI::Puppet.new({:url => puppet_proxy.url}).run facts["fqdn"]
Updated by Ryan Sabatini over 9 years ago
- Related to Bug #10403: Smart Class Parameter Overrides using the FQDN fact as a match no longer applies the override added
Updated by Ryan Sabatini over 9 years ago
- Related to Bug #10307: Editing a host with "unattended: false" set in settings.yaml results in error. added
Updated by Ryan Sabatini over 9 years ago
I mistyped on the title. It should say "Run Puppet button fails in Foreman 1.8.0"
Updated by Dominic Cleal over 9 years ago
- Subject changed from Using Run Puppet version fails on Foreman 1.8.0 to Using Run Puppet button fails on Foreman 1.8.0
- Category set to Puppet integration
- Translation missing: en.field_release set to 50
Dependent on #10403, as it's due to a faulty 'fqdn'.
Updated by Dominic Cleal over 9 years ago
- Status changed from New to Ready For Testing
- Assignee set to Dominic Cleal
Updated by Dominic Cleal over 9 years ago
- Status changed from Ready For Testing to Closed
Should be fixed for 1.8.1 now, as #10403 ensures FQDNs are fully set up.