diff options
| author | kshithijiyer <kshithij.ki@gmail.com> | 2020-04-24 18:46:14 +0530 |
|---|---|---|
| committer | Bala Konda Reddy M <bala12352@gmail.com> | 2020-04-27 05:53:26 +0000 |
| commit | 83afdf79df7ef3bd5c4557fdacc58e4513d76438 (patch) | |
| tree | 829219f167b95b24fcaee3990642f9596d048ff5 /tests/functional/glusterd/test_glusterd_replace_brick.py | |
| parent | 568ce66ba3c79604e5b5428f51abe99e9d968e63 (diff) | |
[Libfix] Fix get_brick_processes_count() 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: Ie215734387989f2d8cb19e4b4f7cddc73d2a5608
Signed-off-by: kshithijiyer <kshithij.ki@gmail.com>
Diffstat (limited to 'tests/functional/glusterd/test_glusterd_replace_brick.py')
0 files changed, 0 insertions, 0 deletions
