allow failure when uploading anaconda logs
ClosedPublic

Authored by adamwill on Apr 29 2016, 9:31 PM.

Details

Summary

This requires a PR I sent upstream:
https://github.com/os-autoinst/os-autoinst/pull/490
This change is in os-autoinst -10. However, with older packages
it won't crash or anything, it'll just behave as before.

With the change, this allows log upload to fail, so if one of
the logs is missing, the hook doesn't immediately die and fail
to upload the rest of the logs. Various anaconda logs are not
always present: the DNF logs are not present for Atomic or live
installs, and the X.log and syslog are not present for live
installs. Adding a fail-tolerant mode to upstream upload_logs
seemed a better option than testing for the existence of each
log file prior to uploading it, or adding a bunch of GET_VAR
calls to try and figure out which log files 'should' exist.

Test Plan

Run an Atomic or live install test that fails, and
check what logs get uploaded. You can just test a current
Rawhide Atomic installer ISO, as they're crashing right now.
Without this patch (and the os-autoinst update) the hook dies
when it tries to upload dnf.log, so the traceback and /var/tmp
archive don't get uploaded; with this patch all the present
logs should get uploaded. Compare:
https://openqa.fedoraproject.org/tests/14834
https://openqa.stg.fedoraproject.org/tests/15371
(I tested this out on staging).

Diff Detail

Repository
rOPENQATESTS os-autoinst-distri-fedora
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
adamwill retitled this revision from to allow failure when uploading anaconda logs.Apr 29 2016, 9:31 PM
adamwill updated this object.
adamwill edited the test plan for this revision. (Show Details)
adamwill added reviewers: jskladan, garretraziel.
adamwill planned changes to this revision.May 2 2016, 7:05 AM

upstream want me to change this to a named arg, so this will need revising.

adamwill updated this revision to Diff 2139.May 4 2016, 1:38 AM

revise for version of the patch that got merged

the parameter is now named, in crazy perl style.

garretraziel accepted this revision.May 5 2016, 8:59 AM
garretraziel added inline comments.
lib/anacondatest.pm
23–32

Oh look how easy and predictable Perl-way of doing things and Perl syntax is.

This revision is now accepted and ready to land.May 5 2016, 8:59 AM
adamwill added inline comments.May 5 2016, 3:02 PM
lib/anacondatest.pm
23–32

well, it's *more or less* the same as passing an args dict to a Python function, to be fair.

This revision was automatically updated to reflect the committed changes.