latest/edge logrotated workload status stuck in maintenance when update-cron-daily-schedule is unset

Bug #2015896 reported by Konstantinos Kaskavelis
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
logrotate-charm
Fix Released
Undecided
Tianqi Xiao

Bug Description

SQA has a failed run,in a jammy baremetal run, at kubernetes-maas layer, where logrotated charm is stuck in maintenance with the message: Executing cron job.

From the logs' investigation, we could not identify the root cause for this, so we would appreciate any suggestion.

Failed run:

https://solutions.qa.canonical.com/v2/testruns/46b3f790-5d92-4b79-ace6-7e92b9eba920

Logs:

https://oil-jenkins.canonical.com/artifacts/46b3f790-5d92-4b79-ace6-7e92b9eba920/index.html

Related branches

description: updated
Revision history for this message
Jeffrey Chang (modern911) wrote :

Solutions QA has 18 failures in last 3 days, all of them are on jammy-baremetal with kubernetes 1.27.

Revision history for this message
Alexander Balderson (asbalderson) wrote :

I was able to catch this in a live environment and did some additional debugging.

The first note is that we only hit this bug running latest/edge, revision 12. The only configuration we set is `logrotate-retention: 60` and use defaults for everything else.

I dont have the live environment up any longer to get the _exact_ logs, but when i called the cronjob directly installed in /etc/logrotate_cronjob_config, and built on line 66 of lib_cron [1] the cronjob failed because it was trying to find a method in lib_cron called "None" [2]. When i looked at the cron_daily_schedule the values were to:
True
hourly
60
unset

This last value "unset" is the offending parameter, which is a new param for the edge/candidate version of the charm. This behavior may be expected overall, but could return a better message about being unset, instead of stuck "Executing cron job." when the hook is expected to fail. maybe return the message "cron schedule unset, please set to unblock charm."

1) https://git.launchpad.net/charm-logrotated/tree/src/lib/lib_cron.py#n66
2) https://git.launchpad.net/charm-logrotated/tree/src/lib/lib_cron.py#n157

summary: - logrotated workload status stuck in maintenance
+ latest/edge logrotated workload status stuck in maintenance when update-
+ cron-daily-schedule is unset
tags: added: bseng-1092
Tianqi Xiao (txiao)
Changed in charm-logrotated:
assignee: nobody → Tianqi Xiao (txiao)
Tianqi Xiao (txiao)
Changed in charm-logrotated:
status: New → In Progress
Tianqi Xiao (txiao)
Changed in charm-logrotated:
status: In Progress → Fix Committed
milestone: none → 23.04
Changed in charm-logrotated:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.