Hi, I have two issues with my puppet. *1*- When I change the config the service on the agent side implement the configuration change but the restart/reload gets scheduled and after 15 or 20 minutes it is executed, however the agent time to get conffig from server is 180 seconds. Followings are the logs *(/Stage[main]/Nginx/Service[nginx]) Triggered ''refresh'' from 2 events* *Finished catalog run in 1089.33 seconds* * * * * file {"/etc/nginx/": source => "puppet:///files/nginx/nginx/", recurse => true, ensure => "present", require => Package[''nginx''], } The configuration is as follow. service {''nginx'': ensure=>running, restart=> "/etc/init.d/nginx reload", subscribe=>File["/etc/nginx/"], } *2*- And one more issue is if someone opens the file and edit it on the puppet server (if editing takes longer time), then sometimes the .swp file gets copied to puppet agent machine !! Does anyone have the solutions for these problems ! -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.
Sneha More
2013-Sep-24 12:25 UTC
[Puppet Users] Re: Service refresh gets scheduled and swp files
Hi, 1st issue : From the logs, it is clear that there are 2 events which triggers * Service[nginx]. *Means there are 2 files which triggers *Service[nginx] *and when the 2nd file configuration changes are completed, it restart the service. So it may be possible that the second file takes 15-20 minutes after 1st file changes applied. 2nd issue: whenever we edit some file, it creates .swp file in the same folder. So when you are editing the file, which takes long time, and if you execute "puppet agent" on agent before completion of editing, then the swap file gets copied. In your case, have you set "runinterval" in puppet.conf? Because of the runinterval, "puppet agent" gets execute on agent at the interval of "runinterval" As you are transferring the folder "/etc/nginx/", the swap file also gets copied. Solution is : Either increase the "runinterval" so that, "puppet agent" executes after complete editing of file. Or just transfer the files in folder, instead of complete folder. Thanks & Regards, Sneha More, NTT DATA GTS, OSS Center, India (pune) On Tuesday, September 24, 2013 1:32:44 PM UTC+5:30, AAB !! wrote:> > Hi, > I have two issues with my puppet. > *1*- When I change the config the service on the agent side implement the > configuration change but the restart/reload gets scheduled and after 15 or > 20 minutes it is executed, however the agent time to get conffig from > server is 180 seconds. Followings are the logs > *(/Stage[main]/Nginx/Service[nginx]) Triggered ''refresh'' from 2 events* > *Finished catalog run in 1089.33 seconds* > * > * > * > * > file {"/etc/nginx/": > source => "puppet:///files/nginx/nginx/", > recurse => true, > ensure => "present", > require => Package[''nginx''], > } > The configuration is as follow. > service {''nginx'': > ensure=>running, > restart=> "/etc/init.d/nginx reload", > subscribe=>File["/etc/nginx/"], > } > > *2*- And one more issue is if someone opens the file and edit it on the > puppet server (if editing takes longer time), then sometimes the .swp file > gets copied to puppet agent machine !! > Does anyone have the solutions for these problems ! > > > > >-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.
Felix Frank
2013-Sep-24 12:44 UTC
Re: [Puppet Users] Service refresh gets scheduled and swp files
On 09/24/2013 10:02 AM, AAB !! wrote:> *Finished catalog run in 1089.33 seconds*This is excessive. I advise to try and cut down your catalog run time. What''s taking your agent so long? Is your master swamped? The --evaltrace switch to the agent can be helpful in locating time wasters.> *2*- And one more issue is if someone opens the file and edit it on the > puppet server (if editing takes longer time), then sometimes the .swp > file gets copied to puppet agent machine !!What Sneha said: Don''t use recursive directory synchronisation. Failing that, there is an exclude option for the file type to keep puppet from syncing .swp files etc., you have to find a fitting expression though. HTH, Felix -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.
AAB !!
2013-Sep-24 12:52 UTC
[Puppet Users] Re: Service refresh gets scheduled and swp files
Thanks for reply ! Could you/anyone tell me if a file gets deleted on the puppet master why does it still appear on the puppet agent, only this delete operation doesn''t seems be executing !! Any ideas ? On Tuesday, September 24, 2013 10:02:44 AM UTC+2, AAB !! wrote:> > Hi, > I have two issues with my puppet. > *1*- When I change the config the service on the agent side implement the > configuration change but the restart/reload gets scheduled and after 15 or > 20 minutes it is executed, however the agent time to get conffig from > server is 180 seconds. Followings are the logs > *(/Stage[main]/Nginx/Service[nginx]) Triggered ''refresh'' from 2 events* > *Finished catalog run in 1089.33 seconds* > * > * > * > * > file {"/etc/nginx/": > source => "puppet:///files/nginx/nginx/", > recurse => true, > ensure => "present", > require => Package[''nginx''], > } > The configuration is as follow. > service {''nginx'': > ensure=>running, > restart=> "/etc/init.d/nginx reload", > subscribe=>File["/etc/nginx/"], > } > > *2*- And one more issue is if someone opens the file and edit it on the > puppet server (if editing takes longer time), then sometimes the .swp file > gets copied to puppet agent machine !! > Does anyone have the solutions for these problems ! > > > > >-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.
Sneha More
2013-Sep-25 06:25 UTC
Re: [Puppet Users] Re: Service refresh gets scheduled and swp files
Hi, Add purge => true in your file resouce. You can try this :-> file {"/etc/nginx/": source => "puppet:///files/nginx/nginx/", ensure => "directory", recurse => true, purge => true, require => Package[''nginx''], } This will manage the deletion of files on client if you delete file on server. Thanks & Regards, Sneha More, NTT DATA GTS, OSS Center, India (Pune). On Tue, Sep 24, 2013 at 6:22 PM, AAB !! <adeelarifbhatti@gmail.com> wrote:> Thanks for reply ! > Could you/anyone tell me if a file gets deleted on the puppet master why > does it still appear on the puppet agent, only this delete operation > doesn''t seems be executing !! > Any ideas ? > > > On Tuesday, September 24, 2013 10:02:44 AM UTC+2, AAB !! wrote: > >> Hi, >> I have two issues with my puppet. >> *1*- When I change the config the service on the agent side implement >> the configuration change but the restart/reload gets scheduled and after 15 >> or 20 minutes it is executed, however the agent time to get conffig from >> server is 180 seconds. Followings are the logs >> *(/Stage[main]/Nginx/Service[nginx]) Triggered ''refresh'' from 2 events* >> *Finished catalog run in 1089.33 seconds* >> * >> * >> * >> * >> file {"/etc/nginx/": >> source => "puppet:///files/nginx/nginx/"**, >> recurse => true, >> ensure => "present", >> require => Package[''nginx''], >> } >> The configuration is as follow. >> service {''nginx'': >> ensure=>running, >> restart=> "/etc/init.d/nginx reload", >> subscribe=>File["/etc/nginx/"]**, >> } >> >> *2*- And one more issue is if someone opens the file and edit it on the >> puppet server (if editing takes longer time), then sometimes the .swp file >> gets copied to puppet agent machine !! >> Does anyone have the solutions for these problems ! >> >> >> >> >> -- > You received this message because you are subscribed to a topic in the > Google Groups "Puppet Users" group. > To unsubscribe from this topic, visit > https://groups.google.com/d/topic/puppet-users/MSY0039f1pc/unsubscribe. > To unsubscribe from this group and all its topics, send an email to > puppet-users+unsubscribe@googlegroups.com. > To post to this group, send email to puppet-users@googlegroups.com. > Visit this group at http://groups.google.com/group/puppet-users. > For more options, visit https://groups.google.com/groups/opt_out. >-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.
AAB !!
2013-Sep-27 10:30 UTC
Re: [Puppet Users] Re: Service refresh gets scheduled and swp files
Hi, My both problems have been solved. I instead of using the pessenger services started using the *WEBrick web services*. When I stopped the *puppetmaster service and started the apache2 service (port 8140)* things went like rocket !! Second issue with the .swp file went away when I added the following parameter, *ignore => ".*.swp",* On Wednesday, September 25, 2013 8:25:58 AM UTC+2, Sneha More wrote:> > Hi, > Add purge => true in your file resouce. > You can try this :-> > file {"/etc/nginx/": > source => "puppet:///files/nginx/nginx/", > ensure => "directory", > recurse => true, > purge => true, > require => Package[''nginx''], > } > This will manage the deletion of files on client if you delete file on > server. > > Thanks & Regards, > Sneha More, > NTT DATA GTS, OSS Center, India (Pune). > > > On Tue, Sep 24, 2013 at 6:22 PM, AAB !! <adeelar...@gmail.com<javascript:> > > wrote: > >> Thanks for reply ! >> Could you/anyone tell me if a file gets deleted on the puppet master why >> does it still appear on the puppet agent, only this delete operation >> doesn''t seems be executing !! >> Any ideas ? >> >> >> On Tuesday, September 24, 2013 10:02:44 AM UTC+2, AAB !! wrote: >> >>> Hi, >>> I have two issues with my puppet. >>> *1*- When I change the config the service on the agent side implement >>> the configuration change but the restart/reload gets scheduled and after 15 >>> or 20 minutes it is executed, however the agent time to get conffig from >>> server is 180 seconds. Followings are the logs >>> *(/Stage[main]/Nginx/Service[nginx]) Triggered ''refresh'' from 2 events* >>> *Finished catalog run in 1089.33 seconds* >>> * >>> * >>> * >>> * >>> file {"/etc/nginx/": >>> source => "puppet:///files/nginx/nginx/"**, >>> recurse => true, >>> ensure => "present", >>> require => Package[''nginx''], >>> } >>> The configuration is as follow. >>> service {''nginx'': >>> ensure=>running, >>> restart=> "/etc/init.d/nginx reload", >>> subscribe=>File["/etc/nginx/"]**, >>> } >>> >>> *2*- And one more issue is if someone opens the file and edit it on the >>> puppet server (if editing takes longer time), then sometimes the .swp file >>> gets copied to puppet agent machine !! >>> Does anyone have the solutions for these problems ! >>> >>> >>> >>> >>> -- >> You received this message because you are subscribed to a topic in the >> Google Groups "Puppet Users" group. >> To unsubscribe from this topic, visit >> https://groups.google.com/d/topic/puppet-users/MSY0039f1pc/unsubscribe. >> To unsubscribe from this group and all its topics, send an email to >> puppet-users...@googlegroups.com <javascript:>. >> To post to this group, send email to puppet...@googlegroups.com<javascript:> >> . >> Visit this group at http://groups.google.com/group/puppet-users. >> For more options, visit https://groups.google.com/groups/opt_out. >> > >-- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users. For more options, visit https://groups.google.com/groups/opt_out.