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

kata-check: reduce default output verbosity#1987

Merged
jcvenegas merged 2 commits intokata-containers:masterfrom
marcov:kata-check-quiet
Aug 27, 2019
Merged

kata-check: reduce default output verbosity#1987
jcvenegas merged 2 commits intokata-containers:masterfrom
marcov:kata-check-quiet

Conversation

@marcov
Copy link
Copy Markdown
Contributor

@marcov marcov commented Aug 20, 2019

Update kata-check to print by default only relevant information about
the ability to run / create Kata Containers, and omit the list of checks
performed. Checks can still be printed using the --verbose flag.

Fixes: #1944

Signed-off-by: Marco Vedovati mvedovati@suse.com

@marcov marcov requested a review from jcvenegas August 20, 2019 14:21
@marcov
Copy link
Copy Markdown
Contributor Author

marcov commented Aug 20, 2019

/test

@jodh-intel
Copy link
Copy Markdown

Hi @marcov - could of things:

@marcov
Copy link
Copy Markdown
Contributor Author

marcov commented Aug 20, 2019

Sure @jodh-intel!

Before

$ sudo kata-runtime kata-check
INFO[0000] loaded configuration                          file=/usr/share/defaults/kata-containers/configuration-qemu.toml format=TOML
INFO[0000]                                               arch=amd64 arguments="\"kata-check\"" commit= name=kata-runtime pid=7611 source=runtime version=1.9.0-alpha0
INFO[0000] CPU property found                            arch=amd64 description="Intel Architecture CPU" name=GenuineIntel pid=7611 source=runtime type=attribute
INFO[0000] CPU property found                            arch=amd64 description="64Bit CPU" name=lm pid=7611 source=runtime type=flag
INFO[0000] CPU property found                            arch=amd64 description=SSE4.1 name=sse4_1 pid=7611 source=runtime type=flag
INFO[0000] CPU property found                            arch=amd64 description="Virtualization support" name=vmx pid=7611 source=runtime type=flag
INFO[0000] kernel property found                         arch=amd64 description="Kernel-based Virtual Machine" name=kvm pid=7611 source=runtime type=module
INFO[0000] kernel property found                         arch=amd64 description="Host kernel accelerator for virtio" name=vhost pid=7611 source=runtime type=module
INFO[0000] kernel property found                         arch=amd64 description="Host kernel accelerator for virtio network" name=vhost_net pid=7611 source=runtime type=module
INFO[0000] kernel property found                         arch=amd64 description="Host Support for Linux VM Sockets" name=vhost_vsock pid=7611 source=runtime type=module
INFO[0000] kernel property found                         arch=amd64 description="Intel KVM" name=kvm_intel pid=7611 source=runtime type=module
INFO[0000] System is capable of running Kata Containers  arch=amd64 name=kata-runtime pid=7611 source=runtime
INFO[0000] device available                              arch=amd64 check-type=full device=/dev/kvm name=kata-runtime pid=7611 source=runtime
INFO[0000] feature available                             arch=amd64 check-type=full feature=create-vm name=kata-runtime pid=7611 source=runtime
INFO[0000] System can currently create Kata Containers   arch=amd64 name=kata-runtime pid=7611 source=runtime

After

$ sudo kata-runtime kata-check
System is capable of running Kata Containers
System can currently create Kata Containers

After with --verbose:

$ sudo kata-runtime kata-check --verbose
INFO[0000] CPU property found                            arch=amd64 description="Intel Architecture CPU" name=GenuineIntel pid=7649 source=runtime type=attribute
INFO[0000] CPU property found                            arch=amd64 description="64Bit CPU" name=lm pid=7649 source=runtime type=flag
INFO[0000] CPU property found                            arch=amd64 description=SSE4.1 name=sse4_1 pid=7649 source=runtime type=flag
INFO[0000] CPU property found                            arch=amd64 description="Virtualization support" name=vmx pid=7649 source=runtime type=flag
INFO[0000] kernel property found                         arch=amd64 description="Kernel-based Virtual Machine" name=kvm pid=7649 source=runtime type=module
INFO[0000] kernel property found                         arch=amd64 description="Host kernel accelerator for virtio" name=vhost pid=7649 source=runtime type=module
INFO[0000] kernel property found                         arch=amd64 description="Host kernel accelerator for virtio network" name=vhost_net pid=7649 source=runtime type=module
INFO[0000] kernel property found                         arch=amd64 description="Host Support for Linux VM Sockets" name=vhost_vsock pid=7649 source=runtime type=module
INFO[0000] kernel property found                         arch=amd64 description="Intel KVM" name=kvm_intel pid=7649 source=runtime type=module
System is capable of running Kata Containers
INFO[0000] device available                              arch=amd64 check-type=full device=/dev/kvm name=kata-runtime pid=7649 source=runtime
INFO[0000] feature available                             arch=amd64 check-type=full feature=create-vm name=kata-runtime pid=7649 source=runtime
System can currently create Kata Containers

