Issue #11158 has been updated by Joshua Lifton.
Justin Wood wrote:
> Basically what is happening overall is that Class["settings"] is internal to
> puppet
As can be seen in line 464 of <code>lib/puppet/parser/compiler.rb</code>:
<pre>
settings_resource = Puppet::Parser::Resource.new("class", "settings", :scope =>
@topscope)
</pre>
----------------------------------------
Bug #11158: redefinition of built-in ‘settings’ class should give warning or
error
https://projects.puppetlabs.com/issues/11158
Author: Dustin Mitchell
Status: Investigating
Priority: Normal
Assignee: Joshua Lifton
Category:
Target version:
Affected Puppet version:
Keywords:
Branch:
<pre>
[root@relabs-slave tmp]# cat site.pp
$extlookup_datadir = "xyz"
$extlookup_precedence = ["local-settings", "default-settings"]
import "settings.pp"
[root@relabs-slave tmp]# cat settings.pp
class settings {
$foo = extlookup("bar")
}
[root@relabs-slave tmp]# puppet apply --noop site.pp
warning: Scope(Class[Settings]): Could not look up qualified variable
'::extlookup_datadir'; class has not been evaluated
warning: Scope(Class[Settings]): Could not look up qualified variable
'::extlookup_precedence'; class has not been evaluated
No match found for 'bar' in any data file during extlookup() at
/root/tmp/settings.pp:2 on node relabs-slave.build.mtv1.mozilla.com
</pre>
The above follows, roughly, the description in
http://docs.puppetlabs.com/references/2.6.8/function.html#extlookup -- but
doesn't work.
We have found that moving the settings class into a module and explicitly
including it helps. This points to a problem of trying to evaluate the
extlookup too early (at parse time?).
--
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.