Skip to content

Improve logging of updater failure cases #521

Closed
@conorsch

Description

@conorsch

To aid in debugging the custom updater logic, let's add more informative logging when errors are encountered. We currently log that an error occurred during VM start or stop, e.g.

try:
subprocess.check_call(["qvm-start", "--skip-if-running", vm])
except subprocess.CalledProcessError as e:
sdlog.error("Error while starting {}".format(vm))
sdlog.error(str(e))

but not what the specific error was. We'd need to catch stderr and log that, as well. Since we're still using subprocess to shell out, we'll have to use PIPE for stderr, otherwise the "stderr" attribute on the exception will be empty.

We also have a request for explicit logging of xl list before the start actions #498 (comment), which sounds like a great idea. Non-decoded bytestrings should be logged to ensure that newlines aren't interpreted.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions