From 0c83c8245ffab2ff3f568078651553f59ef475bb Mon Sep 17 00:00:00 2001
From: Martin Perina <mperina@redhat.com>
Date: Wed, 21 Aug 2019 11:17:44 +0200
Subject: [PATCH] [vdsm]: Fix executing shell commands
During review process of [1] it was suggested to replace '/bin/sh' with
just 'sh', but unfortunately this change caused an error to not include
information about VDSM mount points as described in [2]. This fix
restores previous state and add full path to shell executions.
[1] https://github.com/sosreport/sos/pull/1205
[2] https://bugzilla.redhat.com/1743304
Resolves: #1761
Signed-off-by: Martin Perina <mperina@redhat.com>
Signed-off-by: Pavel Moravec <pmoravec@redhat.com>
---
sos/plugins/vdsm.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sos/plugins/vdsm.py b/sos/plugins/vdsm.py
index 35eec5093..c4e2af5f6 100644
--- a/sos/plugins/vdsm.py
+++ b/sos/plugins/vdsm.py
@@ -93,8 +93,8 @@ def setup(self):
])
self.add_cmd_output([
"ls -ldZ /etc/vdsm",
- "su vdsm -s sh -c 'tree -l /rhev/data-center'",
- "su vdsm -s sh -c 'ls -lR /rhev/data-center'"
+ "su vdsm -s /bin/sh -c 'tree -l /rhev/data-center'",
+ "su vdsm -s /bin/sh -c 'ls -lR /rhev/data-center'"
])
self.add_cmd_output([
"lvm vgs -v -o +tags --config \'%s\'" % LVM_CONFIG,