Issue #8174 has been updated by Andrew  Parker.

Turns out that this only happens if there is a node definition in addition to 
the enc. 

An enc:

    #!/usr/bin/env sh

    cat <<END
    ---
    classes:
      a
    parameters:
      enc_var: "Set from ENC."
    END
    exit 0

manifests/site.pp

    $top_scope = "set from site.pp"
    node default {}

modules/a/manifests/init.pp

    class a {
      $locally = "locally declared"
      notify { "fqdn from facts": message => $fqdn }
      notify { "locally declared var": message => $locally }
      notify { "var via enc": message => $enc_var }
      notify { "declared top scope": message => $top_scope }
    }

This causes the following warnings to appear on the master:

    warning: Dynamic lookup of $fqdn at 
/Users/andy/work/test/conf/master/modules/a/manifests/init.pp:3 is deprecated.  
Support will be removed in Puppet 2.8.  Use a fully-qualified variable name 
(e.g., $classname::variable) or parameterized classes.
    warning: Dynamic lookup of $enc_var at 
/Users/andy/work/test/conf/master/modules/a/manifests/init.pp:5 is deprecated.  
Support will be removed in Puppet 2.8.  Use a fully-qualified variable name 
(e.g., $classname::variable) or parameterized classes.
    warning: Dynamic lookup of $top_scope at 
/Users/andy/work/test/conf/master/modules/a/manifests/init.pp:6 is deprecated.  
Support will be removed in Puppet 2.8.  Use a fully-qualified variable name 
(e.g., $classname::variable) or parameterized classes.

If the `node default {}` line is removed from site.pp then none of these 
warnings are produced.
----------------------------------------
Bug #8174: External Node Classifer makes puppet think Facter variables are 
dynamic lookup issues
https://projects.puppetlabs.com/issues/8174#change-60100

Author: Chuck Schweizer
Status: Accepted
Priority: Normal
Assignee: Andrew  Parker
Category: 
Target version: 
Affected Puppet version: 2.7.1
Keywords: 
Branch: 


I have found that if your class is part of the External Node Classifier 
definition puppet 2.7.1 thinks variables from Facter are dynamic lookups.

EG.

External config

    ---
    classes:
    - hadoop
    environment: production
    parameters:
      puppetmaster: puppet
    


Dynamic lookup of $operatingsystem at 
/var/opt/puppet/environments/production/modules/hadoop/manifests/base.pp:53 is 
deprecated.  Support will be removed in Puppet 2.8.  Use a fully-qualified 
variable name (e.g., $classname::variable) or parameterized classes.


$ facter operatingsystem
RedHat



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