~dashmage/charm-logrotated:bug/2017798-update-cron-daily-location

Last commit made on 2023-05-19
Get this branch:
git clone -b bug/2017798-update-cron-daily-location https://git.launchpad.net/~dashmage/charm-logrotated
Only Ashley James can upload to this branch. If you are Ashley James please log in for upload directions.

Branch merges

Branch information

Name:
bug/2017798-update-cron-daily-location
Repository:
lp:~dashmage/charm-logrotated

Recent commits

13acd7b... by Ashley James

Remove cron daily job from root user crontab.

Currently while modifying cron daily job execution time, it is
updated in the root user's crontab (/var/spool/cron/crontabs/root).
This leads to a duplicate execution along with the execution of
cron.daily scripts in /etc/crontab.

This commit aims to manage the execution of the charms' daily cron job
solely from the system crontab, /etc/crontab. It also fixes the existing
unit test `test_cron_daily_schedule` and mocks the crontab instead of
directly writing to it.

53248e0... by Ashley James

Fix flaky functional test

- Use tenacity.Retrying while checking for file in
`test_reconfigure_cronjob_frequency`

55f7ed6... by Mert Kirpici

LP #2017795

Reviewed-on: https://code.launchpad.net/~mertkirpici/charm-logrotated/+git/charm-logrotated/+merge/442359
Reviewed-by: 🤖 prod-jenkaas-bootstack <email address hidden>
Reviewed-by: Erhan Sunar <email address hidden>
Reviewed-by: Chi Wai CHAN <email address hidden>

7316795... by Mert Kirpici

fix: cleanup old cronjobs upon config change

A change in cronjob frequency used to leave the old cronjobs behind,
causing unnecessary execution. This patch is mitigating that behavior
and also adds some tests.

Works-on: 2017795
Signed-off-by: Mert Kırpıcı <email address hidden>

017fd99... by Chi Wai CHAN

Add "size" directive for config option "override". This is mutually exclusive with "interval" directive, and if both "size" and "interval" are provided, "size" takes the precedence.

Reviewed-on: https://code.launchpad.net/~raychan96/charm-logrotated/+git/charm-logrotated/+merge/442228
Reviewed-by: Eric Chen <email address hidden>
Reviewed-by: 🤖 prod-jenkaas-bootstack <email address hidden>
Reviewed-by: Erhan Sunar <email address hidden>

e5f3e29... by Chi Wai CHAN

Add examples for "size" directive in config.yaml.

cf8e129... by Chi Wai CHAN

Add functional test for config option "override".

53663fd... by Chi Wai CHAN

Fix deprecated juju_tools.

7d0735f... by Chi Wai CHAN

Add "size" directive for config option "override".

4d9208b... by Chi Wai CHAN

Allow "override" option to override a single directive (rotate | interval), instead of having to specify both of them.

Reviewed-on: https://code.launchpad.net/~raychan96/charm-logrotated/+git/charm-logrotated/+merge/442076
Reviewed-by: Robert Gildein <email address hidden>
Reviewed-by: 🤖 prod-jenkaas-bootstack <email address hidden>
Reviewed-by: JamesLin <email address hidden>
Reviewed-by: Erhan Sunar <email address hidden>