I''ve got a problem getting a custom function to load. It''s got be something stupid simple, but I''m going nuts trying to figure out what I''m doing wrong. For starters it''s a really simple function named ''lowercase'', it''s in a file named lowercase.rb. My libdir setting for puppermasterd is /var/lib/puppet/lib, so I put the file in /var/lib/ puppet/lib/puppet/parser/functions, but I get "Unknown function lowercase" when I try to run a client. Where should this file thing go? --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
I''ve noticed that for plugins changes, I need to reload my puppetmaster (buts thats true for functions which are inside a module, I''m not sure about functions which are rubylib path). try running the puppetmaster in a debug mode, maybe that could provide some more information. Ohad On Thu, Jul 17, 2008 at 3:41 AM, Bill Pemberton <JoeWahoo@gmail.com> wrote:> > I''ve got a problem getting a custom function to load. It''s got be > something stupid simple, but I''m going nuts trying to figure out what > I''m doing wrong. For starters it''s a really simple function named > ''lowercase'', it''s in a file named lowercase.rb. My libdir setting for > puppermasterd is /var/lib/puppet/lib, so I put the file in /var/lib/ > puppet/lib/puppet/parser/functions, but I get "Unknown function > lowercase" when I try to run a client. Where should this file thing > go? > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Ohad Levy wrote:> I''ve noticed that for plugins changes, I need to reload my puppetmaster > (buts thats true for functions which are inside a module, I''m not sure > about functions which are rubylib path). > > try running the puppetmaster in a debug mode, maybe that could provide > some more information. >Putting the function in a module would be fine too, that''s what I was trying first, but was getting the same result. That''s why I tried going back to the basics and put it libdir. Running the master in debug doesn''t give me any more clue. The only thing I see in the debug that may be relevant is: /Settings[/etc/puppet/puppet.conf]/Settings[main]/File[/var/lib/puppet/lib]: Autorequiring File[/var/lib/puppet] -- Bill --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Did you run puppetd -pluginsync ? Ohad On 7/17/08, Bill Pemberton <joewahoo@gmail.com> wrote:> > Ohad Levy wrote: >> I''ve noticed that for plugins changes, I need to reload my puppetmaster >> (buts thats true for functions which are inside a module, I''m not sure >> about functions which are rubylib path). >> >> try running the puppetmaster in a debug mode, maybe that could provide >> some more information. >> > > Putting the function in a module would be fine too, that''s what I was > trying first, but was getting the same result. That''s why I tried going > back to the basics and put it libdir. > > Running the master in debug doesn''t give me any more clue. The only > thing I see in the debug that may be relevant is: > > /Settings[/etc/puppet/puppet.conf]/Settings[main]/File[/var/lib/puppet/lib]: > Autorequiring File[/var/lib/puppet] > > > -- > Bill > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Ohad Levy wrote:> Did you run puppetd -pluginsync ?> Running with --pluginsync produces the error: err: /File[/var/lib/puppet/lib]/source: Could not describe /plugins: can''t convert nil into String -- Bill --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
On 7/17/2008 9:20 AM, Bill Pemberton wrote:> Running with --pluginsync produces the error: > > err: /File[/var/lib/puppet/lib]/source: Could not describe /plugins: > can''t convert nil into StringCheck puppet.conf''s [puppetmasterd] section for pluginpath. If present, does that plugin directory exist? If absent, then you''ll probably want to set it and create that folder. -- Mike Renfro / R&D Engineer, Center for Manufacturing Research, 931 372-3601 / Tennessee Technological University --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Mike Renfro wrote:> > Check puppet.conf''s [puppetmasterd] section for pluginpath. If present, > does that plugin directory exist? If absent, then you''ll probably want > to set it and create that folder. >I ran puppetmasterd --genconfig|grep pluginpath and ensured that directory exists. It does not change the error. -- Bill --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Hi Bill, Did you find a solution at the end? I''m seeing the same problem now ;) Thanks, Ohad On Fri, Jul 18, 2008 at 12:03 AM, Bill Pemberton <joewahoo@gmail.com> wrote:> > Mike Renfro wrote: >> >> Check puppet.conf''s [puppetmasterd] section for pluginpath. If present, >> does that plugin directory exist? If absent, then you''ll probably want >> to set it and create that folder. >> > > I ran puppetmasterd --genconfig|grep pluginpath and ensured that > directory exists. It does not change the error. > > -- > Bill > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
ok, found the problem... it seems that plugin sync and environments do not play well together... created http://reductivelabs.com/redmine/issues/show/1466 Ohad On Wed, Jul 30, 2008 at 12:47 PM, Ohad Levy <ohadlevy@gmail.com> wrote:> Hi Bill, > > Did you find a solution at the end? I''m seeing the same problem now ;) > > Thanks, > Ohad > > On Fri, Jul 18, 2008 at 12:03 AM, Bill Pemberton <joewahoo@gmail.com> wrote: >> >> Mike Renfro wrote: >>> >>> Check puppet.conf''s [puppetmasterd] section for pluginpath. If present, >>> does that plugin directory exist? If absent, then you''ll probably want >>> to set it and create that folder. >>> >> >> I ran puppetmasterd --genconfig|grep pluginpath and ensured that >> directory exists. It does not change the error. >> >> -- >> Bill >> >> >> >> >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Well, I''m so glad you figured this out as this hit me just yesterday. What I''m upset about is that there''s no fix as I can''t disable environments! On Wed, Jul 30, 2008 at 1:40 AM, Ohad Levy <ohadlevy@gmail.com> wrote:> > ok, found the problem... > > it seems that plugin sync and environments do not play well together... > created > http://reductivelabs.com/redmine/issues/show/1466 > > Ohad > > On Wed, Jul 30, 2008 at 12:47 PM, Ohad Levy <ohadlevy@gmail.com> wrote: > > Hi Bill, > > > > Did you find a solution at the end? I''m seeing the same problem now ;) > > > > Thanks, > > Ohad > > > > On Fri, Jul 18, 2008 at 12:03 AM, Bill Pemberton <joewahoo@gmail.com> > wrote: > >> > >> Mike Renfro wrote: > >>> > >>> Check puppet.conf''s [puppetmasterd] section for pluginpath. If present, > >>> does that plugin directory exist? If absent, then you''ll probably want > >>> to set it and create that folder. > >>> > >> > >> I ran puppetmasterd --genconfig|grep pluginpath and ensured that > >> directory exists. It does not change the error. > >> > >> -- > >> Bill > >> > >> >> > >> > > > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
yeah... as workaround, copy your plugins with normal file statements to your libdir, if your manifest can compile without your custom types.... Ohad On Wed, Jul 30, 2008 at 7:50 PM, Ashley Penney <apenney@gmail.com> wrote:> Well, I''m so glad you figured this out as this hit me just yesterday. What > I''m upset about is that there''s no fix as I can''t disable environments! > > On Wed, Jul 30, 2008 at 1:40 AM, Ohad Levy <ohadlevy@gmail.com> wrote: >> >> ok, found the problem... >> >> it seems that plugin sync and environments do not play well together... >> created >> http://reductivelabs.com/redmine/issues/show/1466 >> >> Ohad >> >> On Wed, Jul 30, 2008 at 12:47 PM, Ohad Levy <ohadlevy@gmail.com> wrote: >> > Hi Bill, >> > >> > Did you find a solution at the end? I''m seeing the same problem now ;) >> > >> > Thanks, >> > Ohad >> > >> > On Fri, Jul 18, 2008 at 12:03 AM, Bill Pemberton <joewahoo@gmail.com> >> > wrote: >> >> >> >> Mike Renfro wrote: >> >>> >> >>> Check puppet.conf''s [puppetmasterd] section for pluginpath. If >> >>> present, >> >>> does that plugin directory exist? If absent, then you''ll probably want >> >>> to set it and create that folder. >> >>> >> >> >> >> I ran puppetmasterd --genconfig|grep pluginpath and ensured that >> >> directory exists. It does not change the error. >> >> >> >> -- >> >> Bill >> >> >> >> >> >> >> >> > >> >> > > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
As (maybe) another data point, I''ve run into something that I think may also be related to this problem. I was having a problem with my puppetmaster serving itself. In other words, it would serve other puppetd''s just fine, but always got an error if puppetd was coming from the same machine as the puppetmasterd. I assumed it was something in my config, so I went to as basic as a config I could get -- just the default, my only site.pp entry was to create a file in / tmp. This worked fine. However, as soon as I turned on pluginsync, puppetd complains with the "could not describe /plugins" error. Here''s all my puppet.conf looks like: [main] # Where Puppet stores dynamic and growing data. # The default value is ''/var/puppet''. vardir = /var/lib/puppet # The Puppet log directory. # The default value is ''$vardir/log''. logdir = /var/log/puppet # Where Puppet PID files are kept. # The default value is ''$vardir/run''. rundir = /var/run/puppet # Where SSL certificates are kept. # The default value is ''$confdir/ssl''. ssldir = $vardir/ssl pluginsync = true factpath = $vardir/lib/puppet/facter [puppetd] # The file in which puppetd stores a list of the classes # associated with the retrieved configuratiion. Can be loaded in # the separate ``puppet`` executable using the ``--loadclasses`` # option. # The default value is ''$confdir/classes.txt''. classfile = $vardir/classes.txt # Where puppetd caches the local configuration. An # extension indicating the cache format is added automatically. # The default value is ''$confdir/localconfig''. localconfig = $vardir/localconfig ---- If I comment out the pluginsync line, it works fine. If I enable that line, I get: err: /File[/var/lib/puppet/lib]/source: Could not describe /plugins: can''t convert nil into String warning: /File[/var/lib/puppet/lib]/ensure: No specified sources exist warning: /File[/var/lib/puppet/lib]/ensure: No specified sources exist warning: /File[/var/lib/puppet/lib]/source: No specified sources exist I''m running puppet using the Fedora 9 rpms, so it''s version 0.24. I was about to try updating to 0.25 to see if changed anything. Bill --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Turns out that my problem was that there was generic module path under puppetmaster section, I specified it only per env. once adding it - it worked. nevertheless I didn''t check if pluginsync is using the right env or the default one. Ohad On Wed, Jul 30, 2008 at 7:50 PM, Ashley Penney <apenney@gmail.com> wrote:> Well, I''m so glad you figured this out as this hit me just yesterday. What > I''m upset about is that there''s no fix as I can''t disable environments! > > On Wed, Jul 30, 2008 at 1:40 AM, Ohad Levy <ohadlevy@gmail.com> wrote: >> >> ok, found the problem... >> >> it seems that plugin sync and environments do not play well together... >> created >> http://reductivelabs.com/redmine/issues/show/1466 >> >> Ohad >> >> On Wed, Jul 30, 2008 at 12:47 PM, Ohad Levy <ohadlevy@gmail.com> wrote: >> > Hi Bill, >> > >> > Did you find a solution at the end? I''m seeing the same problem now ;) >> > >> > Thanks, >> > Ohad >> > >> > On Fri, Jul 18, 2008 at 12:03 AM, Bill Pemberton <joewahoo@gmail.com> >> > wrote: >> >> >> >> Mike Renfro wrote: >> >>> >> >>> Check puppet.conf''s [puppetmasterd] section for pluginpath. If >> >>> present, >> >>> does that plugin directory exist? If absent, then you''ll probably want >> >>> to set it and create that folder. >> >>> >> >> >> >> I ran puppetmasterd --genconfig|grep pluginpath and ensured that >> >> directory exists. It does not change the error. >> >> >> >> -- >> >> Bill >> >> >> >> >> >> >> >> > >> >> > > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---