collect-logs should ignore all tar warnings (return code 1), to avoid skipping the entire tarball

Bug #1625307 reported by Ursula Junque
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Landscape Charm
Fix Released
High
Ursula Junque

Bug Description

collect-logs uses tar and subprocess.check_output to create log tarballs. It currently ignores tar return code 1 only if "error" is due files changing during file creation (an acceptable situation for us).

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

Ursula Junque (ursinha)
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
Ursula Junque (ursinha)
Changed in landscape-charm:
status: Triaged → In Progress
Changed in landscape-charm:
status: In Progress → Fix Committed
Revision history for this message
Ursula Junque (ursinha) wrote :

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.

Changed in landscape-charm:
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.