The Puppet Labs Issue Tracker has Moved: https://tickets.puppetlabs.com

This issue tracker is now in read-only archive mode and automatic ticket export has been disabled. Redmine users will need to create a new JIRA account to file tickets using https://tickets.puppetlabs.com. See the following page for information on filing tickets with JIRA:

Bug #16698

external node classifier script is not being called when storedconfigs is on

Added by Chris Mague over 3 years ago. Updated over 3 years ago.

Status:ClosedStart date:10/02/2012
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:-
Target version:3.0.1
Affected Puppet version:3.0.0 Branch:https://github.com/puppetlabs/puppet/pull/1220
Keywords:

We've Moved!

Ticket tracking is now hosted in JIRA: https://tickets.puppetlabs.com


Description

$ ruby -v
ruby 1.8.7 (2011-06-30 patchlevel 352) [x86_64-linux]

$ puppet --version
3.0.0 (installed via gem)

puppet.conf

[master]
node_terminus  = exec
external_nodes = /usr/share/puppet-dashboard/bin/external_node

in puppet-3.0.0/lib/puppet/indirector.rb added the following lines:

38 Puppet.warning "DTM: making sure in indirector #{ Puppet[:external_nodes] } is called"
39 Puppet.warning "DTM: making sure in indirector #{ Puppet[:node_terminus] } trying termnius is called"

These show up in the puppet logs that the values are correctly established

Oct  2 18:50:19 puppet puppet-master[16541]: DTM: making sure in indirector /usr/share/puppet-dashboard/bin/external_node is called
Oct  2 18:50:19 puppet puppet-master[16541]: DTM: making sure in indirector exec trying termnius is called

in puppet-3.0.0/lib/puppet/indirector/node/exec.rb

12 Puppet.warning “DTM: making sure #{ Puppet[:external_nodes] } is called”

That message is not showing up in the logs and the external node classifier script is not getting called.

examplerun.log - output from a debug run (35.5 KB) Chris Mague, 10/02/2012 01:24 pm

storedconfig_off.log - successful run with store configs off (56.5 KB) Chris Mague, 10/02/2012 05:02 pm

facter.txt Magnifier - facter os level information (2.3 KB) Chris Mague, 10/02/2012 05:02 pm


Related issues

Related to Puppet - Bug #3910: Server is not authoritative over client environment when ... Closed
Related to Puppet - Bug #16753: Need the ability to list all nodes Closed 10/03/2012

History

#1 Updated by Patrick Carlisle over 3 years ago

  • Description updated (diff)

#2 Updated by eric sorenson over 3 years ago

Augh, I tried several ways to reproduce this and couldn’t: I got execution of the node script each time, and introducing deliberate errors into the script resulted in the expected behaviour.

Will do a fresh gem install next.

#3 Updated by Chris Mague over 3 years ago

Ran the following:

$/usr/local/bin/puppet master —no-daemonize —debug —confdir /etc/puppet —node_terminus exec —external_nodes /usr/share/puppet-dashboard/bin/external_node 2>&1 |tee /tmp/examplerun.log

The example log is attached

#4 Updated by Chris Mague over 3 years ago

There is some strange interaction with store configs. When I turn off stored configs the external node classifier gets called. Toggled it a few times to make sure.

see storedconfig_off.log

I turned stored configs off and ran and they execute was run:

 Debug: Executing '/usr/share/puppet-dashboard/bin/external_node giedi02.moovweb.net'

#5 Updated by eric sorenson over 3 years ago

  • Subject changed from external node classifier script is not being called to external node classifier script is not being called when storedconfigs is on
  • Target version set to 3.0.1

#6 Updated by eric sorenson over 3 years ago

  • Assignee set to Anonymous

#7 Updated by Anonymous over 3 years ago

  • Status changed from Unreviewed to Investigating

#8 Updated by Anonymous over 3 years ago

This seems to be caused by the storedconfigs setting the cache_terminus of the node indirection. When there is an entry for the node in the storedconfigs, then it will use that instead of calling the enc.

A bisect took me to https://github.com/puppetlabs/puppet/commit/d936ddf5c84cc71491628352174df7102a8a4e78

#9 Updated by Anonymous over 3 years ago

Another update on this.

The previous commit that I called out (d936ddf) is where the enc started being overridden by the stored node from the storedconfigs. However, the parent of that commit showed another problem, which is that the storedconfigs had been broken for a while. That commit simply made a change that caused them to turn back on.

After bisecting to find out where the storedconfigs stopped being configured correctly, I discovered https://github.com/puppetlabs/puppet/commit/cb3ce74744f842b0ec9fc69c39caa35a413f8e11, which is some work around option parsing.

Commit cb3 caused stored configs to stop turning on, however at that point and before the enc still worked. Commit d93 caused stored configs to start turning on again, but after that the enc no longer worked. So something in those changes modified the way that storedconfigs are being initialized.

#10 Updated by Nick Fagerlund over 3 years ago

So this is only for direct DB storeconfigs, right, since PuppetDB doesn’t store node objects?

#11 Updated by Anonymous over 3 years ago

Nick, I haven’t checked a setup with PuppetDB, so I can’t say. It probably depends on what exactly is going wrong.

#12 Updated by Anonymous over 3 years ago

Here is what happened:

Removing the store_configs.rb and no longer setting that in the defaults.rb hook seems to solve the problem.

#13 Updated by Anonymous over 3 years ago

  • Status changed from Investigating to In Topic Branch Pending Review
  • Branch set to https://github.com/puppetlabs/puppet/pull/1220

https://github.com/puppetlabs/puppet/pull/1220

#14 Updated by Anonymous over 3 years ago

After reviewing with Josh Cooper, we came to the decision that not setting the Puppet::Node cache_terminus is safe and will resolve this. However we decided to leave the code for the store configs (and active record) node implementation even though puppet will use it. This is because we felt that although puppet may not use it, there is a possibility that it is being used by other systems that have used puppet as a library. We also made the decision to not deprecate the store configs implementation of Puppet::Node since it keeps it consistent that with all of the other things that have store configs.

Not deprecating the store configs for nodes may turn out to be the wrong decision, but only time will tell.

#15 Updated by Josh Cooper over 3 years ago

  • Status changed from In Topic Branch Pending Review to Merged - Pending Release

#16 Updated by Matthaus Owens over 3 years ago

  • Status changed from Merged - Pending Release to Closed

Released in Puppet 3.0.1-rc1

Also available in: Atom PDF