Skip to content
This repository has been archived by the owner on May 12, 2021. It is now read-only.

scripts: Add data collection script #93

Merged

Conversation

jodh-intel
Copy link
Contributor

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 #80.

Signed-off-by: James O. D. Hunt james.o.hunt@intel.com

@jodh-intel jodh-intel force-pushed the add-data-collection-script branch from b1642c4 to ce45224 Compare March 22, 2018 13:05
@jodh-intel
Copy link
Contributor Author

Ping @bergwolf, @grahamwhaley, @sboeuf.

Copy link
Contributor

@grahamwhaley grahamwhaley left a 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

#
# Copyright (c) 2017-2018 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SPDX header style?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

local cmdline="$runtime $cmd"

image=$(eval "$cmdline" 2>/dev/null |\
grep -A 1 '\[Image\]' |\
Copy link
Contributor

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.

Copy link
Contributor Author

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>
@jodh-intel jodh-intel force-pushed the add-data-collection-script branch from ce45224 to f93b6d2 Compare March 22, 2018 13:56
local project

# CC 2.x runtime. This shouldn't be installed but let's check anyway
pattern+="cc-oci-runtime"
Copy link

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"
Copy link

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"
Copy link

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants