Issue #2251 has been updated by Adrien Thebo.

I remain unconvinced that we should be wiping out old crontab entries if the 
user is changed.

Given the following file resource:

<pre>
file { "http_conf":
  ensure => present,
  path => '/etc/apache2/httpd.conf',
}
</pre>

Suppose we change the path:

<pre>
file { "http_conf":
  ensure => present,
  path => '/etc/apache2/apache.conf',
}
</pre>

Right now we don't programmatically remove the old file, 
`/etc/apache2/httpd.conf`. It's no longer being managed, but we don't 
automatically wipe the old file because we're changed the path. If that 
behavior is desired, you have to explicitly remove it. Since each crontab has a 
unique title this isn't exactly identical, but it's similar enough to warrant 
some caution.

This brings to mind a couple of questions:

  * Is there ever a case where we would **not** want to wipe a cron entry with 
a matching title but a different user?
  * What if the cron type and provider had a `unique` parameter or something 
equivalent that would enable this behavior?

----------------------------------------
Bug #2251: cron provider doesn't correctly employ user property for resource 
existence checks.
https://projects.puppetlabs.com/issues/2251#change-87428

* Author: Marc Fournier
* Status: Accepted
* Priority: Normal
* Assignee: 
* Category: cron
* Target version: 
* Affected Puppet version: 0.24.8
* Keywords: cron
* Branch: 
----------------------------------------
If I change the "user" parameter of a cron{} resource, the previous user will 
still have the cron listed in his crontab.

Assuming the resource name stays the same, I would have expected changing the 
"user" parameter to be as transparent as changing "hour", "minute", etc.

This is a possible workaround, but it may not be desirable in every case:
<pre>
resource { "cron": purge => true }
</pre>


-- 
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://projects.puppetlabs.com/my/account

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/puppet-bugs?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to