call_and_check does not report error output

Bug #1324237 reported by Jeroen T. Vermeulen
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
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

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.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers