On Mon, Jul 09, 2012 at 06:48:41AM -0700, Kmbu wrote:
> Hello folks..
> 
> I suddenly found the crontab on one of my puppet clients overwritten. It 
> had many entries, including one created by Puppet. Suddenly during one run 
> it was overwritten, keeping only the Puppet entry and removing everything 
> else. Nothing changed between the previous runs and the one that re-created 
> the crontab in terms of configuration. I'm running Puppet 2.7.6.
> 
> Fri Jul 06 22:00:16 +0200 2012 Puppet (notice): Reopening log files
> Fri Jul 06 22:03:58 +0200 2012 Puppet (notice): Finished catalog run in 
> 5.34 seconds
> Fri Jul 06 22:10:15 +0200 2012 Puppet (notice): Reopening log files
> Fri Jul 06 22:11:18 +0200 2012 Puppet (notice): Finished catalog run in 
> 5.30 seconds
> Fri Jul 06 22:20:15 +0200 2012 Puppet (notice): Reopening log files
> Fri Jul 06 22:23:05 +0200 2012 Puppet (notice): Finished catalog run in 
> 5.81 seconds
> Fri Jul 06 22:30:15 +0200 2012 Puppet (notice): Reopening log files
> Fri Jul 06 22:35:04 +0200 2012 Puppet (notice): Finished catalog run in 
> 5.92 seconds
> Fri Jul 06 22:40:15 +0200 2012 Puppet (notice): Reopening log files
> Fri Jul 06 22:44:35 +0200 2012 
> /Stage[main]/Cre-base/Cron[puppet-run]/ensure (notice): created
> Fri Jul 06 22:44:39 +0200 2012 Puppet (notice): Finished catalog run in 
> 5.54 seconds
> 
> Why would one run suddenly do this?
> 
> Regards,
> 

It looks like prefetching (executing »crontab -l root« to get current
cronentries) failed in some way. As a result puppet's in-memory
representation of the crontab is empty. When puppet now evaluates your
Cron['puppet-run'] resource, it detects it to be out of sync (is absent,
should be present), so the in-memory representation now contains only
your 'puppet-run' cronjob. If the new crontab is written back to disk,
you will loose every other cronentry.

Normally I would expect an error message if prefetching failed:

    Could not prefetch cron provider

but that doesn't seem to be the case here. On the other hand there is an
outstanding bug about failures beeing silently ignored on solaris [1]

So a failure when running »crontab -l root« (do you manage crontabs of
other users as well? You may hit [2] in that case) would at least
explain the log output but the interesting question now is:
Can you think of a situation *why* the command failed?

[1] http://projects.puppetlabs.com/issues/14283
[2] http://projects.puppetlabs.com/issues/5752

-- 
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+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/puppet-users?hl=en.

Reply via email to