Issue #3758 has been updated by Jeff Weiss.

The problem as reported still does not work.

When moving the include of foo into the specific node, then apply complains 
about the deprecation of dynamic lookup and suggests using parameterized 
classes.

Altering to use parameterized classes, yields to expected behaviour.


    class foo {
    file { "/tmp/blub": }
    }
    class foo::overrides ($var) inherits foo {
    File["/tmp/blub"] {
    source => "/tmp/foo.$var"
    }
    }
    node base_node {
    include foo
    }
    node 'macbook-pro' inherits base_node {
    class {'foo::overrides':
    var => 'testing',
    }
    }
    
----------------------------------------
Bug #3758: node inheritance locks scope
https://projects.puppetlabs.com/issues/3758

Author: Kjetil Torgrim Homme
Status: Unreviewed
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