Details
-
Bug
-
Status: Accepted
-
Normal
-
Resolution: Unresolved
-
None
-
None
-
None
-
Coremunity
-
Needs Assessment
-
Needs Assessment
Description
Puppet Version: 6.10.1-1stretch**
OS Name/Version: Debian stretch
hi,
I just discovered some duplicated crontab entries and then after some debugging found that resources cron purge ignores the name of the cron resources.
Reproduction:
puppet apply the following:
resources { 'cron': |
purge => true |
}
|
cron { 'foo1': |
command => '/bin/true' |
, hour => 3 |
, minute => 3 |
}
|
Actual and expected behavior:
Puppet removes all crontab entries and creates the foo1 entry.
# HEADER: This file was autogenerated at 2019-11-05 12:57:26 +0100 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: foo1
|
3 3 * * * /bin/true |
now apply the following:
resources { 'cron': |
purge => true |
}
|
cron { 'foo1': |
command => '/bin/true' |
, hour => 3 |
, minute => 3 |
, name => 'foo2' |
}
|
Actual behavior:
Puppet just adds the new foo2 cron entry.
# HEADER: This file was autogenerated at 2019-11-05 12:57:26 +0100 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: foo1
|
3 3 * * * /bin/true |
# Puppet Name: foo2
|
3 3 * * * /bin/true |
Expected behavior:
Puppet also removes the foo1 entry since no cron resource with that name exists in the catalog.
Attachments
Issue Links
- relates to
-
PUP-10118 resources type fails to purge package when packages exist whose $name != $title
-
- Accepted
-