From b7f55362b274621e1525405c7d8328c06eeecff9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Han?= Date: Thu, 9 Sep 2021 12:38:42 +0200 Subject: [PATCH] ceph: print the output on errors MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sometimes the error does not tell much, so as `exit status 1` and printing the output along returning the error is useful. For instance, I saw a job failing with no osd and the prepare job had those lines: ``` exec: Running command: lsblk /dev/sdb1 --bytes --nodeps --pairs .... inventory: skipping device "sdb1". exit status 1 ``` We need to understand more about the lsblk issue. Signed-off-by: Sébastien Han --- pkg/util/sys/device.go | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/util/sys/device.go b/pkg/util/sys/device.go index 727bf6187..873633cd6 100644 --- a/pkg/util/sys/device.go +++ b/pkg/util/sys/device.go @@ -221,6 +221,7 @@ func GetDevicePropertiesFromPath(devicePath string, executor exec.Executor) (map return map[string]string{}, nil } + logger.Errorf("failed to execute lsblk. output: %s", output) return nil, err }