Issue #14343 has been updated by konrad rzentarzewski.

do you have any comments on specific context that may cause lookupvar to fail?
we're using quite big manifests and nearly every module uses variables in pp's 
and erb's, so i can't really say why is it failing in those specific snippets.

in isolated environment i can't reproduce it either, with dist or REE ruby, so 
i don't think this is REE fault...

    <1>root@punch(18)~$ /usr/local/bin/ruby /usr/bin/puppet apply t.pp
    notice: command[check_ibm_ds35xx]=/usr/local/bin/check_ds35xx.pl -n 
asdkhfdfdffg
    notice: 
/Stage[main]//Notify[command[check_ibm_ds35xx]=/usr/local/bin/check_ds35xx.pl 
-n asdkhfdfdffg]/message: defined 'message' as 
'command[check_ibm_ds35xx]=/usr/local/bin/check_ds35xx.pl -n asdkhfdfdffg'
    notice: /Stage[main]//Exec[test]/returns: 1
    notice: /Stage[main]//Exec[test]/returns: executed successfully
    notice: Finished catalog run in 0.41 seconds
    <1>root@punch(19)~$ /usr/bin/ruby /usr/bin/puppet apply t.pp
    notice: command[check_ibm_ds35xx]=/usr/local/bin/check_ds35xx.pl -n 
asdkhfdfdffg
    notice: 
/Stage[main]//Notify[command[check_ibm_ds35xx]=/usr/local/bin/check_ds35xx.pl 
-n asdkhfdfdffg]/message: defined 'message' as 
'command[check_ibm_ds35xx]=/usr/local/bin/check_ds35xx.pl -n asdkhfdfdffg'
    notice: /Stage[main]//Exec[test]/returns: 1
    notice: /Stage[main]//Exec[test]/returns: executed successfully
    notice: Finished catalog run in 0.50 seconds
    <2>root@punch(20)~$ cat t.pp
    $clusterversion = 1
    exec { "test": command => "/bin/echo $clusterversion", logoutput => true }
    $ibm_ds_storagesubsystem_name = 'asdkhfdfdffg'
    $x = 
inline_template('command[check_ibm_ds35xx]=/usr/local/bin/check_ds35xx.pl -n 
<%= ibm_ds_storagesubsystem_name %>')
    notify { "$x": }
    
----------------------------------------
Bug #14343: undefined method twoscope_lookupvar while looking for top scope or 
facter variables
https://projects.puppetlabs.com/issues/14343#change-62534

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