Issue #11875 has been updated by Daniel Grace.
As a clarification, the correct file/line number are reported in this scenario -- that isn't something that needs to be changed. What's not reported is the absolute path of the class name being examined -- in this case, ::mysql::config, when the user things they're looking at ::config and the error messsage references config. ---------------------------------------- Feature #11875: warning for "Could not look up qualified variable 'foo::bar' " should report the fully-qualified class name being examined https://projects.puppetlabs.com/issues/11875 Author: Daniel Grace Status: Accepted Priority: Low Assignee: Daniel Pittman Category: error reporting Target version: Affected Puppet version: 2.7.9 Keywords: Branch: Consider the following manifest, assuming the classes and such were separated into the correct file structure <pre>stage { 'init': }->Stage['main'] class config ($server_id => 1) { ... } class mysql ($server_id => config::$server_id) { ... } class mysql::config inherits mysql { ... } Class {'config': }->Class {'mysql': }->Class['mysql::config': }</pre> During apply, puppet will report a warning similar to: warning: Scope(Class[Mysql]): Could not look up qualified variable 'config::server_id'; class **config** has not been evaluated at /etc/puppet/modules/mysql/manifests/init.pp:17 What actually is happening is config::$server_id is resolving to ::mysql::config::$server_id rather than the intended ::config::$server_id, and the warning is generated since mysql::config has not yet been evaluated. Furthermore, this only happens if there is a class named mysql::config -- if it were named, say, 'mysql::files' instead, the code works as intended. That's not readily obvious from the warning message, however. If the warning message instead read: warning: Scope(Class[Mysql]): Could not look up qualified variable 'config::server_id'; class **mysql::config** has not been evaluated at /etc/puppet/modules/mysql/manifests/init.pp:17 it would be far more obvious as to what's happening. -- 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.
