call_and_check does not report error output
Bug #1324237 reported by
Jeroen T. Vermeulen
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MAAS |
Fix Released
|
Critical
|
Jeroen T. Vermeulen |
Bug Description
We use call_and_check in several places, but we never make any special provisions for its error output. In tests on a small cloud instance I'm getting out-of-memory and out-of-disk-space errors while importing images, and the exceptions are logged, but the reasons for the exceptions are not. This makes the problems very hard to diagnose.
For better debugging, call_and_check ought to capture the command's stderr by default and, in the event of a CalledProcessError, set it as the exception's "output" instance variable.
Related branches
lp:~jtv/maas/bug-1324237
- Julian Edwards (community): Approve
-
Diff: 297 lines (+64/-70)7 files modifiedsrc/provisioningserver/boot/utils.py (+3/-5)
src/provisioningserver/dns/config.py (+2/-4)
src/provisioningserver/import_images/tests/test_boot_resources.py (+1/-1)
src/provisioningserver/omshell.py (+3/-3)
src/provisioningserver/tests/test_omshell.py (+3/-2)
src/provisioningserver/utils/__init__.py (+15/-21)
src/provisioningserver/utils/tests/test_utils.py (+37/-34)
Changed in maas: | |
assignee: | nobody → Jeroen T. Vermeulen (jtv) |
status: | Triaged → In Progress |
Changed in maas: | |
status: | In Progress → Fix Committed |
Changed in maas: | |
milestone: | none → 1.6.0 |
Changed in maas: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.