Puppet: System Administration Automated

Support

Ticket #1167 (closed defect: fixed)

Opened 8 months ago

Last modified 6 months ago

error reporting for variable expansion in settings is not-sane

Reported by: emerose Assigned to: Fujin
Priority: normal Milestone: unplanned
Component: settings Version: 0.24.4
Severity: minor Keywords:
Cc: Triage Stage: Accepted
Attached Patches: None Complexity: Easy

Description

Don't ask me how I know this, but if you set pluginsource to something containing a variable -- say, for example, "pluginsource = puppet://$puppet_server/plugins", you get a crazy set of errors:

debug: No path given for plugins mount; creating a special PluginMount
debug: Creating interpreter
/usr/lib/ruby/1.8/puppet/util/settings.rb:125:in `convert'
/usr/lib/ruby/1.8/puppet/util/settings.rb:120:in `gsub'
/usr/lib/ruby/1.8/puppet/util/settings.rb:120:in `convert'
/usr/lib/ruby/1.8/puppet/util/settings.rb:728:in `value'
/usr/lib/ruby/1.8/puppet/util/settings.rb:1103:in `value'
/usr/lib/ruby/1.8/puppet/util/settings.rb:495:in `section_to_transportable'
/usr/lib/ruby/1.8/puppet/util/settings.rb:436:in `persection'
/usr/lib/ruby/1.8/puppet/util/settings.rb:143:in `each'
/usr/lib/ruby/1.8/puppet/util/settings.rb:142:in `each'
/usr/lib/ruby/1.8/puppet/util/settings.rb:434:in `persection'
/usr/lib/ruby/1.8/puppet/util/settings.rb:490:in `section_to_transportable'
/usr/lib/ruby/1.8/puppet/util/settings.rb:633:in `to_transportable'
/usr/lib/ruby/1.8/puppet/util/settings.rb:632:in `each'
/usr/lib/ruby/1.8/puppet/util/settings.rb:632:in `to_transportable'
/usr/lib/ruby/1.8/puppet/util/settings.rb:660:in `use'
/usr/lib/ruby/1.8/sync.rb:230:in `synchronize'
/usr/lib/ruby/1.8/puppet/util/settings.rb:655:in `use'
/usr/lib/ruby/1.8/puppet/network/handler/report.rb:21:in `initialize'
/usr/lib/ruby/1.8/puppet/network/http_server/webrick.rb:140:in `new'
/usr/lib/ruby/1.8/puppet/network/http_server/webrick.rb:140:in `setup_handlers'
/usr/share/rails/activerecord/lib/../../activesupport/lib/active_support/inflector.rb:250:in `collect'
/usr/lib/ruby/1.8/puppet/network/http_server/webrick.rb:135:in `each'
/usr/lib/ruby/1.8/puppet/network/http_server/webrick.rb:135:in `collect'
/usr/lib/ruby/1.8/puppet/network/http_server/webrick.rb:135:in `setup_handlers'
/usr/lib/ruby/1.8/puppet/network/http_server/webrick.rb:80:in `initialize'
/usr/sbin/puppetmasterd:237:in `new'
/usr/sbin/puppetmasterd:237
undefined local variable or method `parent' for #<Puppet::Util::Settings:0x2b11b28ad740>

Getting rid of that line in puppet.conf makes the error go away...

Change History

04/04/08 03:16:39 changed by Fujin

  • status changed from new to assigned.
  • component changed from server to library.
  • summary changed from Wacko error message when pluginsource is set to the wrong thing to error reporting for variable expansion in settings is not-sane.
  • priority changed from normal to lowest.
  • milestone set to unplanned.
  • owner changed from community to Fujin.
  • stage changed from Unreviewed to Needs more info.

Accepted, replicated;

config (note that $puppet_server is not valid):

[puppetd]
pluginsync=true
diff_args=-u
server=puppet.junglist.gen.nz
pluginsource=puppet://$puppet_server/plugins

output:

root@junglist (branch: master) /etc/puppet# puppetd --test
info: Loading fact configured_ntp_servers
info: Loading fact netmask
info: Loading fact acpi_available
info: Loading fact interfaces
/usr/local/lib/site_ruby/1.8/puppet/util/settings.rb:125:in `convert': undefined local variable or method `parent' for #<Puppet::Util::Settings:0xb7983aac> (NameError)
        from /usr/local/lib/site_ruby/1.8/puppet/util/settings.rb:120:in `gsub'
        from /usr/local/lib/site_ruby/1.8/puppet/util/settings.rb:120:in `convert'
        from /usr/local/lib/site_ruby/1.8/puppet/util/settings.rb:728:in `value'
        from /usr/local/lib/site_ruby/1.8/puppet/util/settings.rb:1103:in `value'
        from /usr/local/lib/site_ruby/1.8/puppet/util/settings.rb:495:in `section_to_transportable'
        from /usr/local/lib/site_ruby/1.8/puppet/util/settings.rb:436:in `persection'
        from /usr/local/lib/site_ruby/1.8/puppet/util/settings.rb:143:in `each'
        from /usr/local/lib/site_ruby/1.8/puppet/util/settings.rb:142:in `each'
         ... 7 levels...
        from /usr/local/lib/site_ruby/1.8/puppet/util/settings.rb:655:in `use'
        from /usr/local/lib/site_ruby/1.8/puppet/network/client/master.rb:206:in `initialize'
        from /usr/bin/puppetd:322:in `new'
        from /usr/bin/puppetd:322

Proposed fix: ensure that error reporting for variable expansion in settings is sane. Feel free to supply patch.

04/08/08 18:12:19 changed by luke

  • priority changed from lowest to normal.
  • complexity changed from Unknown to Easy.
  • severity changed from normal to minor.
  • stage changed from Needs more info to Accepted.

04/24/08 07:23:57 changed by luke

  • component changed from library to settings.

05/13/08 00:09:54 changed by luke

  • status changed from assigned to closed.
  • resolution set to fixed.

This should have been fixed when #1218 was fixed.