-
Notifications
You must be signed in to change notification settings - Fork 374
scripts: Add data collection script #93
scripts: Add data collection script #93
Conversation
b1642c4
to
ce45224
Compare
Ping @bergwolf, @grahamwhaley, @sboeuf. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nits, but overall
lgtm
data/kata-collect-data.sh.in
Outdated
# | ||
# Copyright (c) 2017-2018 Intel Corporation | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SPDX header style?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
data/kata-collect-data.sh.in
Outdated
local cmdline="$runtime $cmd" | ||
|
||
image=$(eval "$cmdline" 2>/dev/null |\ | ||
grep -A 1 '\[Image\]' |\ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe '^\[Image\]'
to be sure we pick up that top level section?
The grep -A 1
is obviously a bit tied to the exact output of the xxx-env
command - probably not an issue, but could fall over one day.
I did something v.similar a couple of days ago with some awk like:
RUNTIME_PATH=$(awk '/^\[Runtime\]$/ {foundit=1} /^ Path =/ { if (foundit==1) {print $3; foundit=0} } ' <<< "$toml" | sed 's/"//g')
just for reference. Also not perfect I think.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've added the anchor and I agree about the fagility issue, but until we start producing output in a superior machine readable format (JSON, but ideally YAML), I think we're going to continue to have this risk.
Did you mention you were going to add JSON support to kata-env
... ? 😄
Add a data collection script that can be run by users and its output pasted directly into a github issue. The script is designed to make diagnosing issues as easy as possible and its output provides a summary of a Kata Containers system including: - Versions of all components. - Details of container managers. - Errors found in the system journal. Fixes kata-containers#80. Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
Add a template that will offer guidance for when users visit the following URL: - https://github.com/clearcontainers/runtime/issues/new Crucially, the template asks the users to run the `kata-collect-data.sh` script and paste the output direct into the issue. Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
ce45224
to
f93b6d2
Compare
local project | ||
|
||
# CC 2.x runtime. This shouldn't be installed but let's check anyway | ||
pattern+="cc-oci-runtime" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
here we are considering to cc-oci-runtime (2.x), I wonder if cc-runtime (3.0) should be consider too
done | ||
|
||
# assets | ||
pattern+="|clear-containers-image" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
might be ${project}-containers-image
?
pattern+="|qemu-lite" | ||
|
||
# default distro hypervisor | ||
pattern+="|qemu-system-x86" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would be a nice to have aarch64
and arm
Add a data collection script that can be run by users and its output
pasted directly into a github issue.
The script is designed to make diagnosing issues as easy as possible
and its output provides a summary of a Kata Containers system
including:
Fixes #80.
Signed-off-by: James O. D. Hunt james.o.hunt@intel.com