From: Xiubo Li Date: Thu, 23 Apr 2020 07:21:09 +0000 (-0400) Subject: qa/cephfs: switch to mount_wait() to avoid possible umounted assert X-Git-Tag: v16.1.0~2502^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=8921c8e1dc256bb6f4b8115e417e11a5bef33903;p=ceph.git qa/cephfs: switch to mount_wait() to avoid possible umounted assert For the fuse mount, it sometime will need to wait to a moment to let the client get ready. Signed-off-by: Xiubo Li --- diff --git a/qa/tasks/cephfs/test_quota.py b/qa/tasks/cephfs/test_quota.py index dcfda5e216e3..cad5baca7a6b 100644 --- a/qa/tasks/cephfs/test_quota.py +++ b/qa/tasks/cephfs/test_quota.py @@ -47,7 +47,7 @@ class TestQuota(CephFSTestCase): self.mount_a.setfattr("./subdir", "ceph.quota.max_bytes", "%s" % size_before) - self.mount_b.mount(mount_path="/subdir") + self.mount_b.mount_wait(mount_path="/subdir") self.assertDictEqual( self.mount_b.df(), diff --git a/qa/tasks/cephfs/test_sessionmap.py b/qa/tasks/cephfs/test_sessionmap.py index bdcde71d095e..4446a15c17d2 100644 --- a/qa/tasks/cephfs/test_sessionmap.py +++ b/qa/tasks/cephfs/test_sessionmap.py @@ -186,7 +186,7 @@ class TestSessionMap(CephFSTestCase): # Try to mount the client, see that it fails with self.assert_cluster_log("client session with non-allowable root '/baz' denied"): with self.assertRaises(CommandFailedError): - self.mount_b.mount(mount_path="/foo/bar") + self.mount_b.mount_wait(mount_path="/foo/bar") def test_session_evict_blacklisted(self): """ diff --git a/qa/tasks/cephfs/test_volume_client.py b/qa/tasks/cephfs/test_volume_client.py index e02ba0ee76eb..fafe7498d474 100644 --- a/qa/tasks/cephfs/test_volume_client.py +++ b/qa/tasks/cephfs/test_volume_client.py @@ -201,7 +201,7 @@ vc.disconnect() # the volume. self._configure_guest_auth(self.mount_b, self.mounts[2], guest_entity, mount_path, namespace_prefix) - self.mounts[2].mount(mount_path=mount_path) + self.mounts[2].mount_wait(mount_path=mount_path) # The kernel client doesn't have the quota-based df behaviour, # or quotas at all, so only exercise the client behaviour when @@ -450,7 +450,7 @@ vc.disconnect() # Mount the volume. guest_mounts[i].mountpoint_dir_name = 'mnt.{id}.{suffix}'.format( id=guest_entity, suffix=str(i)) - guest_mounts[i].mount(mount_path=mount_paths[i]) + guest_mounts[i].mount_wait(mount_path=mount_paths[i]) guest_mounts[i].write_n_mb("data.bin", 1) @@ -582,7 +582,7 @@ vc.disconnect() mount_path, readonly=False) # Mount the volume, and write to it. - guest_mount.mount(mount_path=mount_path) + guest_mount.mount_wait(mount_path=mount_path) guest_mount.write_n_mb("data.bin", 1) # Change the guest auth ID's authorization to read-only mount access. @@ -601,7 +601,7 @@ vc.disconnect() # immediate. The guest sees the change only after a remount of # the volume. guest_mount.umount_wait() - guest_mount.mount(mount_path=mount_path) + guest_mount.mount_wait(mount_path=mount_path) # Read existing content of the volume. self.assertListEqual(guest_mount.ls(guest_mount.mountpoint), ["data.bin"]) @@ -1062,7 +1062,7 @@ vc.disconnect() # Mount the volume in the guest using the auth ID to assert that the # auth caps are valid - guest_mount.mount(mount_path=mount_path) + guest_mount.mount_wait(mount_path=mount_path) def test_volume_without_namespace_isolation(self): """