Project

General

Profile

Bug #10420

Using Run Puppet button fails on Foreman 1.8.0

Added by Ryan Sabatini over 6 years ago. Updated about 3 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Puppet integration
Target version:
Difficulty:
Triaged:
Bugzilla link:
Pull request:
Fixed in Releases:
Found in Releases:

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


Related issues

Related to Foreman - Bug #10403: Smart Class Parameter Overrides using the FQDN fact as a match no longer applies the overrideClosed2015-05-06
Related to Foreman - Bug #10307: Editing a host with "unattended: false" set in settings.yaml results in error.Closed2015-04-29

History

#1 Updated by Ryan Sabatini over 6 years ago

  • Related to Bug #10403: Smart Class Parameter Overrides using the FQDN fact as a match no longer applies the override added

#2 Updated by Ryan Sabatini over 6 years ago

  • Related to Bug #10307: Editing a host with "unattended: false" set in settings.yaml results in error. added

#3 Updated by Ryan Sabatini over 6 years ago

I mistyped on the title. It should say "Run Puppet button fails in Foreman 1.8.0"

#4 Updated by Dominic Cleal over 6 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
  • Legacy Backlogs Release (now unused) set to 50

Dependent on #10403, as it's due to a faulty 'fqdn'.

#5 Updated by Dominic Cleal over 6 years ago

  • Status changed from New to Ready For Testing
  • Assignee set to Dominic Cleal

#6 Updated by Dominic Cleal over 6 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.

Also available in: Atom PDF