Issue #9827 has been updated by Josh Cooper. Subject changed from library path issues with new mount provider to Hooks for dependent settings not called Description updated
This ticket is about hooks for dependent settings not being called. If you use puppet agent with any module, and that module attempts to load utility code, with an libdir expressed in-terms of another property, e.g. libdir=$vardir/lib, and that other property is not the default, e.g. /var/somewhereelse, then you'll see the behavior described in this ticket (since the libdir hook is never called to update $LOAD_PATH). The general issue about a module failing to require utility code is #7316 and will be released in 3.1. ---------------------------------------- Bug #9827: Hooks for dependent settings not called https://projects.puppetlabs.com/issues/9827#change-78917 Author: Ben Hughes Status: Accepted Priority: Normal Assignee: Andrew Parker Category: plumbing Target version: Affected Puppet version: Keywords: Branch: If you have a setting, like $libdir that is defined as $vardir/lib, when $vardir is changed, the hook for $libdir is not called with the new interpolated value. This is primarily a problem related to $libdir, but it may also affect $factpath. Original description: The new mount provider has file loading issue. This may be due to plugin sync. <cite> Could not autoload mountpoint: Could not autoload /var/puppet/lib/puppet/provider/mountpoint/solaris.rb: no such file to load -- puppet/type/mountpoint at /Users/foo/mountpoints.pp:46 on node mynode.example.com </cite> <cite> I think this is because the $: load path doesn't correctly include the pluginsync location. I say "correctly include" because truss shows it does scan some directories under puppet's normal $libdir, but these systems use /var/puppet, not /var/lib/puppet, set via '$vardir=/var/puppet' in /etc/puppet/puppet.conf, which isn't consulted: </cite> A kindly provided truss output: <pre> stat64("/usr/local/lib/ruby/site_ruby/1.8/puppet/type/mountpoint.rb", 0x08037FBC) Err#2 ENOENT stat64("/usr/local/lib/ruby/site_ruby/1.8/puppet/type/mountpoint.so", 0x08037FBC) Err#2 ENOENT stat64("/usr/local/lib/ruby/site_ruby/1.8/i386-solaris2.10/puppet/type/mountpoint.rb", 0x08037FBC) Err #2 ENOENT stat64("/usr/local/lib/ruby/site_ruby/1.8/i386-solaris2.10/puppet/type/mountpoint.so", 0x08037FBC) Err #2 ENOENT stat64("/usr/local/lib/ruby/site_ruby/puppet/type/mountpoint.rb", 0x08037FBC) Err#2 ENOENT stat64("/usr/local/lib/ruby/site_ruby/puppet/type/mountpoint.so", 0x08037FBC) Err#2 ENOENT stat64("/usr/local/lib/ruby/vendor_ruby/1.8/puppet/type/mountpoint.rb", 0x08037FBC) Err#2 ENOENT stat64("/usr/local/lib/ruby/vendor_ruby/1.8/puppet/type/mountpoint.so", 0x08037FBC) Err#2 ENOENT stat64("/usr/local/lib/ruby/vendor_ruby/1.8/i386-solaris2.10/puppet/type/mountpoint.rb", 0x08037FBC) Err#2 ENOENT stat64("/usr/local/lib/ruby/vendor_ruby/1.8/i386-solaris2.10/puppet/type/mountpoint.so", 0x08037FBC) Err#2 ENOENT stat64("/usr/local/lib/ruby/vendor_ruby/puppet/type/mountpoint.rb", 0x08037FBC) Err#2 ENOENT stat64("/usr/local/lib/ruby/vendor_ruby/puppet/type/mountpoint.so", 0x08037FBC) Err#2 ENOENT stat64("/usr/local/lib/ruby/1.8/puppet/type/mountpoint.rb", 0x08037FBC) Err#2 ENOENT stat64("/usr/local/lib/ruby/1.8/puppet/type/mountpoint.so", 0x08037FBC) Err#2 ENOENT stat64("/usr/local/lib/ruby/1.8/i386-solaris2.10/puppet/type/mountpoint.rb", 0x08037FBC) Err#2 ENOENT stat64("/usr/local/lib/ruby/1.8/i386-solaris2.10/puppet/type/mountpoint.so", 0x08037FBC) Err#2 ENOENT stat64("./puppet/type/mountpoint.rb", 0x08037FBC) Err#2 ENOENT stat64("./puppet/type/mountpoint.so", 0x08037FBC) Err#2 ENOENT stat64("/var/lib/puppet/lib/puppet/type/mountpoint.rb", 0x08037FBC) Err#2 ENOENT stat64("/var/lib/puppet/lib/puppet/type/mountpoint.so", 0x08037FBC) Err#2 ENOENT </pre> <cite> So it's weird to me that /var/lib/puppet/lib is in the list, but the *actual* libdir, /var/puppet/lib, is not. Looking through defaults.rb, I'm at a loss to explain why these two things are different: </cite> Looking at <https://github.com/puppetlabs/puppetlabs-mount-providers/blob/master/lib/puppet/provider/mountpoint/solaris.rb> it shows that we're using 'require' for the mountpoint.rb (which explains the truss looking for the .so file too). This will be the libdir and not the puppet vardir. Which could explain the disparity. Note, this is on 2.6.9 Puppet. -- 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.
