Issue #11412 has been updated by Oliver Hookins.
This seems to be a bit more complicated than just class inheritance. Since effectively the node retrieved from the ENC script will 'inherit' the default node defined statically we get into territory where both class and node inheritance are battling. I've always been told that this is an area known to give undefined results and it was not going to be fixed (in lieu of providing better support on both sides of the static nodes and ENC features but not in the middle ground). Please correct me if I'm wrong. ---------------------------------------- Bug #11412: Addidtional inherited classes loaded by an external node script don't overwrite parameters correctly https://projects.puppetlabs.com/issues/11412 Author: Andreas Zuber Status: Accepted Priority: Normal Assignee: Category: class inheritance Target version: Affected Puppet version: 2.7.6 Keywords: Branch: This is the code to reproduce the bug: **foo.pp** <pre> define speak ($say) { notice("$say") } class foo { speak{'one': say => "screwed up" } } class foo::bar inherits foo { Speak['one']{ say => "hello"} speak{'two': say => "world"} } node 'default' { include foo } </pre> **foo_node.sh** <pre> #!/bin/sh echo -e "classes: [\"foo::bar\"]\nparameters: {}\n" </pre> The expected output is of course a notice "hello" followed by a notice "world". But what actually happens is this: <pre> $ puppet apply --node_terminus=exec --external_nodes=$HOME/tmp/foo_node.sh foo.pp notice: Scope(Speak[one]): screwed up notice: Scope(Speak[two]): world notice: Finished catalog run in 0.04 seconds </pre> As you can see puppet loads the class "foo::bar" otherwise there would be no "world" in the output. But it does not modify the inherited resource "Speak[one]". If I include "foo::bar" from the default node <pre> node 'default' { include foo include foo::bar } </pre> then I get the expected result: <pre> $ puppet apply foo.pp notice: Scope(Speak[one]): hello notice: Scope(Speak[two]): world notice: Finished catalog run in 0.04 seconds </pre> This was tested with the puppet versions 2.7.6 as well as 2.6.4 -- 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.
