collect-logs should ignore all tar warnings (return code 1), to avoid skipping the entire tarball
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Landscape Charm |
Fix Released
|
High
|
Ursula Junque |
Bug Description
collect-logs uses tar and subprocess.
According to tar manual, when failures are fatal, or, result in no tarball, return code is 2. If something happens that's a warning but tarball is created anyway, return code is 1. Only a perfect run is return code 0.
We have been missing tarballs because of the behavior described above, given an exception is raised for everything != 0, that causes collect-logs to skip the tarball entirely. It should be changed to ignore all "errors" with return code 1, outputting the error message but proceeding anyway, given they are mostly warnings.
Related branches
- Andreas Hasenack: Approve
- Francis Ginther (community): Approve
- 🤖 Landscape Builder: Approve (test results)
-
Diff: 23 lines (+9/-4)1 file modifiedcollect-logs (+9/-4)
summary: |
- collect-logs should ignore all tar errors, to avoid skipping the entire - tarball + collect-logs should ignore all tar warnings (return code 1), to avoid + skipping the entire tarball |
tags: | removed: kanban |
Changed in landscape-charm: | |
status: | Triaged → In Progress |
Changed in landscape-charm: | |
status: | In Progress → Fix Committed |
This was done when collect-logs script was still part of the landscape-charm project. Now it lives under lp:autopilot-log-analyser, and it's fix released. I'll mark as such.