Issue #8174 has been updated by Ed Brannin.
File puppet-8174.tar.gz added
File puppet-8174.log added
I took some time today to reduce the manifest to the smallest thing I can get
to show the issue.
* I'm using "puppet apply" with --modulepath specified on the command-line, per
apply.sh
* There is a default node (an empty one is enough), but it behaves properly if
there is no "node default".
* There is a module-based define that invokes $hostname.
* Invoking $hostname from site.pp doesn't count.
## Output:
(From a throwaway VM; I don't just traipse around as root)
Script started on Tue 15 May 2012 04:12:07 PM EDT
[root@localhost bug-8174]# cd manifests/
[root@localhost manifests]# puppet --version
ruby --2.7.14
[root@localhost manifests]# ruby --version
ruby 1.8.7 (2010-06-23 patchlevel 299) [x86_64-linux]
[root@localhost manifests]# ./apply.sh site.pp
warning: Dynamic lookup of $hostname at
/root/dev/bug-8174/manifests/modules/bug/manifests/hostname_warning.pp:2 is
deprecated. For more information, see
http://docs.puppetlabs.com/guides/scope_and_puppet.html. To see the change in
behavior, use the --debug flag.
notice: Scope(Bug::Hostname_warning[Name]): localhost
info: Applying configuration version '1337112746'
notice: Finished catalog run in 0.21 seconds
[root@localhost manifests]# exit
Script done on Tue 15 May 2012 04:12:27 PM EDT
## Files:
### Listing
manifests/
manifests/apply.sh
manifests/site.pp
manifests/modules
manifests/modules/bug
manifests/modules/bug/manifests
manifests/modules/bug/manifests/hostname_warning.pp
### manifests/apply.sh (used to invoke Puppet; give "site.pp" as its argument)
#!/bin/bash
DIR="$( cd "$( dirname "$0" )" && pwd )"
sudo -E puppet apply -v --modulepath=$DIR/modules $@
### manifests/site.pp
node default {
}
bug::hostname_warning { "Name": }
### manifests/modules/bug/manifests/hostname_warning.pp
define bug::hostname_warning() {
notice $hostname
}
----------------------------------------
Bug #8174: External Node Classifer makes puppet think Facter variables are
dynamic lookup issues
https://projects.puppetlabs.com/issues/8174#change-62885
Author: Chuck Schweizer
Status: Merged - Pending Release
Priority: Normal
Assignee: Andrew Parker
Category:
Target version: 2.7.14
Affected Puppet version: 2.7.1
Keywords:
Branch: https://github.com/puppetlabs/puppet/pull/657
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.