path: root/glustolibs-gluster/glustolibs/gluster
diff options
authorBala Konda Reddy M <>2020-05-15 12:28:47 +0530
committerBala Konda Reddy M <>2020-05-15 07:18:19 +0000
commitcb3681d9f3992532c40d7ed7329a675dcd9d75d2 (patch)
tree12cf991869d7e7b8cb3c119cf2398d4f06126dba /glustolibs-gluster/glustolibs/gluster
parent352417b6364dc66bbeae7e9eddad25395d77c728 (diff)
[Libfix] Fixing the pkill command
Problem: Below command to 'pkill pidof glusterd' is not right, as it is not getting the pidof glusterd. eg: cmd = "pkill pidof glusterd" ret, out ,err ="", cmd, "root") >>> ret, out, err (2, '', "pkill: only one pattern can be provided\n Try `pkill --help' for more information.\n") Here command is failing. Solution: Added `pidof glusterd` which will get proper glusterd pid and kill the stale pid after glusterd stop failed. cmd = "pkill `pidof glusterd`" ret, out ,err ="", cmd, "root") >>> ret, out, err (1, '', '') Note: The ret value is 1, as it is tried on a machine where glusterd is running. The purpose of the fix is to get the proper pid. Change-Id: Iacba3712852b9d16546ced9a4c071c62182fe385 Signed-off-by: Bala Konda Reddy M <>
Diffstat (limited to 'glustolibs-gluster/glustolibs/gluster')
1 files changed, 1 insertions, 1 deletions
diff --git a/glustolibs-gluster/glustolibs/gluster/ b/glustolibs-gluster/glustolibs/gluster/
index b07fe3ed5..65ecd139a 100644
--- a/glustolibs-gluster/glustolibs/gluster/
+++ b/glustolibs-gluster/glustolibs/gluster/
@@ -260,7 +260,7 @@ class GlusterBaseClass(TestCase):
ret = stop_glusterd(cls.servers)
if not ret:
g.log.error("Failed to stop glusterd")
- cmd_list = ("pkill pidof glusterd",
+ cmd_list = ("pkill `pidof glusterd`",
"rm /var/run/glusterd.socket")
for server in cls.servers:
for cmd in cmd_list: