From 3b9f99c549422a005676e99777cecc450177f157 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Alfonso=20Mart=C3=ADnez?= Date: Tue, 10 Mar 2020 15:06:35 +0100 Subject: [PATCH] vstart_runner.py: fix OSError when checking if non-existent path is mounted MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Fixes: https://tracker.ceph.com/issues/44545 Signed-off-by: Alfonso Martínez --- qa/tasks/vstart_runner.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/qa/tasks/vstart_runner.py b/qa/tasks/vstart_runner.py index 8d48152afd6f7..7055ebb7c9d8d 100644 --- a/qa/tasks/vstart_runner.py +++ b/qa/tasks/vstart_runner.py @@ -1408,11 +1408,11 @@ def exec_test(): mount = LocalFuseMount(ctx, test_dir, client_id) mounts.append(mount) - if mount.is_mounted(): - log.warn("unmounting {0}".format(mount.mountpoint)) - mount.umount_wait() - else: - if os.path.exists(mount.mountpoint): + if os.path.exists(mount.mountpoint): + if mount.is_mounted(): + log.warn("unmounting {0}".format(mount.mountpoint)) + mount.umount_wait() + else: os.rmdir(mount.mountpoint) from tasks.cephfs_test_runner import DecoratingLoader -- 2.47.3