From 2ce8d4263c4d32fa9def6aef7b03ebd0fcd0537d Mon Sep 17 00:00:00 2001 From: "James O. D. Hunt" Date: Thu, 30 Sep 2021 14:22:09 +0100 Subject: [PATCH] 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 --- src/runtime/virtcontainers/clh.go | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/runtime/virtcontainers/clh.go b/src/runtime/virtcontainers/clh.go index 170f76f4ec..50479880a6 100644 --- a/src/runtime/virtcontainers/clh.go +++ b/src/runtime/virtcontainers/clh.go @@ -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.