update-cron-daily-schedule config modifies entries in sudo user crontab instead of system crontab file
Bug #2017798 reported by
Tianqi Xiao
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
logrotate-charm |
Fix Released
|
High
|
Ashley James |
Bug Description
`update-
1. both cron configs will be used to run cronjobs, so the scripts will be ran twice
2. `hookenv.log` cannot be correctly executed when running with sudo user cronjob so its messages will not show up in juju debug-log.
We should instead only manipulate `/etc/crontab` file, either by manually changing the file entries, or using dedicated library to achieve so.
Related branches
~dashmage/charm-logrotated:bug/2017798-update-cron-daily-location
- JamesLin: Approve
- 🤖 prod-jenkaas-bootstack (community): Approve (continuous-integration)
- Chi Wai CHAN: Needs Information
- Eric Chen: Approve
- BootStack Reviewers: Pending requested
- BootStack Reviewers: Pending requested
- Robert Gildein: Pending requested
- Tianqi Xiao: Pending requested
-
Diff: 201 lines (+70/-25)4 files modifiedsrc/lib/lib_cron.py (+16/-14)
src/tests/functional/requirements.txt (+1/-0)
src/tests/functional/test_logrotate.py (+13/-5)
src/tests/unit/test_logrotate.py (+40/-6)
~dashmage/charm-logrotated:bug/2017798-update-cron-daily-location
Superseded
for merging
into
charm-logrotated:master
- Eric Chen: Needs Fixing
- Tianqi Xiao (community): Needs Information
- 🤖 prod-jenkaas-bootstack (community): Approve (continuous-integration)
- Chi Wai CHAN: Approve
- Robert Gildein: Approve
- BootStack Reviewers: Pending requested
- JamesLin: Pending requested
-
Diff: 201 lines (+62/-26)4 files modifiedsrc/lib/lib_cron.py (+19/-14)
src/tests/functional/requirements.txt (+1/-0)
src/tests/functional/test_logrotate.py (+13/-5)
src/tests/unit/test_logrotate.py (+29/-7)
Changed in charm-logrotated: | |
status: | New → Triaged |
tags: | added: bseng-1138 |
description: | updated |
Changed in charm-logrotated: | |
importance: | Undecided → Medium |
Changed in charm-logrotated: | |
assignee: | nobody → Ashley James (dashmage) |
Changed in charm-logrotated: | |
importance: | Medium → High |
Changed in charm-logrotated: | |
milestone: | none → 23.07 |
Changed in charm-logrotated: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
Bug has been fixed with this MR[1].
[1]: https:/ /code.launchpad .net/~dashmage/ charm-logrotate d/+git/ charm-logrotate d/+merge/ 443242