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"]