Bug #2845
Cron entries using "special" parameter lose their title when changed
| Status: | Closed | Start: | 11/20/2009 | |
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assigned to: | % Done: | 0% |
||
| Category: | cron | |||
| Target version: | 0.25.4 | |||
| Affected version: | 0.25.3 | Branch: | http://github.com/jes5199/puppet/tree/ticket/0.25.x/2845 | |
| Keywords: | ||||
| Votes: | 0 |
Description
When using a special parameter (e.g @reboot …) to create a cron entry the entry is added to with a title comment “# Puppet Name: …” just like a regular entry. However when the entry is modified the comment is dropped. Because there is no longer a comment title if the entry is modified again, instead of replacing the old line, it will add a new line complete with comment. The old line is now left orphaned.
Example:
cron{ "test":
command => "/bin/echo One > /tmp/puppet.txt",
special => "reboot",
}
gives:
# Puppet Name: test @reboot /bin/echo One > /tmp/puppet.txt
changing to:
cron{ "test":
command => "/bin/echo Two > /tmp/puppet.txt",
special => "reboot",
}
gives:
@reboot /bin/echo Two > /tmp/puppet.txt
changing again to:
cron{ "test":
command => "/bin/echo Three > /tmp/puppet.txt",
special => "reboot",
}
gives:
@reboot /bin/echo Two > /tmp/puppet.txt # Puppet Name: test @reboot /bin/echo Three > /tmp/puppet.txt
Related issues
| related to Puppet - Bug #3010: Crontab entries using "special" parameter can't be conver... | Accepted | 01/06/2010 | ||
| duplicated by Puppet - Bug #3102: Crontab provider adding extra field on Solaris | Duplicate | 01/24/2010 | ||
| duplicated by Puppet - Bug #3112: Problem with adding and removing crons | Duplicate | 01/26/2010 |
History
Updated by Markus Roberts 8 months ago
- Status changed from Unreviewed to Investigating
- Assigned to set to Jesse Wolfe
Updated by Markus Roberts 7 months ago
- Target version set to 0.25.3
Note that this was reported against 0.24.8, so the first step is to check if it’s been fixed already.
Updated by Jesse Wolfe 7 months ago
- Status changed from Investigating to Accepted
- Affected version changed from 0.24.8 to 0.25.2
Still exists in 0.25.2
Updated by Jesse Wolfe 7 months ago
- Status changed from Accepted to Ready for Testing
- Branch set to http://github.com/jes5199/puppet/tree/ticket/0.25.x/2845
Updated by Markus Roberts 7 months ago
- Target version changed from 0.25.3 to 0.25.4
Updated by James Turnbull 7 months ago
- Target version changed from 0.25.4 to 0.25.3
Updated by James Turnbull 7 months ago
- Status changed from Ready for Testing to Closed
Pushed in commit:“c99f394bf8c10d13f3fa7d3ab7ab43ecf454c081” in branch 0.25.x
Updated by James Turnbull 7 months ago
- Category set to cron
- Status changed from Closed to Re-opened
- Target version changed from 0.25.3 to 0.25.4
- Affected version changed from 0.25.2 to 0.25.3
Updated by James Turnbull 7 months ago
- Status changed from Re-opened to Closed
Due to it breaking cron entries this was reverted in commit:“441879f7999f4724e8ab344e796015a7ffbfb21b” in branch 0.25.x