Darren Worrall
2010-Aug-18 10:38 UTC
[Puppet Users] custom functions from a module in a different environment
Hey folks, I have just created a puppet environment called testing by adding the following to puppet.conf on the puppetmaster: [testing] manifest = /etc/puppet/testing/manifests/site.pp modulepath = /etc/puppet/testing/modules We are collecting all our customisations into a module, lets say mymodule, and I''m writing a custom function within that, and it lives in /etc/puppet/testing/modules/mymodule/lib/puppet/parser/functions/ myfunc.rb When call that function, on a host in that environment, puppet throws an error ( Error 400 on SERVER: Unknown function myfunc at /etc/puppet/ testing/modules/mymodule/manifests/classes/manifestfile.pp:29 ). If I copy myfunc.rb to the same location in the live module path, it works. So, I''m getting the manifests from the testing environment, but the functions from live :/ The documentation for custom functions says that the search path for them in $modulepath/<modulename>, and $modulepath is set correctly in puppet.conf (indeed I''m getting the correct manifest files). I imagine I''m missing a config file directive - any pointers? Thanks -- 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.
Dan Bode
2010-Aug-18 16:33 UTC
Re: [Puppet Users] custom functions from a module in a different environment
This feature is not supported until 2.6 (and I have seen some issues with 2.6 http://projects.puppetlabs.com/issues/4409) . I would recommend either: 1. trying your use case with 2.6 2. keep a single copy of your plugins in the puppetmaster''s modulepath. hope this helps, Dan On Wed, Aug 18, 2010 at 3:38 AM, Darren Worrall <iwebdarren@gmail.com>wrote:> Hey folks, > > I have just created a puppet environment called testing by adding the > following to puppet.conf on the puppetmaster: > > [testing] > manifest = /etc/puppet/testing/manifests/site.pp > modulepath = /etc/puppet/testing/modules > > We are collecting all our customisations into a module, lets say > mymodule, and I''m writing a custom function within that, and it lives > in /etc/puppet/testing/modules/mymodule/lib/puppet/parser/functions/ > myfunc.rb > > When call that function, on a host in that environment, puppet throws > an error ( Error 400 on SERVER: Unknown function myfunc at /etc/puppet/ > testing/modules/mymodule/manifests/classes/manifestfile.pp:29 ). If I > copy myfunc.rb to the same location in the live module path, it works. > > So, I''m getting the manifests from the testing environment, but the > functions from live :/ The documentation for custom functions says > that the search path for them in $modulepath/<modulename>, and > $modulepath is set correctly in puppet.conf (indeed I''m getting the > correct manifest files). I imagine I''m missing a config file directive > - any pointers? > > Thanks > > -- > 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<puppet-users%2Bunsubscribe@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.
Darren Worrall
2010-Aug-19 07:55 UTC
[Puppet Users] Re: custom functions from a module in a different environment
Thanks Dan. Are people using 0.25.x clients with a 2.6 master in the wild ok? I''m open to trying 2.6 on the master(s) but maintaining 2.6 agents would be a bridge too far at this stage. On Aug 18, 5:33 pm, Dan Bode <d...@puppetlabs.com> wrote:> This feature is not supported until 2.6 (and I have seen some issues with > 2.6 http://projects.puppetlabs.com/issues/4409) . > > I would recommend either: > > 1. trying your use case with 2.6 > 2. keep a single copy of your plugins in the puppetmaster''s modulepath. > > hope this helps, > > Dan > > On Wed, Aug 18, 2010 at 3:38 AM, Darren Worrall <iwebdar...@gmail.com>wrote: > > > > > Hey folks, > > > I have just created a puppet environment called testing by adding the > > following to puppet.conf on the puppetmaster: > > > [testing] > > manifest = /etc/puppet/testing/manifests/site.pp > > modulepath = /etc/puppet/testing/modules > > > We are collecting all our customisations into a module, lets say > > mymodule, and I''m writing a custom function within that, and it lives > > in /etc/puppet/testing/modules/mymodule/lib/puppet/parser/functions/ > > myfunc.rb > > > When call that function, on a host in that environment, puppet throws > > an error ( Error 400 on SERVER: Unknown function myfunc at /etc/puppet/ > > testing/modules/mymodule/manifests/classes/manifestfile.pp:29 ). If I > > copy myfunc.rb to the same location in the live module path, it works. > > > So, I''m getting the manifests from the testing environment, but the > > functions from live :/ The documentation for custom functions says > > that the search path for them in $modulepath/<modulename>, and > > $modulepath is set correctly in puppet.conf (indeed I''m getting the > > correct manifest files). I imagine I''m missing a config file directive > > - any pointers? > > > Thanks > > > -- > > 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<puppet-users%2Bunsubscribe@google groups.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.
Jason Koppe
2010-Aug-19 13:58 UTC
Re: [Puppet Users] Re: custom functions from a module in a different environment
I''m using 2.6.1rc1 (source from github) for the puppetmaster and 0.25.5 (rpm from epel) for my clients and haven''t noticed any problems. On Thu, Aug 19, 2010 at 2:55 AM, Darren Worrall <iwebdarren@gmail.com>wrote:> Thanks Dan. > > Are people using 0.25.x clients with a 2.6 master in the wild ok? I''m > open to trying 2.6 on the master(s) but maintaining 2.6 agents would > be a bridge too far at this stage. > > On Aug 18, 5:33 pm, Dan Bode <d...@puppetlabs.com> wrote: > > This feature is not supported until 2.6 (and I have seen some issues with > > 2.6 http://projects.puppetlabs.com/issues/4409) . > > > > I would recommend either: > > > > 1. trying your use case with 2.6 > > 2. keep a single copy of your plugins in the puppetmaster''s modulepath. > > > > hope this helps, > > > > Dan > > > > On Wed, Aug 18, 2010 at 3:38 AM, Darren Worrall <iwebdar...@gmail.com > >wrote: > > > > > > > > > Hey folks, > > > > > I have just created a puppet environment called testing by adding the > > > following to puppet.conf on the puppetmaster: > > > > > [testing] > > > manifest = /etc/puppet/testing/manifests/site.pp > > > modulepath = /etc/puppet/testing/modules > > > > > We are collecting all our customisations into a module, lets say > > > mymodule, and I''m writing a custom function within that, and it lives > > > in /etc/puppet/testing/modules/mymodule/lib/puppet/parser/functions/ > > > myfunc.rb > > > > > When call that function, on a host in that environment, puppet throws > > > an error ( Error 400 on SERVER: Unknown function myfunc at /etc/puppet/ > > > testing/modules/mymodule/manifests/classes/manifestfile.pp:29 ). If I > > > copy myfunc.rb to the same location in the live module path, it works. > > > > > So, I''m getting the manifests from the testing environment, but the > > > functions from live :/ The documentation for custom functions says > > > that the search path for them in $modulepath/<modulename>, and > > > $modulepath is set correctly in puppet.conf (indeed I''m getting the > > > correct manifest files). I imagine I''m missing a config file directive > > > - any pointers? > > > > > Thanks > > > > > -- > > > 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<puppet-users%2Bunsubscribe@googlegroups.com> > <puppet-users%2Bunsubscribe@google groups.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<puppet-users%2Bunsubscribe@googlegroups.com> > . > For more options, visit this group at > http://groups.google.com/group/puppet-users?hl=en. > >-- Jason Koppe Jason.Robert.Koppe@gmail.com Cell (210) 445-8242 -- 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.