diff options
| author | kshithijiyer <kshithij.ki@gmail.com> | 2020-04-28 12:58:07 +0530 |
|---|---|---|
| committer | kshithijiyer <kshithij.ki@gmail.com> | 2020-04-28 12:58:07 +0530 |
| commit | 297637c78741c8348eb053ddd0b3bc12d068a9e2 (patch) | |
| tree | 99e7b27b10618ad7914c1f3b0a7a6bea3abdfbb8 /tests/functional/glusterd/test_volume_reset.py | |
| parent | 83afdf79df7ef3bd5c4557fdacc58e4513d76438 (diff) | |
[Libfix] Fix check_brick_pid_matches_glusterfsd_pid() to use pgrep
Problem:
On latest platforms pidof command is returning
multiple pids as shown below:
27190 27078 26854
This is becasue it was returning glusterd,glusterfsd
and glusterfs processes as well. The problem is that
/usr/sbin/glusterd is a link to glusterfsd.
'pidof' has a new feature that pidof searches for
the pattern in /proc/PID/cmdline, /proc/PID/stat and
finally /proc/PID/exe. Hence pidof matches realpath
of /proc/<pid_of_glusterd>/exe as /usr/sbin/glusterfsd
and results in glusterd, glusterfs and glusterfsd pids
being returned in output.
Fix:
Use pgrep instead of pidof to get glusterfsd
pids. And change the split logic accordingly.
Change-Id: I729e05c3f4cacf7bf826592da965a94a49bb6f33
Signed-off-by: kshithijiyer <kshithij.ki@gmail.com>
Diffstat (limited to 'tests/functional/glusterd/test_volume_reset.py')
0 files changed, 0 insertions, 0 deletions
