windowsrefund
2011-Jan-18 17:23 UTC
[Puppet Users] Behavior of local modules and their included facts
I''ve got a simple local module that I''ll be compiling with the puppet binary. The module''s structure is: modules/ub/ modules/ub/manifests modules/ub/manifests/init.pp modules/ub/lib modules/ub/lib/facter modules/ub/lib/facter/factery_import.rb modules/ub/manifests/init.pp is just a placeholder: class ub { } My expectation is that I''d be able to run the puppet binary as follows and the factery_import.rb script would run puppet -d --modulepath=modules -e ''include ub'' This does not work though. I can work around it by using export FACTERLIB=modules/ub/lib/facter but I''d like to avoid that if at all possible. Am I missing something obvious here? Thanks in advance -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Daniel Pittman
2011-Jan-18 20:07 UTC
Re: [Puppet Users] Behavior of local modules and their included facts
On Tue, Jan 18, 2011 at 09:23, windowsrefund <windowsrefund@gmail.com> wrote:> I''ve got a simple local module that I''ll be compiling with the puppet > binary. The module''s structure is: > > modules/ub/ > modules/ub/manifests > modules/ub/manifests/init.pp > modules/ub/lib > modules/ub/lib/facter > modules/ub/lib/facter/factery_import.rb > > modules/ub/manifests/init.pp is just a placeholder: > > class ub { > } > > My expectation is that I''d be able to run the puppet binary as follows > and the factery_import.rb script would run > > puppet -d --modulepath=modules -e ''include ub'' > > This does not work though. I can work around it by using export > FACTERLIB=modules/ub/lib/facter but I''d like to avoid that if at all > possible. Am I missing something obvious here?No, that looks like it should work to me. Specifically, by testing with 2.6.4 shows that it actually works correctly when I run that some code; puppet loads the fact and I see my debug output showing that it was found. Can you post the versions and put the code up to download? If you do we can try out the system and see if it will reproduce for us locally. (Knowing exactly what version of puppet you have will also help, because it will let me test the same code you use rather than just whatever I have on my system.) Regards, Daniel -- ⎋ Puppet Labs Developer – http://puppetlabs.com ✉ Daniel Pittman <daniel@rimspace.net> ✆ Contact me via gtalk, email, or phone: +1 (503) 893-2285 ♲ Made with 100 percent post-consumer electrons -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
windowsrefund
2011-Jan-18 21:24 UTC
[Puppet Users] Re: Behavior of local modules and their included facts
Daniel, Thanks for the assistance. I dropped a tarball over at https://bitbucket.org/windowsrefund/temp/src/31bfb4826c7f/ub2.tar.gz after extracting, I''d be able to reproduce the problem with: cd ub2 puppet -d --modulepath=modules init.pp As for versions, here''s what I''m doing: puppet 0.25.4 (gem) facter 1.5.8 (gem) ruby 1.8.7 (2010-08-16 patchlevel 302) [x86_64-linux] some sort of debianish GNU/Linux OS Thanks again and let me know if further details are needed. Adam -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Daniel Pittman
2011-Jan-18 22:33 UTC
Re: [Puppet Users] Re: Behavior of local modules and their included facts
On Tue, Jan 18, 2011 at 13:24, windowsrefund <windowsrefund@gmail.com> wrote:> Thanks for the assistance. I dropped a tarball over at > https://bitbucket.org/windowsrefund/temp/src/31bfb4826c7f/ub2.tar.gz > after extracting, I''d be able to reproduce the problem with:[...]> As for versions, here''s what I''m doing: > > puppet 0.25.4 (gem) > facter 1.5.8 (gem) > ruby 1.8.7 (2010-08-16 patchlevel 302) [x86_64-linux] > some sort of debianish GNU/Linux OS > > Thanks again and let me know if further details are needed.No, that covers it, actually. Your problem is that the 0.25.4 series consult only ''.../ub2/plugins/facter/*.rb'' for custom facts; the ''.../ub2/lib/facter/*.rb'' version didn''t come in until later. (The 2.6 AKA 0.26 series, IIRC, but I have not checked exactly when.) For backward compatibility the newer clients will fetch from plugins/facter as well as lib/facter, so the compatible option is to drop it in there. Were you working from some documentation on modules on our site? If so I would love to know where, because then I can tell our tech writer to fix it up so that it makes absolutely clear which versions the various paths work in. :) Regards, Daniel -- ⎋ Puppet Labs Developer – http://puppetlabs.com ✉ Daniel Pittman <daniel@rimspace.net> ✆ Contact me via gtalk, email, or phone: +1 (503) 893-2285 ♲ Made with 100 percent post-consumer electrons -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
windowsrefund
2011-Jan-18 23:24 UTC
[Puppet Users] Re: Behavior of local modules and their included facts
Daniel, Thanks for the feedback. The doc I referred to lives at http://docs.puppetlabs.com/guides/plugins_in_modules.html I''ll certainly try a mv lib plugins to see if it works as expected but I''m a little confused when I consider my existing source tree which does use the lib directory. Of course, this is client/server stuff where the scenario being discussed here is purely local. All the best -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Daniel Pittman
2011-Jan-18 23:29 UTC
Re: [Puppet Users] Re: Behavior of local modules and their included facts
On Tue, Jan 18, 2011 at 15:24, windowsrefund <windowsrefund@gmail.com> wrote:> Thanks for the feedback. The doc I referred to lives at > http://docs.puppetlabs.com/guides/plugins_in_modules.htmlThanks. I will bug our tech writer in a moment. :)> I''ll certainly try a mv lib plugins to see if it works as expected but > I''m a little confused when I consider my existing source tree which > does use the lib directory. Of course, this is client/server stuff > where the scenario being discussed here is purely local.I only looked at the client-side behaviour, not the master. With the master it depends where that system scans through for pluginsync – it then sends ''em all to a single directory on the client that is on the search path in addition to the module directories. Is your puppet master also an 0.25 series install, or are you using a 2.6 master and 0.25 clients? Regards, Daniel -- ⎋ Puppet Labs Developer – http://puppetlabs.com ✉ Daniel Pittman <daniel@rimspace.net> ✆ Contact me via gtalk, email, or phone: +1 (503) 893-2285 ♲ Made with 100 percent post-consumer electrons -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
windowsrefund
2011-Jan-18 23:34 UTC
[Puppet Users] Re: Behavior of local modules and their included facts
> Is your puppet master also an 0.25 series install, or are you using a > 2.6 master and 0.25 clients?Everything is 0.25.4 -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
windowsrefund
2011-Jan-18 23:42 UTC
[Puppet Users] Re: Behavior of local modules and their included facts
> > No, that covers it, actually. Your problem is that the 0.25.4 series > consult only ''.../ub2/plugins/facter/*.rb'' for custom facts; the > ''.../ub2/lib/facter/*.rb'' version didn''t come in until later. (The > 2.6 AKA 0.26 series, IIRC, but I have not checked exactly when.) >Looks like the mv lib plugins fix did not result in the fact loading. It seems to only be possible if I point FACTERLIB at the exact path. -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
windowsrefund
2011-Jan-18 23:50 UTC
[Puppet Users] Re: Behavior of local modules and their included facts
> > Looks like the mv lib plugins fix did not result in the fact loading. > It seems to only be possible if I point FACTERLIB at the exact path.Sorry for the false positive. All is good with using plugins rather than lib on 0.25.4 Thanks again :) -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Nigel Kersten
2011-Jan-19 00:06 UTC
Re: [Puppet Users] Re: Behavior of local modules and their included facts
On Tue, Jan 18, 2011 at 3:50 PM, windowsrefund <windowsrefund@gmail.com> wrote:> >> >> Looks like the mv lib plugins fix did not result in the fact loading. >> It seems to only be possible if I point FACTERLIB at the exact path. > > Sorry for the false positive. All is good with using plugins rather > than lib on 0.25.4That''s definitely a bug. We moved to supporting lib/ in 0.25.x, we just must have missed making this work on the client side.> > Thanks again :) > > -- > You received this message because you are subscribed to the Google Groups "Puppet Users" group. > To post to this group, send email to puppet-users@googlegroups.com. > To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. > For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. > >-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Nick Fagerlund
2011-Jan-21 17:40 UTC
[Puppet Users] Re: Behavior of local modules and their included facts
On Jan 18, 4:06 pm, Nigel Kersten <ni...@puppetlabs.com> wrote:> That''s definitely a bug. We moved to supporting lib/ in 0.25.x, we > just must have missed making this work on the client side.Specifically, it looks like bug 4180 (http://projects.puppetlabs.com/ issues/4180). This was never fixed in 0.25.x, right? Should we re-open or file a new ticket? (Also, should this bug be mentioned in the documentation?) -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Nigel Kersten
2011-Jan-23 22:18 UTC
Re: [Puppet Users] Re: Behavior of local modules and their included facts
On Fri, Jan 21, 2011 at 9:40 AM, Nick Fagerlund <nick.fagerlund@puppetlabs.com> wrote:> On Jan 18, 4:06 pm, Nigel Kersten <ni...@puppetlabs.com> wrote: >> That''s definitely a bug. We moved to supporting lib/ in 0.25.x, we >> just must have missed making this work on the client side. > > Specifically, it looks like bug 4180 (http://projects.puppetlabs.com/ > issues/4180). This was never fixed in 0.25.x, right? Should we re-open > or file a new ticket? > > (Also, should this bug be mentioned in the documentation?)We''re not going to do another 0.25.x release, so we should mention it in the docs.> > -- > You received this message because you are subscribed to the Google Groups "Puppet Users" group. > To post to this group, send email to puppet-users@googlegroups.com. > To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. > For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en. > >-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.