Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Reactivated juju-crashdump. #73
Conversation
|
There are a couple of flaws in this PR, which I have been discovering as I have been running additional double-check tests, and letting glitch sow chaos.
|
johnsca
approved these changes
Jan 30, 2017
Minor style suggestion on logging, but
| + success = await execute_process(cmd, log) | ||
| + log.info("Crashdump result: {}".format(success)) | ||
| + except FileNotFoundError as e: | ||
| + log.error( |
johnsca
Jan 30, 2017
Owner
For the logging, what about something like this:
try:
success = await execute_process(cmd, log)
if success:
log.info("Crashdump COMPLETE")
else:
log.error("Crashdump FAILED")
except FileNotFoundError as e:
log.warn("Crashdump SKIPPED (not installed)")It would also be nice if, should it fail, the stderr is automatically logged as well, rather than having to re-run with -lDEBUG, maybe an option to execute_process?
petevg commentedJan 30, 2017
We skip it if it doesn't exist, but run it if it does.
We also now skip packing the matrix.log and glitch_plan into a tarball,
as that can fail if we are logging while doing it, and it can be handled
on a higher level.
Tweaked tests so that they don't expect matrix tarballs (or crashdump
tarballs.)
@johnsca @kwmonroe @ktsakalozos Testing this is a little tricky.
tox -r -e functionalworks, but won't actually run crashdump. To run crashdump, you need to add it to your PATH, and run matrix manually (or add it to the virtualenv, and run tox without -r). Here's a good matrix invocation:export PATH=$PATH:/path/to/plugins && mkdir /tmp/foo && matrix -l DEBUG -s raw -d /tmp/foo