clh: Suppress hypervisor output to make guest output visible

Reduce the cloud-hypervisor log level from `Debug` to `Info` when hypervisor
debug is enabled. This is required since `Debug` level:

- Is overkill for debugging hypervisor failures.
- Effectively hides the output from the guest kernel and userland: CLH
  generates so much output that the output from the guest gets "lost in
  the noise" (experiments show that for each full CLH debug message, at most
  1 _byte_ of guest output is displayed).

Fixes: #2726.

Signed-off-by: James O. D. Hunt <james.o.hunt@intel.com>
This commit is contained in:
James O. D. Hunt 2021-09-30 14:22:09 +01:00
parent 8739a73dd3
commit 2ce8d4263c

View File

@ -936,7 +936,15 @@ func (clh *cloudHypervisor) launchClh() (int, error) {
// and in a nested environment this could increase
// the chances to fail because agent is not
// ready on time.
args = append(args, "-vv")
//
// Note that for debugging CLH boot failures, the Info level
// should be sufficient: Debug level generates so many
// messages it floods the output stream to the extent that it
// is almost impossible to view the guest kernel and userland
// output. For further details, see the discussion on:
//
// https://github.com/kata-containers/kata-containers/pull/2751
args = append(args, "-v")
}
// Disable the 'seccomp' option in clh for now.