Issue #5447 has been updated by Nick Fagerlund. Status changed from Re-opened to Duplicate
Haha, this bug is a mess. Okay, lemme break it down: * The original bug is a variant of #5046 -- the "inherits" keyword DECLARES the base class, which means if you use the resource-like syntax to declare the class again, it'll blow up. This issue is still outstanding, and may never be fixed for the resource-like class decl. syntax -- our solution for 3.x is that class parameter values should come from Hiera, outside the puppet manifests. * Halfway through the thread, people started talking about a variant of #10146, where we broke variable interpolation in strings with hyphens partway through the 2.7.x series. This issue is now fixed. If you are seeing "duplicate definition: Class[...", you need to be following #5046. If you are seeing "duplicate definition: Exec[..." or anything else besides "Class[", you need to upgrade to the most recent 2.7.x release. I am closing this issue as a duplicate of both of those. ---------------------------------------- Bug #5447: Fix duplicate definition error https://projects.puppetlabs.com/issues/5447#change-68737 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.
