The script parses startup logs obtained with SNAPD_DEBUG=1, extracts relevant
messages and presents an overview of the timings, which looks like so:
0.026017s start -> snap to snap-confine
0.003458s snap to snap-confine -> snap-confine enter
0.000892s snap-confine enter -> snap-confine mount namespace start
0.106204s snap-confine mount namespace start -> snap-confine mount namespace finish
0.001186s snap-confine mount namespace finish -> snap-confine to snap-exec
0.002771s snap-confine to snap-exec -> snap-exec to app
approx. total: 0.140528s
Signed-off-by: Maciej Borzecki <maciej.zenon.borzecki@canonical.com>
When debugging GCE spread runs where the VM fails to boot properly, you need to
look at the serial console, however doing so with the gcloud command line tool
is a bit finnicky.
This is a bash script which essentially will collect and follow all of the
output on the serial console from a GCE instance.
Signed-off-by: Ian Johnson <ian.johnson@canonical.com>
This was supposedly pushed to #11546 but somehow that PR got merged without the
commit in it, so re-submit the patch again :-)
This would otherwise fail with trying to print off the contents of
/snap//current/meta/gadget.yaml which does not exist.
Thanks to Alberto for the suggestion.
Signed-off-by: Ian Johnson <ian.johnson@canonical.com>
This is the first iteration of the debug script for debugging customer issues,
with a collection of easily gathered and commonly requested information that is
helpful in debugging issues on Ubuntu Core.
Eventually this will become a snap command and a REST API endpoint, but for now
a script will have to do.
Signed-off-by: Ian Johnson <ian.johnson@canonical.com>