Issue #1453 has been updated by James Turnbull.

Target version changed from Rowlf to Statler


----------------------------------------
Bug #1453: removing a cron parameter does not change the object
http://projects.reductivelabs.com/issues/1453

Author: Martha Greenberg
Status: Accepted
Priority: Normal
Assigned to: 
Category: cron
Target version: Statler
Patch: None
Affected version: 0.24.5
Keywords: cron
Branch: 


If you remove a parameter from a cron object, it should change the cron job to 
have * in that field.  However, puppet does not change it unless you specify 
"*".
<pre>
# cat /tmp/1.pp
cron { "test":
  command => "/bin/echo test",
  hour    => "4",
  minute  => "3",
}

# puppet -v /tmp/1.pp
notice: //Cron[test]/ensure: created

# cat /var/spool/cron/crontabs/root
# DO NOT EDIT THIS FILE - edit the master and reinstall.
# (- installed on Sun Jul 27 23:45:24 2008)
# (Cron version -- $Id: crontab.c,v 2.13 1994/01/17 03:20:37 vixie Exp $)
# HEADER: This file was autogenerated at Sun Jul 27 23:45:24 +0300 2008 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.
# Puppet Name: test
3 4 * * * /bin/echo test

# cat /tmp/2.pp
cron { "test":
  command => "/bin/echo test",
  minute  => "5",
}

# puppet -v /tmp/2.pp
notice: //Cron[test]/minute: minute changed '3' to '5'

# cat /var/spool/cron/crontabs/root
# DO NOT EDIT THIS FILE - edit the master and reinstall.
# (- installed on Sun Jul 27 23:51:11 2008)
# (Cron version -- $Id: crontab.c,v 2.13 1994/01/17 03:20:37 vixie Exp $)
# HEADER: This file was autogenerated at Sun Jul 27 23:51:11 +0300 2008 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.
# Puppet Name: test
5 4 * * * /bin/echo test
</pre>

Notice that hour is still set to 4, not *!


-- 
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.

Reply via email to