Issue #8174 has been updated by Chuck Schweizer.

I was able to replicate my issue with the following setup.  This setup is just 
using the built in webrick running puppetmasterd as a service on RHEL 5.  

In this example init.pp is part of site.pp and test.pp is part of ENC.  
I tested also verified if I moved init.pp to the ENC I would get the Dynamic 
lookup error for it also.

I also restart the puppet master process after every puppet client run.  The 
warning from the puppet master only occurs once, and a restart will force it to 
display it again.


Puppet/Ruby version
    # puppet --version
    2.7.1
    
    # ruby --version
    ruby 1.8.7 (2010-06-23 patchlevel 299) [x86_64-linux]


My ENC

    #!/usr/bin/env perl
    use strict;
    use warnings;
    my $yaml = <<EOT;
    ---
    classes:
      linux_base::test
    parameters:
      thevar: "Set from ENC."
    EOT
    print $yaml;

manifests/site.pp

    # Setup Global defaults
    
    # Setup pre and post stage for Puppet
    stage { "pre": before => Stage[main] }
    stage { "post": require => Stage[main] }
    
    # Setup default modules for all servers
    node basenode {
    
        if ( $kernel == 'Linux' ){
          class {"linux_base": }
        }
    }

    node default inherits basenode {}

modules/linux_base/manifests/init.pp

    class linux_base {
      notify {'linux_base':
        message => "Testing issue 8174. linux_base: FQDN is $fqdn and OS is 
$operatingsystem",
      }
    }

modules/linux_base/manifests/test.pp

    class linux_base::test {
      notify {'linux_base_test':
        message => "Testing issue 8174. linux_base::test: FQDN is $fqdn and OS 
is $operatingsystem",
      }
    }

Puppet client run

    # puppet agent -vt
    info: Caching catalog for generic_server.domain.org
    info: Applying configuration version '1313410581'
    notice: Testing issue 8174. linux_base::test: FQDN is 
generic_server.domain.org and OS is RedHat
    notice: /Stage[main]/Linux_base::Test/Notify[linux_base_test]/message: 
defined 'message' as 'Testing issue 8174. linux_base::test: FQDN is 
generic_server.domain.org and OS is RedHat'
    notice: Testing issue 8174. linux_base: FQDN is generic_server.domain.org 
and OS is RedHat
    notice: /Stage[main]/Linux_base/Notify[linux_base]/message: defined 
'message' as 'Testing issue 8174. linux_base: FQDN is generic_server.domain.org 
and OS is RedHat'
    notice: Finished catalog run in 0.60 seconds

/var/log/messages

    Aug 15 07:16:08 generic_server puppet-master[10354]: Caught TERM; calling 
stop
    Aug 15 07:16:11 generic_server puppet-master[11626]: Reopening log files
    Aug 15 07:16:11 generic_server puppet-master[11626]: Starting Puppet master 
version 2.7.1
    Aug 15 07:16:21 generic_server puppet-master[11626]: Dynamic lookup of 
$fqdn at 
/var/opt/puppet/environments/production/modules/linux_base/manifests/test.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.
    Aug 15 07:16:21 generic_server puppet-master[11626]: Dynamic lookup of 
$operatingsystem at 
/var/opt/puppet/environments/production/modules/linux_base/manifests/test.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.
    Aug 15 07:16:21 generic_server puppet-master[11626]: Compiled catalog for 
generic_server.domain.org in environment production in 0.18 seconds
    Aug 15 07:16:21 generic_server puppet-agent[11631]: Caching catalog for 
generic_server.domain.org
    Aug 15 07:16:22 generic_server puppet-agent[11631]: Applying configuration 
version '1313410581'
    Aug 15 07:16:22 generic_server puppet-agent[11631]: Testing issue 8174. 
linux_base::test: FQDN is generic_server.domain.org and OS is RedHat
    Aug 15 07:16:22 v puppet-agent[11631]: 
(/Stage[main]/Linux_base::Test/Notify[linux_base_test]/message) defined 
'message' as 'Testing issue 8174. linux_base::test: FQDN is 
generic_server.domain.org and OS is RedHat'
    Aug 15 07:16:22 generic_server puppet-agent[11631]: Testing issue 8174. 
linux_base: FQDN is generic_server.domain.org and OS is RedHat
    Aug 15 07:16:22 generic_server puppet-agent[11631]: 
(/Stage[main]/Linux_base/Notify[linux_base]/message) defined 'message' as 
'Testing issue 8174. linux_base: FQDN is generic_server.domain.org and OS is 
RedHat'
    Aug 15 07:16:22 generic_server puppet-agent[11631]: Finished catalog run in 
0.60 seconds


/etc/puppet/puppet.conf

    [main]
    # Where Puppet stores dynamic and growing data.
    # The default value is '/var/lib/puppet'.
    vardir = /var/lib/puppet
    # The Puppet log directory.
    # The default value is '$vardir/log'.
    logdir = /var/opt/puppet/log
    # Where Puppet PID files are kept.
    # The default value is '$vardir/run'.
    rundir = /var/run/puppet
    # Setup plugins
    #pluginsync = true
    factpath = $vardir/lib/facter
    [agent]
    # The file in which puppetd stores a list of the classes
    # associated with the retrieved configuratiion.  Can be loaded in
    # the separate ``puppet`` executable using the ``--loadclasses``
    # option.
    # The default value is '$confdir/classes.txt'.
    classfile = $vardir/classes.txt
    # Where puppetd caches the local configuration.  An
    # extension indicating the cache format is added automatically.
    # The default value is '$confdir/localconfig'.
    localconfig = $vardir/localconfig
    # Where SSL certificates are kept.
    # The default value is '$confdir/ssl'.
    ssldir = $vardir/ssl-client
    # setup the server
    server = generic_server.domain.org
    # Enable reporting
    report = false
    ca_server = generic_server.domain.org
    environment = production
    splay = true
    noop = false
    [master]
    # Where SSL certificates are kept.
    # The default value is '$confdir/ssl'.
    ssldir = $vardir/ssl
    certname=generic_server.domain.org
    ca=true
    storeconfigs = false
    autosign = true
    ssl_client_header = SSL_CLIENT_S_DN
    ssl_client_verify_header = SSL_CLIENT_VERIFY
    # External node script
    external_nodes = /var/opt/puppet/scripts/puppet_node_classifier
    node_terminus = exec
    ####################################################
    #
    #  Setup Pupppet environments
    #
    ####################################################
    #Production this is the default puppet enviornment
    manifestdir = /var/opt/puppet/environments/production/manifests
    manifest = /var/opt/puppet/environments/production/manifests/site.pp
    modulepath = /var/opt/puppet/environments/production/modules
----------------------------------------
Bug #8174: External Node Classifer makes puppet think Facter variables are 
dynamic lookup issues
https://projects.puppetlabs.com/issues/8174

Author: Chuck Schweizer
Status: Needs More Information
Priority: Normal
Assignee: 
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