From: Alfonso Martínez Date: Tue, 10 Mar 2020 14:06:35 +0000 (+0100) Subject: vstart_runner.py: fix OSError when checking if non-existent path is mounted X-Git-Tag: v16.0.0~39^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F33856%2Fhead;p=ceph.git vstart_runner.py: fix OSError when checking if non-existent path is mounted Fixes: https://tracker.ceph.com/issues/44545 Signed-off-by: Alfonso Martínez --- diff --git a/qa/tasks/vstart_runner.py b/qa/tasks/vstart_runner.py index 8d48152afd6..7055ebb7c9d 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