Hi, We''ve got our puppetmaster under puppet control and our /etc/puppet dir tucked safely away in Mercurial. With the help of the vcsrepo module we''re automatically pulling the latest changes from /etc/puppet giving us a nice little cycle (only checked-in stuff can be deployed!). However, there''s a delay of one run between changes (as the repo gets updated but the current run is still under the old config). Is there anyway of getting puppet to rerun with the new config when the repo changes? Has anyone else done this and have any good suggestions? Thanks in advance PGM -- 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/26/2011 01:16 PM, JupiterMoonBeam wrote:> Hi, > > We''ve got our puppetmaster under puppet control and our /etc/puppet > dir tucked safely away in Mercurial. > > With the help of the vcsrepo module we''re automatically pulling the > latest changes from /etc/puppet giving us a nice little cycle (only > checked-in stuff can be deployed!). > > However, there''s a delay of one run between changes (as the repo gets > updated but the current run is still under the old config). Is there > anyway of getting puppet to rerun with the new config when the repo > changes? > > Has anyone else done this and have any good suggestions?I''ve used an exec of "echo puppetd --test | at now+2min" to a similar end. You really want to let some time pass so that the next run won''t trip over the current run''s lock. HTH, 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.
Last job I ran puppet from cron via a wrapper script to allow more inteligent pre and post actions. In your case I would probably have the vcsrepo trigger a refreshonly exec to create a flag file on disk. Then your wrapper can remove the flag and reinvoke puppet to collect the latest round of changes. That may never exit, if your check-ins are fast enough, but should at least try. Inside puppet, though, it isn''t possible. By the time the vcsrepo is running the client is all done with talking to the master, and another full run is needed to see any catalog changes - they were fully calculated out before the run even started. Regards, Daniel -- Puppet Labs Developer –http://puppetlabs.com Daniel Pittman <daniel@puppetlabs.com> Contact me via gtalk, email, or phone: +1 (877) 575-9775 Sent from a mobile device. Please forgive me if this is briefer than usual. On Jan 26, 2011 7:09 AM, "Felix Frank" <felix.frank@alumni.tu-berlin.de> wrote:> On 01/26/2011 01:16 PM, JupiterMoonBeam wrote: >> Hi, >> >> We''ve got our puppetmaster under puppet control and our /etc/puppet >> dir tucked safely away in Mercurial. >> >> With the help of the vcsrepo module we''re automatically pulling the >> latest changes from /etc/puppet giving us a nice little cycle (only >> checked-in stuff can be deployed!). >> >> However, there''s a delay of one run between changes (as the repo gets >> updated but the current run is still under the old config). Is there >> anyway of getting puppet to rerun with the new config when the repo >> changes? >> >> Has anyone else done this and have any good suggestions? > > I''ve used an exec of "echo puppetd --test | at now+2min" to a similar end. > You really want to let some time pass so that the next run won''t trip > over the current run''s lock. > > HTH, > 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 topuppet-users+unsubscribe@googlegroups.com<puppet-users%2Bunsubscribe@googlegroups.com> .> For more options, visit this group athttp://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.
On Jan 26, 4:16 am, JupiterMoonBeam <jupitermoonb...@googlemail.com> wrote:> However, there''s a delay of one run between changes (as the repo gets > updated but the current run is still under the old config). Is there > anyway of getting puppet to rerun with the new config when the repo > changes?As Daniel mentioned it isn''t possible to apply that new information inside the current catalog. However you may be able to fake it. Are you running puppet agent as a daemon or a cronjob? If it''s resident as a service you can signal puppet to restart itself: vcsrepo { ''puppet-production'': notify => Service[''puppet''] } As I recall it will exit part way through the current run, restart, request a new catalog, and run 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.