Hi, Today, while working on some functions in Puppet, I got back lots of unexpected results. Lots of times, it seemed like my changes in the code were not picked up when I re-ran the test-classes. Even functions that I removed from the code, after using them once or so, kept working after removal, until.. I restarted the puppetmaster. Is is necessary to restart the puppetmaster after making changes in functions? I have been following http://projects.puppetlabs.com/projects/1/wiki/Writing_Your_Own_Functions. I read "it’ll be loaded by the Puppetmaster when you first use that function.". That, I can confirm, but is it REloaded, ever? The functions live in a module, in modules/mymodule/lib/puppet/parser/functions/ Everytime I do a catalog run on a test client, I see the diffs in the code passing on the screen after "info: Retrieving plugin", but the puppetmaster doesn''t seem to pick up. I run Puppet 2.6.1. Best regards, Martijn. -- 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.
Hello, You also have to put the function in the right place on the server, not just in: modules/mymodule/lib/puppet/parser/functions/ Try putting it in: /var/puppet/lib/puppet/parser/functions/ as well. At least this is what was required in 0.25.1 :) Regards, -Roy On 11/30/10 6:43 AM, Martijn Grendelman wrote:> Hi, > > Today, while working on some functions in Puppet, I got back lots of > unexpected results. Lots of times, it seemed like my changes in the code > were not picked up when I re-ran the test-classes. > > Even functions that I removed from the code, after using them once or so, > kept working after removal, until.. I restarted the puppetmaster. > > Is is necessary to restart the puppetmaster after making changes in functions? > > I have been following > http://projects.puppetlabs.com/projects/1/wiki/Writing_Your_Own_Functions. > I read "it’ll be loaded by the Puppetmaster when you first use that > function.". That, I can confirm, but is it REloaded, ever? > > The functions live in a module, in > modules/mymodule/lib/puppet/parser/functions/ > > Everytime I do a catalog run on a test client, I see the diffs in the code > passing on the screen after "info: Retrieving plugin", but the > puppetmaster doesn''t seem to pick up. > > I run Puppet 2.6.1. > > Best regards, > Martijn. >-- 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 01-12-10 01:19, Roy Nielsen wrote:> You also have to put the function in the right place on the server, not > just in: > > modules/mymodule/lib/puppet/parser/functions/ > > Try putting it in: > /var/puppet/lib/puppet/parser/functions/ > > as well. At least this is what was required in 0.25.1 :)No, that doesn''t seem to be necessary with 2.6.1, at least not to get the function loaded /initially/. Perhaps it helps to copy the file there once it is changed, it didn''t try that. Reloading the Puppetmaster solves the problem, I was just wondering if that is expected, or if it could be a bug. Best regards, Martijn.> On 11/30/10 6:43 AM, Martijn Grendelman wrote: >> Hi, >> >> Today, while working on some functions in Puppet, I got back lots of >> unexpected results. Lots of times, it seemed like my changes in the code >> were not picked up when I re-ran the test-classes. >> >> Even functions that I removed from the code, after using them once or so, >> kept working after removal, until.. I restarted the puppetmaster. >> >> Is is necessary to restart the puppetmaster after making changes in >> functions? >> >> I have been following >> http://projects.puppetlabs.com/projects/1/wiki/Writing_Your_Own_Functions. >> >> I read "it’ll be loaded by the Puppetmaster when you first use that >> function.". That, I can confirm, but is it REloaded, ever? >> >> The functions live in a module, in >> modules/mymodule/lib/puppet/parser/functions/ >> >> Everytime I do a catalog run on a test client, I see the diffs in the >> code >> passing on the screen after "info: Retrieving plugin", but the >> puppetmaster doesn''t seem to pick up. >> >> I run Puppet 2.6.1. >> >> Best regards, >> Martijn. >> >-- 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.
Martijn, How are you running puppet master - is it via Passenger and Apache? I have noticed some caching going on with the 2.6 branch where I make changes to manifests and those changes don''t propagate immediately. Usualy, a reload of Apache (and thus restarting the puppet master - we use Passenger 2.2.11) fixes these issues for me. Is this issue limited to functions being loaded or do you have this problem with manifest changes too? Unfortunately, I''ve not done enough troubleshooting to narrow down the cause. I don''t know if these issues are related, but thought I would suggest it. -Gary On Wed, Dec 1, 2010 at 7:33 AM, Martijn Grendelman <martijn@iphion.nl>wrote:> On 01-12-10 01:19, Roy Nielsen wrote: > > You also have to put the function in the right place on the server, not > > just in: > > > > modules/mymodule/lib/puppet/parser/functions/ > > > > Try putting it in: > > /var/puppet/lib/puppet/parser/functions/ > > > > as well. At least this is what was required in 0.25.1 :) > > No, that doesn''t seem to be necessary with 2.6.1, at least not to get the > function loaded /initially/. Perhaps it helps to copy the file there once > it is changed, it didn''t try that. Reloading the Puppetmaster solves the > problem, I was just wondering if that is expected, or if it could be a bug. > > Best regards, > Martijn. > > > > > > > On 11/30/10 6:43 AM, Martijn Grendelman wrote: > >> Hi, > >> > >> Today, while working on some functions in Puppet, I got back lots of > >> unexpected results. Lots of times, it seemed like my changes in the code > >> were not picked up when I re-ran the test-classes. > >> > >> Even functions that I removed from the code, after using them once or > so, > >> kept working after removal, until.. I restarted the puppetmaster. > >> > >> Is is necessary to restart the puppetmaster after making changes in > >> functions? > >> > >> I have been following > >> > http://projects.puppetlabs.com/projects/1/wiki/Writing_Your_Own_Functions. > >> > >> I read "it’ll be loaded by the Puppetmaster when you first use that > >> function.". That, I can confirm, but is it REloaded, ever? > >> > >> The functions live in a module, in > >> modules/mymodule/lib/puppet/parser/functions/ > >> > >> Everytime I do a catalog run on a test client, I see the diffs in the > >> code > >> passing on the screen after "info: Retrieving plugin", but the > >> puppetmaster doesn''t seem to pick up. > >> > >> I run Puppet 2.6.1. > >> > >> Best regards, > >> Martijn. > >> > > > > -- > 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.
More likely just adding usecacheonfailure = false to the [puppetd] stanza in /etc/puppet/puppet.conf will help. On 01/12/2010 12:40, Gary Larizza wrote:> Martijn, > > How are you running puppet master - is it via Passenger and Apache? I > have noticed some caching going on with the 2.6 branch where I make > changes to manifests and those changes don''t propagate immediately. > Usualy, a reload of Apache (and thus restarting the puppet master - > we use Passenger 2.2.11) fixes these issues for me. Is this issue > limited to functions being loaded or do you have this problem with > manifest changes too? Unfortunately, I''ve not done enough > troubleshooting to narrow down the cause. I don''t know if these > issues are related, but thought I would suggest it. > > -Gary > > On Wed, Dec 1, 2010 at 7:33 AM, Martijn Grendelman <martijn@iphion.nl > <mailto:martijn@iphion.nl>> wrote: > > On 01-12-10 01:19, Roy Nielsen wrote: > > You also have to put the function in the right place on the > server, not > > just in: > > > > modules/mymodule/lib/puppet/parser/functions/ > > > > Try putting it in: > > /var/puppet/lib/puppet/parser/functions/ > > > > as well. At least this is what was required in 0.25.1 :) > > No, that doesn''t seem to be necessary with 2.6.1, at least not to > get the > function loaded /initially/. Perhaps it helps to copy the file > there once > it is changed, it didn''t try that. Reloading the Puppetmaster > solves the > problem, I was just wondering if that is expected, or if it could > be a bug. > > Best regards, > Martijn. > > > > > > > On 11/30/10 6:43 AM, Martijn Grendelman wrote: > >> Hi, > >> > >> Today, while working on some functions in Puppet, I got back > lots of > >> unexpected results. Lots of times, it seemed like my changes in > the code > >> were not picked up when I re-ran the test-classes. > >> > >> Even functions that I removed from the code, after using them > once or so, > >> kept working after removal, until.. I restarted the puppetmaster. > >> > >> Is is necessary to restart the puppetmaster after making changes in > >> functions? > >> > >> I have been following > >> > http://projects.puppetlabs.com/projects/1/wiki/Writing_Your_Own_Functions. > >> > >> I read "it’ll be loaded by the Puppetmaster when you first use that > >> function.". That, I can confirm, but is it REloaded, ever? > >> > >> The functions live in a module, in > >> modules/mymodule/lib/puppet/parser/functions/ > >> > >> Everytime I do a catalog run on a test client, I see the diffs > in the > >> code > >> passing on the screen after "info: Retrieving plugin", but the > >> puppetmaster doesn''t seem to pick up. > >> > >> I run Puppet 2.6.1. > >> > >> Best regards, > >> Martijn. > >> > > > > -- > 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 > <mailto:puppet-users@googlegroups.com>. > To unsubscribe from this group, send email to > puppet-users+unsubscribe@googlegroups.com > <mailto: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.-- Trevor Hemsley Infrastructure Engineer ................................................. *C A L Y P S O * Brighton, UK OFFICE +44 (0) 1273 666 350 FAX +44 (0) 1273 666 351 ................................................. www.calypso.com This electronic-mail might contain confidential information intended only for the use by the entity named. If the reader of this message is not the intended recipient, the reader is hereby notified that any dissemination, distribution or copying is strictly prohibited. *P * /*/Please consider the environment before printing this e-mail /*/ -- 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 01-12-10 13:40, Gary Larizza wrote:> How are you running puppet master - is it via Passenger and Apache? I > have noticed some caching going on with the 2.6 branch where I make > changes to manifests and those changes don''t propagate immediately. > Usualy, a reload of Apache (and thus restarting the puppet master - we > use Passenger 2.2.11) fixes these issues for me.We run Puppet as a Mongrel server, however only in production, and the issues I had were on our test server, which runs puppetmaster stand-alone.> Is this issue limited > to functions being loaded or do you have this problem with manifest > changes too? Unfortunately, I''ve not done enough troubleshooting to > narrow down the cause. I don''t know if these issues are related, but > thought I would suggest it.Thanks, Martijn.> On Wed, Dec 1, 2010 at 7:33 AM, Martijn Grendelman <martijn@iphion.nl > <mailto:martijn@iphion.nl>> wrote: > > On 01-12-10 01:19, Roy Nielsen wrote: > > You also have to put the function in the right place on the > server, not > > just in: > > > > modules/mymodule/lib/puppet/parser/functions/ > > > > Try putting it in: > > /var/puppet/lib/puppet/parser/functions/ > > > > as well. At least this is what was required in 0.25.1 :) > > No, that doesn''t seem to be necessary with 2.6.1, at least not to > get the > function loaded /initially/. Perhaps it helps to copy the file there > once > it is changed, it didn''t try that. Reloading the Puppetmaster solves the > problem, I was just wondering if that is expected, or if it could be > a bug. > > Best regards, > Martijn. > > > > > > > On 11/30/10 6:43 AM, Martijn Grendelman wrote: > >> Hi, > >> > >> Today, while working on some functions in Puppet, I got back lots of > >> unexpected results. Lots of times, it seemed like my changes in > the code > >> were not picked up when I re-ran the test-classes. > >> > >> Even functions that I removed from the code, after using them > once or so, > >> kept working after removal, until.. I restarted the puppetmaster. > >> > >> Is is necessary to restart the puppetmaster after making changes in > >> functions? > >> > >> I have been following > >> > http://projects.puppetlabs.com/projects/1/wiki/Writing_Your_Own_Functions. > >> > >> I read "it’ll be loaded by the Puppetmaster when you first use that > >> function.". That, I can confirm, but is it REloaded, ever? > >> > >> The functions live in a module, in > >> modules/mymodule/lib/puppet/parser/functions/ > >> > >> Everytime I do a catalog run on a test client, I see the diffs in the > >> code > >> passing on the screen after "info: Retrieving plugin", but the > >> puppetmaster doesn''t seem to pick up. > >> > >> I run Puppet 2.6.1. > >> > >> Best regards, > >> Martijn. > >> > > > > -- > 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 > <mailto:puppet-users@googlegroups.com>. > To unsubscribe from this group, send email to > puppet-users+unsubscribe@googlegroups.com > <mailto: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.-- 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 Trevor,> More likely just adding > > usecacheonfailure = false > > to the [puppetd] stanza in /etc/puppet/puppet.conf will help.I am yet unfamiliar with that option, but just as a remark, there was really no ''failure'' involved here, it was just that enhancements to my code weren''t picked up, and Puppet was running an older incantation of my function. Best regards, Martijn. -- 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 01/12/2010 14:53, Martijn Grendelman wrote:> Hi Trevor, >> More likely just adding >> >> usecacheonfailure = false >> >> to the [puppetd] stanza in /etc/puppet/puppet.conf will help. > I am yet unfamiliar with that option, but just as a remark, there was > really no ''failure'' involved here, it was just that enhancements to my > code weren''t picked up, and Puppet was running an older incantation of my > function.I have often made a ''simple'' change to one of my manifests that results in a syntax error. Without that option, puppet helpfully ignores the error and presents the older version of the manifest to you resulting in exactly the symptoms you are complaining about. -- Trevor Hemsley Infrastructure Engineer ................................................. *C A L Y P S O * Brighton, UK OFFICE +44 (0) 1273 666 350 FAX +44 (0) 1273 666 351 ................................................. www.calypso.com This electronic-mail might contain confidential information intended only for the use by the entity named. If the reader of this message is not the intended recipient, the reader is hereby notified that any dissemination, distribution or copying is strictly prohibited. *P * /*/Please consider the environment before printing this e-mail /*/ -- 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 1 December 2010 20:34, Trevor Hemsley <trevor.hemsley@codefarm.com> wrote:> > On 01/12/2010 14:53, Martijn Grendelman wrote: > > Hi Trevor, > > More likely just adding > > usecacheonfailure = false > > to the [puppetd] stanza in /etc/puppet/puppet.conf will help. > > I am yet unfamiliar with that option, but just as a remark, there was > really no ''failure'' involved here, it was just that enhancements to my > code weren''t picked up, and Puppet was running an older incantation of my > function. > > I have often made a ''simple'' change to one of my manifests that results in a syntax error. Without that option, puppet helpfully ignores the error and presents the older version of the manifest to you resulting in exactly the symptoms you are complaining about. > > --Why not use a pre-commit syntax check hook (in case you''re using SVN/Git too? -Naresh V. -- 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 12/01/2010 04:04 PM, Trevor Hemsley wrote:> On 01/12/2010 14:53, Martijn Grendelman wrote: >> Hi Trevor, >>> More likely just adding >>> >>> usecacheonfailure = false >>> >>> to the [puppetd] stanza in /etc/puppet/puppet.conf will help. >> I am yet unfamiliar with that option, but just as a remark, there was >> really no ''failure'' involved here, it was just that enhancements to my >> code weren''t picked up, and Puppet was running an older incantation of my >> function. > > I have often made a ''simple'' change to one of my manifests that results > in a syntax error. Without that option, puppet helpfully ignores the > error and presents the older version of the manifest to you resulting in > exactly the symptoms you are complaining about.I don''t believe this is accurate. On syntax error, the puppetmaster cannot compose a catalogue. Puppetd will per default use its cached catalogue then. This happens on the client node, the master is unaware of this. When running puppetd --test, nousecacheonfailure is implied. Again, settings that apply to puppetd are *not* going to have an impact on puppetmaster behaviour. The original problem sounds like a bug to me. Regards, Felix -- 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.