From c5b22b535b6e4e37c242d39322104dd1901ec133 Mon Sep 17 00:00:00 2001 From: Dave Chen Date: Thu, 30 Jun 2022 14:50:32 +0800 Subject: [PATCH] kubeadm: Force to disable debug mode for `crictl` Signed-off-by: Dave Chen --- cmd/kubeadm/app/util/runtime/runtime.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cmd/kubeadm/app/util/runtime/runtime.go b/cmd/kubeadm/app/util/runtime/runtime.go index e76f4836cb9..c871a44210b 100644 --- a/cmd/kubeadm/app/util/runtime/runtime.go +++ b/cmd/kubeadm/app/util/runtime/runtime.go @@ -84,7 +84,10 @@ func (runtime *CRIRuntime) IsRunning() error { // ListKubeContainers lists running k8s CRI pods func (runtime *CRIRuntime) ListKubeContainers() ([]string, error) { - out, err := runtime.crictl("pods", "-q").CombinedOutput() + // Disable debug mode regardless how the crictl is configured so that the debug info won't be + // iterpreted to the Pod ID. + args := []string{"-D=false", "pods", "-q"} + out, err := runtime.crictl(args...).CombinedOutput() if err != nil { return nil, errors.Wrapf(err, "output: %s, error", string(out)) }