Bug #2845
Cron entries using "special" parameter lose their title when changed
| Status: | Closed | Start date: | 11/20/2009 | |
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assignee: | % Done: | 0% |
||
| Category: | cron | |||
| Target version: | 0.25.4 | |||
| Affected Puppet 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
History
Updated by Markus Roberts about 2 years ago
- Status changed from Unreviewed to Investigating
- Assignee set to Jesse Wolfe
Updated by Markus Roberts about 2 years 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 about 2 years ago
- Status changed from Investigating to Accepted
- Affected Puppet version changed from 0.24.8 to 0.25.2
Still exists in 0.25.2
Updated by Jesse Wolfe about 2 years ago
- Status changed from Accepted to In Topic Branch Pending Review
- Branch set to http://github.com/jes5199/puppet/tree/ticket/0.25.x/2845
Updated by Markus Roberts about 2 years ago
- Target version changed from 0.25.3 to 0.25.4
Updated by James Turnbull about 2 years ago
- Target version changed from 0.25.4 to 0.25.3
Updated by James Turnbull about 2 years ago
- Status changed from In Topic Branch Pending Review to Closed
Pushed in commit:c99f394bf8c10d13f3fa7d3ab7ab43ecf454c081 in branch 0.25.x
Updated by James Turnbull about 2 years ago
- Category set to cron
- Status changed from Closed to Re-opened
- Target version changed from 0.25.3 to 0.25.4
- Affected Puppet version changed from 0.25.2 to 0.25.3
Updated by James Turnbull about 2 years 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