From 75d8e5ca9e12ab21d4dd77e1280dc3d916ffee71 Mon Sep 17 00:00:00 2001 From: lcheng Date: Mon, 29 Jul 2024 17:22:52 +0800 Subject: [PATCH] Fix OSError when checking the mount status Wrong nfs server cleanup order causes OSError. So update code. Signed-off-by: lcheng --- virttest/test_setup/storage.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/virttest/test_setup/storage.py b/virttest/test_setup/storage.py index c19df09c4d..b47b47cdc7 100644 --- a/virttest/test_setup/storage.py +++ b/virttest/test_setup/storage.py @@ -90,8 +90,6 @@ def cleanup(self): if self.params.get("storage_type") == "nfs": migration_setup = self.params.get("migration_setup", "no") == "yes" - image_nfs = Nfs(self.params) - image_nfs.cleanup() if migration_setup: # Cleanup NFS client on remote host nfs_client = NFSClient(self.params) @@ -99,3 +97,5 @@ def cleanup(self): # Cleanup selinux on remote host seLinuxBool = SELinuxBoolean(self.params) seLinuxBool.cleanup(keep_authorized_keys=True) + image_nfs = Nfs(self.params) + image_nfs.cleanup()