]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
qa/cephfs: switch to mount_wait() to avoid possible umounted assert
authorXiubo Li <xiubli@redhat.com>
Thu, 23 Apr 2020 07:21:09 +0000 (03:21 -0400)
committerXiubo Li <xiubli@redhat.com>
Sat, 25 Apr 2020 10:21:55 +0000 (06:21 -0400)
For the fuse mount, it sometime will need to wait to a moment to let
the client get ready.

Signed-off-by: Xiubo Li <xiubli@redhat.com>
qa/tasks/cephfs/test_quota.py
qa/tasks/cephfs/test_sessionmap.py
qa/tasks/cephfs/test_volume_client.py

index dcfda5e216e3cb80adc11ece5ac2ad87dfba9b02..cad5baca7a6bc8ef4a72a47cc0a7beec68c6dc3a 100644 (file)
@@ -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(),
index bdcde71d095eb571b8760abce07d75aa80378fb6..4446a15c17d2c423e8b0c0d642d80b1f51ab6913 100644 (file)
@@ -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):
         """
index e02ba0ee76eb52f8025bba0237dfa412c463a568..fafe7498d474f232f591397b554624b93a9fede4 100644 (file)
@@ -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):
         """