Issue #14343 has been updated by konrad rzentarzewski.

i've found something interesting. resources that fail belong to the classes 
which are inherited. those are the only inherited classes in our env (it was 
commited by a programmer which is no longer here, and the rest of the team use 
"require something::common" instead of "class specific inherits common").

when i changed:

    class primary inherits secondary {
        exec { "load-cluster-conf":
        # ...

to:

    class primary {
        include cluster::secondary
        exec { "load-cluster-conf":
        # ...

and:

        class ibm_ds35xx ($subsystem) inherits ibm_ds_sm_monitoring {
            file { nrpe_ibm_ds35xx:
                content  => template("nagios/nrpe-ibm-ds35xx.erb"),

to:

        class ibm_ds35xx ($subsystem) {
            include ibm_ds_sm_monitoring
            file { nrpe_ibm_ds35xx:
                content  => template("nagios/nrpe-ibm-ds35xx.erb"),

it's no longer failing (good!).

tested with both distribution and enterprise ruby.

yet, you should investigate if you can replicate this problem with class 
inheritance.


----------------------------------------
Bug #14343: undefined method twoscope_lookupvar while looking for top scope or 
facter variables
https://projects.puppetlabs.com/issues/14343#change-62535

Author: konrad rzentarzewski
Status: Needs More Information
Priority: Normal
Assignee: Andrew  Parker
Category: compiler
Target version: 
Affected Puppet version: 2.7.14
Keywords: 
Branch: 


with upgrade to 2.7.14 comes the following error from puppetmasters:

    err: Could not retrieve catalog from remote server: Error 400 on SERVER: 
Puppet::Parser::AST::Variable failed with error NoMethodError: undefined method 
`twoscope_lookupvar' for nil:NilClass at 
/etc/puppet/site/modules/[...]/init.pp:2863 on node [...]

referenced module code is just a top scope or facter variable lookup, ie.

    exec { "load-cluster-conf": command => "cman_tool version -r 
$clusterversion" }

it seems that twoscope_lookupvar is not visible in puppet classes.

the following patch fixes this behaviour.


-- 
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 puppet-bugs@googlegroups.com.
To unsubscribe from this group, send email to 
puppet-bugs+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-bugs?hl=en.

Reply via email to