Issue #5447 has been updated by Eric Pratt.
Relocating the 'system::yumrepos' section to the top of the manifest seems to
fix the problem, but it only makes the error go away. It actually introduces
another problem. The $dell_repo_enabled and $clusterlabs_repo_enabled
variables do not get set before the call to system::yumrepos happens unless
system::yumrepos is defined after them. With system::yumrepos at the top of
the manifest I insert these notifies into the init.pp manifest:
<pre>
notify {"init.pp - cluster = $cluster": }
notify {"init.pp - clusterlabs_repo_enabled = $clusterlabs_repo_enabled": }
</pre>
Running with these in place results in this output:
<pre>
notice: init.pp - cluster = true
notice: /Stage[main]/System/Notify[init.pp - cluster = true]/message: defined
'message' as 'init.pp - cluster = true'
notice: init.pp - clusterlabs_repo_enabled =
notice: /Stage[main]/System/Notify[init.pp - clusterlabs_repo_enabled =
]/message: defined 'message' as 'init.pp - clusterlabs_repo_enabled = '
</pre>
This means I am actually stuck on this issue. The variables default to 'false'
in the system::yumrepos class so this doesn't break the manifests for
non-clustered hosts. But clustered hosts end up getting a boolean 'false'.
While the rest of their catalogs run just fine they do not receive the packages
they need for clustering.
----------------------------------------
Bug #5447: Fix duplicate definition error
https://projects.puppetlabs.com/issues/5447#change-65553
Author: Matt Robinson
Status: Duplicate
Priority: Normal
Assignee: James Turnbull
Category: parser
Target version:
Affected Puppet version: 2.7.6
Keywords: parameterized_classes
Branch:
Jos Boumans reported a manifest that results in the following error:
Duplicate definition: Class[Kbase] is already defined; cannot redefine at
/Users/matthewrobinson/work/puppet/4792:5 on node mattmac.puppetlabs.lan
He thought this was related to ticket 4792 and thus reopened it, but it appears
to be a separate issue. He posted his full set of manifests on that ticket,
but we reduced that to a much smaller manifest that reproduces the problem:
<pre>
class { "s_riak": }
class s_riak inherits kbase { }
class { "kbase": }
class kbase { }
</pre>
Note that no external node classification or anything fancy was involved, you
should be able to reproduce the error on this manifest by simply running it
through puppet apply.
--
You have received this notification because you have either subscribed to it,
or are involved in it.
To change your notification preferences, please click here:
http://projects.puppetlabs.com/my/account
--
You received this message because you are subscribed to the Google Groups
"Puppet Bugs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/puppet-bugs?hl=en.