collect-logs not ignoring when logs change while compressing; failing to fetch logs and breaking QA
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Landscape Charm |
Fix Released
|
Critical
|
Ursula Junque |
Bug Description
Right now collect-logs is skipping tarball creation if tar returns something other than 0, which is the case when files change during tar creation.
In the past when that happened collect-logs would flat ignore the error and return, knowing this is fine. Recently collect-logs was modified to call tar with a new option, --warning=
One would expect that that --warning option would ignore the error, making tar return success, or 0. But according to tar manual that's not the case:
"Sometimes, while performing the requested task, GNU tar notices some conditions that are not exactly errors, but which the user should be aware of. When this happens, tar issues a warning message describing the condition. ***Warning messages are output to the standard error and they do not affect the exit code of tar command.***"
Log collection is working for some cases by luck, as there are retries and logs in one of the tries might be steady for that moment. But for some units that are struggling to connect to others, or continuously retrying juju hooks this is never true, and we end up without logs.
Related branches
- Andreas Hasenack: Approve
-
Diff: 52 lines (+10/-7)2 files modifiedcollect-logs (+8/-5)
test_collect-logs.py (+2/-2)
information type: | Proprietary → Public |
affects: | landscape-system-tests → landscape-charm |
Changed in landscape-charm: | |
status: | In Progress → Fix Released |