On Monday, June 17, 2013 2:12:35 AM UTC-5, Wolf Noble wrote:
>
> Hi JJ,
>
> I've seen this happen when class dependencies are placed outside the
> specific class' scope, ie:
>
> # default.pp
> #
> #
> Anchor['my_prereq::end'] -> Class['default']
> class{ 'default':
> notice 'default'
> }
>
>
It is incorrect to make that relationship declaration (via the chain
operator) if there are any nodes that do not declare the specified anchor,
because top-level declarations in *any* manifest file apply to all nodes.
It is poor practice to make declarations at top level like that other than
class and defined-type definitions, however, except sometimes in site.pp
and manifests 'import'ed by it. When they appear in other places, Puppet
may or may not see them during any given catalog run, but you must not
assume that Puppet will fail to see them under any given circumstances.
Thus, manifest files that are intended to be autoloaded should contain
exactly one thing at top-level: the definition of the class or defined type
that is the autoloading target.
On the other hand, I would be surprised if a top-level dependency
declaration caused a referenced class to be declared when it otherwise was
not declared. That's not an issue in the example because a declaration of
the class involved occurs in the same manifest, at the same level as the
chain, so the class (but not necessarily the anchor) will always be
declared if the relationship is declared. That could point to the actual
problem, though: there may somewhere be just such a top-level declaration
of class 'base::firewall'. Otherwise, it must be that class 'monitoring'
declares class 'base::firewall', either directly or indirectly.
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 [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/puppet-users.
For more options, visit https://groups.google.com/groups/opt_out.