From c2f7e85126354bbf7ce034cfc1a8875a5cf6e3bd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Han?= Date: Mon, 9 May 2022 12:06:35 +0200 Subject: [PATCH] core: add more debug info to the prepare pod MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When running the device property commands, let's also log their results for better debugging/visibility. Signed-off-by: Sébastien Han (cherry picked from commit 77b2e10c140e4b4dea44b7dc28900f6fb8f15258) --- pkg/util/sys/device.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkg/util/sys/device.go b/pkg/util/sys/device.go index ae631bd8f..76a85f58c 100644 --- a/pkg/util/sys/device.go +++ b/pkg/util/sys/device.go @@ -208,11 +208,12 @@ func GetDeviceProperties(device string, executor exec.Executor) (map[string]stri // GetDevicePropertiesFromPath gets a device property from a path func GetDevicePropertiesFromPath(devicePath string, executor exec.Executor) (map[string]string, error) { output, err := executor.ExecuteCommandWithOutput("lsblk", devicePath, - "--bytes", "--nodeps", "--pairs", "--paths", "--output", "SIZE,ROTA,RO,TYPE,PKNAME,NAME,KNAME") + "--bytes", "--nodeps", "--pairs", "--paths", "--output", "SIZE,ROTA,RO,TYPE,PKNAME,NAME,KNAME,MOUNTPOINT,FSTYPE") if err != nil { logger.Errorf("failed to execute lsblk. output: %s", output) return nil, err } + logger.Debugf("lsblk output: %q", output) return parseKeyValuePairString(output), nil } @@ -236,6 +237,7 @@ func GetUdevInfo(device string, executor exec.Executor) (map[string]string, erro if err != nil { return nil, err } + logger.Debugf("udevadm info output: %q", output) return parseUdevInfo(output), nil }