Hi,
I am trying to cleanup the puppet reports on the master by puppet itself using
the tidy type however want to run it once a day not every 30 minutes. I would
expect following code does the trick:
schedule { daily:
period => daily,
}
tidy { "/var/lib/puppet/reports":
age => "1w",
recurse => true,
matches => "*.yaml",
schedule => daily
}
however it runs still every 30 minutes and I am getting huge report of tidied
logs every half an hour.
what am I doing wrong? how can I change the scheduler for this job to be run
only once a day?
thanks Antony.
--
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 Fri, Jan 21, 2011 at 7:49 AM, Antony Mayi <antonymayi@yahoo.com> wrote:> Hi, > I am trying to cleanup the puppet reports on the master by puppet itself > using the tidy type however want to run it once a day not every 30 minutes. > I would expect following code does the trick: > schedule { daily: > period => daily, > } > tidy { "/var/lib/puppet/reports": > age => "1w", > recurse => true, > matches => "*.yaml", > schedule => daily > } > however it runs still every 30 minutes and I am getting huge report of > tidied logs every half an hour. > what am I doing wrong? how can I change the scheduler for this job to be run > only once a day?Schedule daily appears to be something that''s already defined in puppet, so I would use a different title. Do you get a log of the event in your state.yaml? For example: schedule { once: period => daily, } exec { "/bin/date > /tmp/time": schedule => once, } /var/lib/puppet/state/state.yaml: "Exec[/usr/bin/date > /tmp/time]": !ruby/sym checked: 2011-01-21 20:23:33.869328 -05:00 !ruby/sym synced: 2011-01-21 20:23:33.870815 -05:00 So in your case, you should have something along the line of: "Tidy[/var/lib/puppet/reports]": !ruby/sym checked: 2011-01-21 20:33:17.927550 -05:00 Thanks, Nan -- 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 Nan,
thanks. I have removed the schedule (re)definition but it does still the same -
the tidy is called on every run (every 30 minutes). the state.yaml after a
typical run has following records:
* puppet log:
Jan 24 10:37:32 puppet puppet-agent[24504]:
(/Stage[main]/Puppet::Master/Tidy[/var/lib/puppet/reports]) Tidying
File[/var/lib/puppet/reports/puppet/201101171031.yaml]
Jan 24 10:37:32 puppet puppet-agent[24504]:
(/Stage[main]/Puppet::Master/Tidy[/var/lib/puppet/reports]) Tidying
File[/var/lib/puppet/reports/server1/201101171032.yaml]
Jan 24 10:37:32 puppet puppet-agent[24504]:
(/Stage[main]/Puppet::Master/Tidy[/var/lib/puppet/reports]) Tidying
File[/var/lib/puppet/reports/server2/201101171035.yaml]
Jan 24 10:37:33 puppet puppet-agent[24504]:
(/File[/var/lib/puppet/reports/server1/201101171032.yaml]/ensure) removed
Jan 24 10:37:36 puppet puppet-agent[24504]:
(/File[/var/lib/puppet/reports/puppet/201101171031.yaml]/ensure) removed
Jan 24 10:37:36 puppet puppet-agent[24504]:
(/File[/var/lib/puppet/reports/server2/201101171035.yaml]/ensure) removed
* state.yaml:
"Tidy[/var/lib/puppet/reports]":
!ruby/sym checked: 2011-01-24 00:49:51.861210 +00:00
"File[/var/lib/puppet/reports/puppet/201101171031.yaml]":
!ruby/sym synced: 2011-01-24 10:37:36.589507 +00:00
!ruby/sym checked: 2011-01-24 10:37:36.583191 +00:00
"File[/var/lib/puppet/reports/server1/201101171032.yaml]":
!ruby/sym synced: 2011-01-24 10:37:33.482278 +00:00
!ruby/sym checked: 2011-01-24 10:37:33.476454 +00:00
"File[/var/lib/puppet/reports/server2/201101171035.yaml]":
!ruby/sym synced: 2011-01-24 10:37:36.737558 +00:00
!ruby/sym checked: 2011-01-24 10:37:36.730387 +00:00
so as I understand it the state.yaml file says the Tidy[/var/lib/puppet/reports]
was run at 00:49 so I would expect it won''t be called this day again
but as the
logs show several files are tidied on each run anyway.
what''s wrong?
thanks Antony.
________________________________
From: Nan Liu <nan@puppetlabs.com>
To: puppet-users@googlegroups.com
Sent: Fri, 21 January, 2011 18:08:24
Subject: Re: [Puppet Users] scheduler problem?
On Fri, Jan 21, 2011 at 7:49 AM, Antony Mayi <antonymayi@yahoo.com>
wrote:> Hi,
> I am trying to cleanup the puppet reports on the master by puppet itself
> using the tidy type however want to run it once a day not every 30 minutes.
> I would expect following code does the trick:
> schedule { daily:
> period => daily,
> }
> tidy { "/var/lib/puppet/reports":
> age => "1w",
> recurse => true,
> matches => "*.yaml",
> schedule => daily
> }
> however it runs still every 30 minutes and I am getting huge report of
> tidied logs every half an hour.
> what am I doing wrong? how can I change the scheduler for this job to be
run
> only once a day?
Schedule daily appears to be something that''s already defined in
puppet, so I would use a different title.
Do you get a log of the event in your state.yaml? For example:
schedule {
once:
period => daily,
}
exec {
"/bin/date > /tmp/time":
schedule => once,
}
/var/lib/puppet/state/state.yaml:
"Exec[/usr/bin/date > /tmp/time]":
!ruby/sym checked: 2011-01-21 20:23:33.869328 -05:00
!ruby/sym synced: 2011-01-21 20:23:33.870815 -05:00
So in your case, you should have something along the line of:
"Tidy[/var/lib/puppet/reports]":
!ruby/sym checked: 2011-01-21 20:33:17.927550 -05:00
Thanks,
Nan
--
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.
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Can you try it with a different type, say a sample ''notify'' statement? Tidy appears to have some magic going on at times. I just noticed that it *appears* to be run before anything else, even in the pre-stage but that could be a fluke in my setup. Trevor On 01/24/2011 06:29 AM, Antony Mayi wrote:> Hi Nan, > > thanks. I have removed the schedule (re)definition but it does still the > same - the tidy is called on every run (every 30 minutes). the > state.yaml after a typical run has following records: > > * puppet log: > > Jan 24 10:37:32 puppet puppet-agent[24504]: > (/Stage[main]/Puppet::Master/Tidy[/var/lib/puppet/reports]) Tidying > File[/var/lib/puppet/reports/puppet/201101171031.yaml] > Jan 24 10:37:32 puppet puppet-agent[24504]: > (/Stage[main]/Puppet::Master/Tidy[/var/lib/puppet/reports]) Tidying > File[/var/lib/puppet/reports/server1/201101171032.yaml] > Jan 24 10:37:32 puppet puppet-agent[24504]: > (/Stage[main]/Puppet::Master/Tidy[/var/lib/puppet/reports]) Tidying > File[/var/lib/puppet/reports/server2/201101171035.yaml] > Jan 24 10:37:33 puppet puppet-agent[24504]: > (/File[/var/lib/puppet/reports/server1/201101171032.yaml]/ensure) removed > Jan 24 10:37:36 puppet puppet-agent[24504]: > (/File[/var/lib/puppet/reports/puppet/201101171031.yaml]/ensure) removed > Jan 24 10:37:36 puppet puppet-agent[24504]: > (/File[/var/lib/puppet/reports/server2/201101171035.yaml]/ensure) removed > > * state.yaml: > > "Tidy[/var/lib/puppet/reports]": > !ruby/sym checked: 2011-01-24 00:49:51.861210 +00:00 > "File[/var/lib/puppet/reports/puppet/201101171031.yaml]": > !ruby/sym synced: 2011-01-24 10:37:36.589507 +00:00 > !ruby/sym checked: 2011-01-24 10:37:36.583191 +00:00 > "File[/var/lib/puppet/reports/server1/201101171032.yaml]": > !ruby/sym synced: 2011-01-24 10:37:33.482278 +00:00 > !ruby/sym checked: 2011-01-24 10:37:33.476454 +00:00 > "File[/var/lib/puppet/reports/server2/201101171035.yaml]": > !ruby/sym synced: 2011-01-24 10:37:36.737558 +00:00 > !ruby/sym checked: 2011-01-24 10:37:36.730387 +00:00 > > so as I understand it the state.yaml file says the > Tidy[/var/lib/puppet/reports] was run at 00:49 so I would expect it > won''t be called this day again but as the logs show several files are > tidied on each run anyway. > > what''s wrong? > > thanks Antony. > > ------------------------------------------------------------------------ > *From:* Nan Liu <nan@puppetlabs.com> > *To:* puppet-users@googlegroups.com > *Sent:* Fri, 21 January, 2011 18:08:24 > *Subject:* Re: [Puppet Users] scheduler problem? > > On Fri, Jan 21, 2011 at 7:49 AM, Antony Mayi <antonymayi@yahoo.com > <mailto:antonymayi@yahoo.com>> wrote: >> Hi, >> I am trying to cleanup the puppet reports on the master by puppet itself >> using the tidy type however want to run it once a day not every 30 > minutes. >> I would expect following code does the trick: >> schedule { daily: >> period => daily, >> } >> tidy { "/var/lib/puppet/reports": >> age => "1w", >> recurse => true, >> matches => "*.yaml", >> schedule => daily >> } >> however it runs still every 30 minutes and I am getting huge report of >> tidied logs every half an hour. >> what am I doing wrong? how can I change the scheduler for this job to > be run >> only once a day? > > Schedule daily appears to be something that''s already defined in > puppet, so I would use a different title. > > Do you get a log of the event in your state.yaml? For example: > > schedule { > once: > period => daily, > } > > exec { > "/bin/date > /tmp/time": > schedule => once, > } > > /var/lib/puppet/state/state.yaml: > "Exec[/usr/bin/date > /tmp/time]": > !ruby/sym checked: 2011-01-21 20:23:33.869328 -05:00 > !ruby/sym synced: 2011-01-21 20:23:33.870815 -05:00 > > So in your case, you should have something along the line of: > "Tidy[/var/lib/puppet/reports]": > !ruby/sym checked: 2011-01-21 20:33:17.927550 -05:00 > > Thanks, > > Nan > > -- > 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: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.- -- Trevor Vaughan Vice President, Onyx Point, Inc. email: tvaughan@onyxpoint.com phone: 410-541-ONYX (6699) pgp: 0x6C701E94 - -- This account not approved for unencrypted sensitive information -- -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iQEcBAEBAgAGBQJNPWpUAAoJECNCGV1OLcypAbwH/3JYreanClJ5kODM9//SYOeJ oUP0OQXYrmCENWSBRYp7zMNNM3Fl/e+ws5QZMq5dYm1pjFd7ARndv5l5/eGgY9Ma jSy5EdrqYHetqQgjmSZv39dqdsf+W0QDcVu1cNWZRM7RiHSacj2UMT1y0kfL4juQ 1esvreXILX1cgvBEbgc8xoLv088hoinshxbBAjl4dbgGs9j0Rpj+q6g95mW9vqiL ZkDFRO9B+rC5eu+MMOm9iwou44o19+r6XBwU8v1HGqFTZHxiCY1P8R8QgGoIDaCG +qVCWljAY+5VsXv+DGpVYjPETN2EkzWB7qxzQltCrNoF8Y6poJvqB8F2X6kpeWY=x0NX -----END PGP SIGNATURE----- -- 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.
good hint - it does work for notify - eg:
notify { "test": message => "TEST TEST TEST", schedule
=> daily }
tidy { "/var/lib/puppet/reports":
age => "1w",
recurse => true,
matches => "*.yaml",
schedule => daily
}
the notify is executed only once but tidy still during each run.
is this a bug or a feature? if a bug, is it fixed in some recent version?
thanks, Antony.
________________________________
From: Trevor Vaughan <tvaughan@onyxpoint.com>
To: puppet-users@googlegroups.com
Cc: Antony Mayi <antonymayi@yahoo.com>
Sent: Mon, 24 January, 2011 12:02:28
Subject: Re: [Puppet Users] scheduler problem?
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Can you try it with a different type, say a sample ''notify''
statement?
Tidy appears to have some magic going on at times. I just noticed that
it *appears* to be run before anything else, even in the pre-stage but
that could be a fluke in my setup.
Trevor
On 01/24/2011 06:29 AM, Antony Mayi wrote:> Hi Nan,
>
> thanks. I have removed the schedule (re)definition but it does still the
> same - the tidy is called on every run (every 30 minutes). the
> state.yaml after a typical run has following records:
>
> * puppet log:
>
> Jan 24 10:37:32 puppet puppet-agent[24504]:
> (/Stage[main]/Puppet::Master/Tidy[/var/lib/puppet/reports]) Tidying
> File[/var/lib/puppet/reports/puppet/201101171031.yaml]
> Jan 24 10:37:32 puppet puppet-agent[24504]:
> (/Stage[main]/Puppet::Master/Tidy[/var/lib/puppet/reports]) Tidying
> File[/var/lib/puppet/reports/server1/201101171032.yaml]
> Jan 24 10:37:32 puppet puppet-agent[24504]:
> (/Stage[main]/Puppet::Master/Tidy[/var/lib/puppet/reports]) Tidying
> File[/var/lib/puppet/reports/server2/201101171035.yaml]
> Jan 24 10:37:33 puppet puppet-agent[24504]:
> (/File[/var/lib/puppet/reports/server1/201101171032.yaml]/ensure) removed
> Jan 24 10:37:36 puppet puppet-agent[24504]:
> (/File[/var/lib/puppet/reports/puppet/201101171031.yaml]/ensure) removed
> Jan 24 10:37:36 puppet puppet-agent[24504]:
> (/File[/var/lib/puppet/reports/server2/201101171035.yaml]/ensure) removed
>
> * state.yaml:
>
> "Tidy[/var/lib/puppet/reports]":
> !ruby/sym checked: 2011-01-24 00:49:51.861210 +00:00
> "File[/var/lib/puppet/reports/puppet/201101171031.yaml]":
> !ruby/sym synced: 2011-01-24 10:37:36.589507 +00:00
> !ruby/sym checked: 2011-01-24 10:37:36.583191 +00:00
> "File[/var/lib/puppet/reports/server1/201101171032.yaml]":
> !ruby/sym synced: 2011-01-24 10:37:33.482278 +00:00
> !ruby/sym checked: 2011-01-24 10:37:33.476454 +00:00
> "File[/var/lib/puppet/reports/server2/201101171035.yaml]":
> !ruby/sym synced: 2011-01-24 10:37:36.737558 +00:00
> !ruby/sym checked: 2011-01-24 10:37:36.730387 +00:00
>
> so as I understand it the state.yaml file says the
> Tidy[/var/lib/puppet/reports] was run at 00:49 so I would expect it
> won''t be called this day again but as the logs show several files
are
> tidied on each run anyway.
>
> what''s wrong?
>
> thanks Antony.
>
> ------------------------------------------------------------------------
> *From:* Nan Liu <nan@puppetlabs.com>
> *To:* puppet-users@googlegroups.com
> *Sent:* Fri, 21 January, 2011 18:08:24
> *Subject:* Re: [Puppet Users] scheduler problem?
>
> On Fri, Jan 21, 2011 at 7:49 AM, Antony Mayi <antonymayi@yahoo.com
> <mailto:antonymayi@yahoo.com>> wrote:
>> Hi,
>> I am trying to cleanup the puppet reports on the master by puppet
itself
>> using the tidy type however want to run it once a day not every 30
> minutes.
>> I would expect following code does the trick:
>> schedule { daily:
>> period => daily,
>> }
>> tidy { "/var/lib/puppet/reports":
>> age => "1w",
>> recurse => true,
>> matches => "*.yaml",
>> schedule => daily
>> }
>> however it runs still every 30 minutes and I am getting huge report of
>> tidied logs every half an hour.
>> what am I doing wrong? how can I change the scheduler for this job to
> be run
>> only once a day?
>
> Schedule daily appears to be something that''s already defined in
> puppet, so I would use a different title.
>
> Do you get a log of the event in your state.yaml? For example:
>
> schedule {
> once:
> period => daily,
> }
>
> exec {
> "/bin/date > /tmp/time":
> schedule => once,
> }
>
> /var/lib/puppet/state/state.yaml:
> "Exec[/usr/bin/date > /tmp/time]":
> !ruby/sym checked: 2011-01-21 20:23:33.869328 -05:00
> !ruby/sym synced: 2011-01-21 20:23:33.870815 -05:00
>
> So in your case, you should have something along the line of:
> "Tidy[/var/lib/puppet/reports]":
> !ruby/sym checked: 2011-01-21 20:33:17.927550 -05:00
>
> Thanks,
>
> Nan
>
> --
> 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: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.
- --
Trevor Vaughan
Vice President, Onyx Point, Inc.
email: tvaughan@onyxpoint.com
phone: 410-541-ONYX (6699)
pgp: 0x6C701E94
- -- This account not approved for unencrypted sensitive information --
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
iQEcBAEBAgAGBQJNPWpUAAoJECNCGV1OLcypAbwH/3JYreanClJ5kODM9//SYOeJ
oUP0OQXYrmCENWSBRYp7zMNNM3Fl/e+ws5QZMq5dYm1pjFd7ARndv5l5/eGgY9Ma
jSy5EdrqYHetqQgjmSZv39dqdsf+W0QDcVu1cNWZRM7RiHSacj2UMT1y0kfL4juQ
1esvreXILX1cgvBEbgc8xoLv088hoinshxbBAjl4dbgGs9j0Rpj+q6g95mW9vqiL
ZkDFRO9B+rC5eu+MMOm9iwou44o19+r6XBwU8v1HGqFTZHxiCY1P8R8QgGoIDaCG
+qVCWljAY+5VsXv+DGpVYjPETN2EkzWB7qxzQltCrNoF8Y6poJvqB8F2X6kpeWY=x0NX
-----END PGP SIGNATURE-----
--
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.
> the notify is executed only once but tidy still during each run. > > is this a bug or a feature? if a bug, is it fixed in some recent version?I would say a bug. Check the bug tracker: http://projects.puppetlabs.com/projects/puppet/issues for any open or closed bugs regarding that problem and if you don''t find one: Please file a bug report. ~pete -- 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.
reported as http://projects.puppetlabs.com/issues/6020 ________________________________ From: Peter Meier <peter.meier@immerda.ch> To: puppet-users@googlegroups.com Sent: Tue, 25 January, 2011 13:41:29 Subject: Re: [Puppet Users] scheduler problem?> the notify is executed only once but tidy still during each run. > > is this a bug or a feature? if a bug, is it fixed in some recent version?I would say a bug. Check the bug tracker: http://projects.puppetlabs.com/projects/puppet/issues for any open or closed bugs regarding that problem and if you don''t find one: Please file a bug report. ~pete --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.