Issue #3102 has been reported by Josh Anderson.
----------------------------------------
Bug #3102: Crontab provider adding extra field on Solaris
http://projects.reductivelabs.com/issues/3102
Author: Josh Anderson
Status: Unreviewed
Priority: Normal
Assigned to:
Category:
Target version:
Affected version: 0.25.3
Keywords:
Branch:
As of 0.25.3, the crontab provider is a bit broken on Solaris.
Here's what it's doing.
Given this test manifest:
<pre>
cron { "Test entry":
command => "echo testing >/dev/null",
hour => 0,
minute => 0
}
</pre>
It's generating this crontab:
<pre>
# HEADER: This file was autogenerated at Sun Jan 24 02:13:21 -0800 2010 by
puppet.
# HEADER: While it can still be managed manually, it is definitely not
recommended.
# HEADER: Note particularly that the comments starting with 'Puppet Name' should
# HEADER: not be deleted, as doing so could cause duplicate cron jobs.
#ident "@(#)root 1.21 04/03/23 SMI"
#
# The root crontab should be used to perform accounting data collection.
#
#
* 10 3 * * * /usr/sbin/logadm
* 15 3 * * 0 /usr/lib/fs/nfs/nfsfind
* 30 3 * * * [ -x /usr/lib/gss/gsscred_clean ] && /usr/lib/gss/gsscred_clean
# Puppet Name: Test entry
* 0 0 * * * echo testing >/dev/null
</pre>
What's wrong with this? Well, Solaris cron only uses five fields to specify the
execution time, and as of 0.25.3, puppet is generating a sixth field.
Here's the original crontab:
<pre>
#ident "@(#)root 1.21 04/03/23 SMI"
#
# The root crontab should be used to perform accounting data collection.
#
#
10 3 * * * /usr/sbin/logadm
15 3 * * 0 /usr/lib/fs/nfs/nfsfind
30 3 * * * [ -x /usr/lib/gss/gsscred_clean ] && /usr/lib/gss/gsscred_clean
</pre>
This may have slipped past testing because Solaris crontab refuses to import
the file above *but exits with status 0*. I only noticed because I'm testing
Foreman right now and saw the same hosts reporting that they had created a cron
job over and over again.
The problem appears to have been introduced here:
http://projects.reductivelabs.com/projects/puppet/repository/diff/lib/puppet/provider/cron?rev=c99f394bf8c10d13f3fa7d3ab7ab43ecf454c081&rev_to=01c98f6a196d37d346ccb34863502409da212f8d
Note this line:
<pre>
:optional => %w{special minute hour weekday month monthday}, :absent => "*"
</pre>
The special field (not supported by all cron daemons) is optional (okay) and
has a default value of "*" (not okay).
--
You have received this notification because you have either subscribed to it,
or are involved in it.
To change your notification preferences, please click here:
http://reductivelabs.com/redmine/my/account
--
You received this message because you are subscribed to the Google Groups
"Puppet Bugs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/puppet-bugs?hl=en.