From b19cd8d5d1b974c0fe6a560df41ef941c3837b80 Mon Sep 17 00:00:00 2001 From: Naresh Bannoth Date: Wed, 14 Feb 2024 16:18:56 +0530 Subject: [PATCH] fixing multipath flush problem in module_load_unload.py 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 --- io/driver/module_unload_load.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/io/driver/module_unload_load.py b/io/driver/module_unload_load.py index d8a50fe57..bf19db22c 100755 --- a/io/driver/module_unload_load.py +++ b/io/driver/module_unload_load.py @@ -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