Issue #3758 has been updated by Andrew  Parker.

Status changed from Accepted to Closed

This is unfortunately the outcome of the beast of inheritance as it is defined 
in the puppet language. We haven't been able to figure out reasonable semantics 
for variable lookup and includes in an inheritance hierarchy and so unless we 
want to get rid of inheritance (which is unneeded since defined types and 
parameterized classes were added) then there is nothing we can do.
----------------------------------------
Bug #3758: node inheritance locks scope
https://projects.puppetlabs.com/issues/3758#change-64595

Author: Kjetil Torgrim Homme
Status: Closed
Priority: Normal
Assignee: 
Category: parser
Target version: 
Affected Puppet version: 0.25.4
Keywords: 
Branch: 


when a resource is defined via a class included in a parent node, the scope 
seems to get fixed, and later overrides will not use the most recent scope.

 class foo {
    file { "/tmp/blub": }
 }
 class foo::overrides inherits foo {
    File["/tmp/blub"] {
        source => "puppet:///foo.$var"
    }
 }
 node base_node {
    include foo
 }
 node 'feh' inherits base_node {
    $var = "testing"
    include foo::overrides
 }

"feh" is the name of my workstation.  when I run the above code, it complains 
about the file "foo." missing.  if I move "include foo" into the feh node, I 
get the expected error about "foo.testing" missing.  setting $var in base_node 
before "include foo" also works.



-- 
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.

Reply via email to