Buildd-manager fails horribly if the uploader.log is not found after a build upload
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Launchpad itself |
Fix Released
|
High
|
Jelmer Vernooij |
Bug Description
In the Medusa-like code that lives in lib/lp/
However, if the process fails in a way where it has no chance to write uploader.log in the relevant directory, the code at the end of that method fails horribly as it blindly tries to open the log file, because it only checks to see if the directory it lives in exists.
This in turn causes a scan failure in the buildd-manager which completely blocks any more builds from being dispatched. It should fail gracefully instead and write something about not finding the upload log. In fact ideally this Popen crack should be removed entirely and a call to a script hook should be done instead, but that can wait.
Related branches
- Brad Crittenden (community): Approve (code)
-
Diff: 130 lines (+56/-18)2 files modifiedlib/lp/buildmaster/model/buildbase.py (+27/-18)
lib/lp/buildmaster/tests/test_buildbase.py (+29/-0)
- Henning Eggers (community): Needs Fixing (code)
-
Diff: 140 lines (+59/-18) (has conflicts)2 files modifiedlib/lp/buildmaster/model/buildbase.py (+30/-18)
lib/lp/buildmaster/tests/test_buildbase.py (+29/-0)
Changed in soyuz: | |
milestone: | pending → 10.02 |
Changed in soyuz: | |
milestone: | 10.02 → 10.03 |
Changed in soyuz: | |
status: | Triaged → In Progress |
tags: |
added: qa-ok removed: qa-needstesting |
Changed in soyuz: | |
status: | Fix Committed → Fix Released |
We can trivially fix this by changing the check:
if os.path. exists( upload_ final_location) :
to:
if os.path. exists( log_filepath) :