Skip to content

Commit

Permalink
fixing multipath flush problem in module_load_unload.py
Browse files Browse the repository at this point in the history
multipath flush was failing due to string not matching exactly as below,

nvme                   55964  4
nvme_core             183368  5 nvme

we were expecting only : "nvme                   55964  4"
the first line only. But it is matching all the line that contain the module name.
-w option resolve this as below.

nvme                   55964  4

Signed-off-by: Naresh Bannoth <[email protected]>
  • Loading branch information
Naresh-ibm committed Feb 14, 2024
1 parent 885dfc9 commit b19cd8d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion io/driver/module_unload_load.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def flush_mpath(self, mdl):
"""
flush the multipath
"""
cmd = "lsmod | grep -i ^%s" % mdl
cmd = "lsmod | grep -iw ^%s" % mdl
for i in range(20):
if process.getoutput(cmd).split(" ")[-1] == '0':
return True
Expand Down

0 comments on commit b19cd8d

Please sign in to comment.