After when errors are detected:

$ sudo kata-runtime kata-check
WARN[0000] modprobe insert module failed: modprobe: ERROR: could not insert 'kvm': Unknown symbol in module, or unknown parameter (see dmesg)
  arch=amd64 error="exit status 1" module=kvm name=kata-runtime pid=8338 source=runtime
ERRO[0000] kernel property not found                     arch=amd64 description="Kernel-based Virtual Machine" name=kvm pid=8338 source=runtime type=module
WARN[0000] modprobe insert module failed: modprobe: ERROR: ctx=0x556d15d58260 path=/lib/modules/5.2.8-1-default/kernel/arch/x86/kvm/kvm.ko error=No such file or directory
modprobe: ERROR: ctx=0x556d15d58260 path=/lib/modules/5.2.8-1-default/kernel/arch/x86/kvm/kvm.ko error=No such file or directory
modprobe: ERROR: could not insert 'kvm_intel': Unknown symbol in module, or unknown parameter (see dmesg)
  arch=amd64 error="exit status 1" module=kvm_intel name=kata-runtime pid=8338 source=runtime
ERRO[0000] kernel property not found                     arch=amd64 description="Intel KVM" name=kvm_intel pid=8338 source=runtime type=module
ERRO[0000] ERROR: System is not capable of running Kata Containers  arch=amd64 name=kata-runtime pid=8338 source=runtime
ERROR: System is not capable of running Kata Containers

@marcov marcov requested a review from a team as a code owner August 20, 2019 18:07
@marcov
Copy link
Copy Markdown
Contributor Author

marcov commented Aug 20, 2019

/test

@codecov
Copy link
Copy Markdown

codecov bot commented Aug 20, 2019

Codecov Report

❗ No coverage uploaded for pull request base (master@9a6e299). Click here to learn what that means.
The diff coverage is 60%.

@@            Coverage Diff            @@
##             master    #1987   +/-   ##
=========================================
  Coverage          ?   52.01%           
=========================================
  Files             ?      107           
  Lines             ?    14352           
  Branches          ?        0           
=========================================
  Hits              ?     7465           
  Misses            ?     5999           
  Partials          ?      888

Copy link
Copy Markdown

@jodh-intel jodh-intel left a comment

Choose a reason for hiding this comment

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

Thanks @marcov.

lgtm

Since this is a behavioural change (a minor one, but still ... ;), we should mention this in the release notes for the next release.

/cc @jcvenegas, @egernst, @bergwolf.

@marcov
Copy link
Copy Markdown
Contributor Author

marcov commented Aug 21, 2019

A bunch of tests are failing.
For ARM, I may have broken the TestCCCheckCLIFunction, but I can't figure out what's wrong without an ARM machine.

@grahamwhaley
Copy link
Copy Markdown
Contributor

/cc @justin-he @jongwu for any ARM insights.

@jongwu
Copy link
Copy Markdown
Contributor

jongwu commented Aug 22, 2019

@marcov I test your code in arm64 machine. there maybe two issues:

  1. if the modules has been compiled in kernel, modules check will fail as it just check module under /lib/modules.
  2. even I comment out the code of assignment for moduleData TestCCCheckCLIFunction, the test will also fail at kernel modules check.

@marcov
Copy link
Copy Markdown
Contributor Author

marcov commented Aug 22, 2019

Thanks @jongwu, I found the bug in my code, I was not creating the fake modules in /tmp/..sys/modules/... so the check was failing.

@marcov
Copy link
Copy Markdown
Contributor Author

marcov commented Aug 22, 2019

/test

marcov added 2 commits August 22, 2019 20:18
Add a generic function to run CLI kata-check tests, shared by all the
args.

Signed-off-by: Marco Vedovati <mvedovati@suse.com>
Update kata-check to print by default only relevant information about
the ability to run / create Kata Containers, and omit the list of checks
performed. Checks can still be printed using the --verbose flag.

Fixes: kata-containers#1944

Signed-off-by: Marco Vedovati <mvedovati@suse.com>
@marcov
Copy link
Copy Markdown
Contributor Author

marcov commented Aug 22, 2019

/test

@marcov
Copy link
Copy Markdown
Contributor Author

marcov commented Aug 23, 2019

nemu and Power 8 jobs failures are failing on other PRs too, so we can prolly ignore them :-)

@jcvenegas jcvenegas merged commit af57485 into kata-containers:master Aug 27, 2019
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.

kata-check default output should be one liner

5 participants