Issue #2251 has been updated by Felix Frank.

Adrien Thebo wrote:
> I remain unconvinced that we should be wiping out old crontab entries if the 
> user is changed.

Right. The proposed fix won't.

>   * Is there ever a case where we would **not** want to wipe a cron entry 
> with a matching title but a different user?

Certainly. Suppose that long-forgotten (but crucial) cronjob happens to still 
bear that same name you're now giving to a new one...

Then again, if that happens to you, and you manage to not pick a different 
user, you will loose the old job anyway.

>   * What if the cron type and provider had a `unique` parameter or something 
> equivalent that would enable this behavior?

Hmm, interesting idea. Principle of least surprise would still demand a warning 
or notice to the user, so they are made aware that without that parameter, 
puppet may not be doing what they may suppose it is.

At the moment, I think I would prefer for puppet to complain incessantly until 
the user manually removes the naming conflict. But I'm not sure I'll think 
that, say, a week from now.

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

* 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