Bug #14422
closed"POST /run HTTP/1.1" 500 34 - Run Puppet - Even though it works
Description
I am getting "POST /run HTTP/1.1" 500 34 randomly on any hosts, while attempting to Run Puppet.
Foreman will come back with:
D, [2016-03-31T09:59:45.459268 #22768] DEBUG -- : about to execute: /usr/bin/sudo /usr/bin/mco puppet runonce I battlecrusier : Non-null exit code when executing '/usr/bin/sudo/usr/bin/mcopuppetrunonce-Ibattlecrusier'
W, [2016-03-31T09:59:45.945085 #22768] WARN -
E, [2016-03-31T09:59:45.945938 #22768] ERROR -- : Failed puppet run: Check Log files
172.22.129.101 - - [31/Mar/2016 09:59:45] "POST /run HTTP/1.1" 500 34 0.4973
Yet, it WILL actually run Puppet, as proven by the production.log or watching the logs on the host.
I am on a old version of Foreman (1.6.1) and see there are now settings of:
puppetrun_wait
and proxy_request_timeout
Were these created for the issue I am seeing? It seems like Foreman has no idea that the mco puppet runonce command worked, and returns a failure.
Other times it works. Sometimes it will fail once and if you immediately click Run Puppet again, everyone is happy.
Updated by Dominic Cleal about 8 years ago
- Project changed from Foreman to Smart Proxy
- Category changed from Puppet integration to Puppet
- Status changed from New to Feedback
The error message "Failed puppet run: Check Log files" indicates the external "mco" command failed, probably with a non-zero exit code. Modern versions should log more information in this regard.
Updated by Jeff Sparrow about 8 years ago
Thats where my loss is. The fact it doesnt fail. I have seen this error with and without mcollective returning a non-zero exit code.
I have re-enabled mcollective debugging for now.
Are you saying newer versions of Foreman return better results on run puppet failures? I've always wanted that. Specifically when selecting multiple hosts, where it fails on only one of them, but shows just a general overall failure.
I plan on updating Foreman soon, so hopefully the newer versions will shed more light. Wish there was something I could check to further troubleshoot this though..
Updated by Jeff Sparrow about 8 years ago
I lied. Come to think of it, you're right, it does always return the non-zero exit code from mcollective. Heres hoping to mcollective debug showing me more.
Updated by Dominic Cleal about 8 years ago
- Status changed from Feedback to Rejected
Are you saying newer versions of Foreman return better results on run puppet failures? I've always wanted that. Specifically when selecting multiple hosts, where it fails on only one of them, but shows just a general overall failure.
No, I don't think that's the case. The smart proxy has more logging showing the non-zero exit code.