Changing logrotate-cronjob-frequency config adds new frequency instead of replacing the old one
Bug #2017795 reported by
Tianqi Xiao
This bug affects 2 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
logrotate-charm |
Fix Released
|
Medium
|
Mert Kirpici |
Bug Description
The currently implementation doesn't delete the script file from the previous cron folder when `logrotate-
1. set `logrotate-
2. charm-logrorated script gets added to `/etc/cron.hourly`
3. set `logrotate-
4. charm-logrorated script gets added to `/etc/cron.daily` but the script in `/etc/cron.hourly` also remains.
The result of this example workflow is running the cronjob in both hourly and daily frequency, which is not the expected behavior.
Related branches
~mertkirpici/charm-logrotated:lp/2017795
- 🤖 prod-jenkaas-bootstack (community): Approve (continuous-integration)
- Chi Wai CHAN: Approve
- Erhan Sunar (community): Approve
- BootStack Reviewers: Pending requested
-
Diff: 218 lines (+118/-22)5 files modifiedsrc/lib/lib_cron.py (+18/-19)
src/tests/functional/test_logrotate.py (+21/-0)
src/tests/unit/conftest.py (+7/-1)
src/tests/unit/requirements.txt (+1/-1)
src/tests/unit/test_logrotate.py (+71/-1)
summary: |
- Changing logrotate-cronjob-frequency doesn't remove old script + Changing logrotate-cronjob-frequency config adds new frequency instead + of replacing the old one |
tags: | added: bseng-1137 |
Changed in charm-logrotated: | |
status: | New → Triaged |
Changed in charm-logrotated: | |
status: | Triaged → New |
Changed in charm-logrotated: | |
importance: | Undecided → Medium |
status: | New → Triaged |
Changed in charm-logrotated: | |
assignee: | nobody → Mert Kirpici (mertkirpici) |
status: | Triaged → In Progress |
Changed in charm-logrotated: | |
status: | In Progress → Fix Committed |
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.