On Wednesday, July 9, 2014 3:08:58 AM UTC-5, Helmut Rickel wrote:
>
> Hello,
>
> I installed puppet 2.6.17, 3.4.3 and finally 3.6.2 on SLES 11 SP1 or SLES 
> 11 SP3 and always ran in this problem: Puppet is using the wrong catalog on 
> some nodes.
>
> I can run „puppet agent –t“ many times on node A without problems. When I 
> run „puppet agent –t“ on node B and afterwards on node A, puppet uses the 
> catalog of node B for both, node B and node A!
> My final tests where done with these packages on the only master with SLES 
> 11 SP3: 
>
> facter-2.0.0-11.1.x86_64.rpm
> puppet-3.6.2-2.2.x86_64.rpm
> puppet-server-3.6.2-2.2.x86_64.rpm
> ruby-1.8.7.p357-3.7.x86_64.rpm
> ruby-devel-1.8.7.p357-4.1.x86_64.rpm
> rubygem-hiera-1.2.1-21.3.x86_64.rpm
> rubygem-json_pure-1_6-1.6.7-1.19.x86_64.rpm
> rubygem-ruby-shadow-2.2.0-11.4.x86_64.rpm
> rubygems-1.8.15-27.9.x86_64.rpm
>
> Actually, the first 10 characters of the fqdn's are identical. Can this 
> cause the problem?
>
> The clients (SLES 11 SP1) use the same packages. I used „node“ definitions 
> as well as hiera to assign my classes to the nodes. No configurations 
> concerning environments are done.
>
> Thanks in advance for any help on this!
>

How are you determining that node A is getting node B's catalog?  There's a 
subtle but important difference between getting a complete catalog compiled 
for a different node and getting a catalog compiled for the requesting 
node, but unexpectedly influenced by prior compilation of a different 
node's catalog (e.g. including a resource intended only for a different 
node).  You can distinguish by making the agent report on the details 
presented to the master, for instance by putting this at top scope in your 
site.pp:

notify { 'Node ID':
  message => "My certificate identifies me as '${trusted['certname']}'; I 
identify myself as '${::clientcert}', or alternatively as '${::hostname}'"
}


Considering the range of Puppet versions affected, and the fact that this 
is not an issue I recognize, I am inclined to suspect a problem with your 
manifests.

In particular, I am inclined to guess that one or more of your manifests, 
other than site.pp or manifests 'imported' into it, has some top-scope 
declarations that are neither class nor type definitions.  Files do not 
serve as a scope boundary in Puppet, so such declarations apply in 
principle to all nodes.  They are only *seen* if the master has reason to 
parse the files containing them, however, which it may not have for some 
nodes.  Once such declarations *are* seen, however, the master may cache 
them, and apply them to other nodes (as is appropriate).

Example:

modules/site/manifests/alice.pp:
----
class site::alice {
  @user { 'alice': ensure => 'present' }
}

include 'restaurant'
----

The 'include' statement appearing at top scope there is a major problem.  
It may be the author's intent that only nodes that have class 'site::alice' 
get class 'restaurant' as well, but the declaration is at top scope, so 
what it actually says that every node should get 'restaurant'.  Those that 
declare 'site::alice' certainly will get it, but others may or may not get 
it, depending on timing details, cache settings, and the phase of the moon.


John

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/b5606930-6490-4b32-9916-49ae69213b7e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to