Issue #7077 has been updated by Joe McDonagh.
Fine I can believe it’s a “scoping” issue in that stages must modify scope in such a way as to break things in this manner. That’s easily proven because this setup has no problem ever in finding variables in templates, manifests, or wherever using vars in site.pp. Shifting them to a class is also not practically feasible for this setup because these global variables are in use across many classes. ---------------------------------------- Bug #7077: Scoped definitions as well as 'global variables' (defined in site.pp) don't seem to work properly with stages https://projects.puppetlabs.com/issues/7077 Author: Joe McDonagh Status: Needs More Information Priority: Normal Assignee: Category: Target version: Affected Puppet version: 2.6.7 Keywords: stages Branch: I just upgraded to 2.6.7 and decided to set up a pre and post stage for a couple of things: <pre> # Run Stages and what stage to run classes (default all classes run # in main) stage { "pre": before => Stage["main"]; "post": require => Stage["main"]; } class { "apt": stage => "pre"; "nagios::target" stage => "post"; "nsca::client" stage => "post"; } </pre> First, came the following errors: <pre> Tue Apr 12 17:51:40 -0700 2011 Puppet (err): Could not retrieve catalog from remote server: Could not intern from pson: Could not convert from pson: Could not find relationship target "Apt::Aptkey[]" Tue Apr 12 17:51:40 -0700 2011 Puppet (err): Could not retrieve catalog; skipping run </pre> That define lives in the apt class set to run in the pre stage. So I comment the stage class stanza for apt and then I got: <pre> Tue Apr 12 20:43:25 -0400 2011 Puppet (err): Could not retrieve catalog from remote server: Error 400 on SERVER: Failed to parse template nagios/etc/default/nagios3.erb: Could not find value for 'nagios_root_dir' at /etc/puppet/production/modules/nagios/manifests/init.pp:291 on node builder Tue Apr 12 20:43:25 -0400 2011 Puppet (err): Could not retrieve catalog; skipping run </pre> This variable is defined in site.pp. I make pretty extensive use of defining variables in site.pp. It is worth noting that I do use environments and this was all in the production environment. -- 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.
