You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Assignee: (none)
Status: Closed (closed on 2016-12-28 12:38:39 +00:00)
Target Version: v0.7.1
Last Update: 2016-12-28 12:38:39 +00:00 (in Redmine)
A Puppet master that is also monitored by Icinga using the puppet-icinga2-rewrite module breaks badly when the facts from icinga2_puppet.rb are loaded. This is caused by calling the private method Puppet.settings.preferred_run_mode= :agent.
Running Puppet 3.8.7 on both master and agent nodes.
Observe the Puppet agent run on an affected Puppet master:
root@puppet01 [~] # puppet agent -t
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Loading facts
Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Permission denied - /var/lib/puppet/client_yaml/facts
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run
root@puppet01 [~] # puppet agent -t
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Loading facts
Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Could not autoload puppet/indirector/catalog/active_record: uninitialized constant ActiveRecord
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run
Puppet agents running against that Puppet master won't work either because the Puppet master cannot compile catalogs any more.
This issue has been migrated from Redmine: https://dev.icinga.com/issues/13701
Created by antaflos on 2016-12-20 12:31:59 +00:00
Assignee: (none)
Status: Closed (closed on 2016-12-28 12:38:39 +00:00)
Target Version: v0.7.1
Last Update: 2016-12-28 12:38:39 +00:00 (in Redmine)
A Puppet master that is also monitored by Icinga using the puppet-icinga2-rewrite module breaks badly when the facts from
icinga2_puppet.rb
are loaded. This is caused by calling the private methodPuppet.settings.preferred_run_mode= :agent
.Running Puppet 3.8.7 on both master and agent nodes.
Observe the Puppet agent run on an affected Puppet master:
Puppet agents running against that Puppet master won't work either because the Puppet master cannot compile catalogs any more.
As documented in https://github.com/puppetlabs/puppet/blob/master/lib/puppet/settings.rb#L507-L512 the
preferred_run_mode
method is private and should never be called externally.The problem is easily fixed by removing the problematic line from
icinga2_puppet.rb
and requiringpuppet
instead offacter
. See the puppetlabs-puppet_agent module for reference. It also provides Puppet settings as facts, and does so without calling private methods: https://github.com/puppetlabs/puppetlabs-puppet\_agent/blob/master/lib/facter/settings.rbI have created a pull request in #29 to fix this.
The text was updated successfully, but these errors were encountered: