]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
tasks/cephfs: fix race while mounting
authorJohn Spray <john.spray@redhat.com>
Wed, 22 Jun 2016 12:00:44 +0000 (13:00 +0100)
committerNathan Cutler <ncutler@suse.com>
Sun, 4 Jun 2017 09:43:43 +0000 (11:43 +0200)
This could fail if the mount hadn't finished
coming up.

Signed-off-by: John Spray <john.spray@redhat.com>
(cherry picked from commit adfb757c898a80f18c15dafd02e29840c5931c87)

qa/tasks/cephfs/test_pool_perm.py

index b558cb18704b48f9256c74f5171451576ae31b3e..d625afde8d2febb2bd40d512ff7ebdad06a3b7a1 100644 (file)
@@ -80,6 +80,7 @@ class TestPoolPerm(CephFSTestCase):
 
         self.mount_a.umount_wait()
         self.mount_a.mount()
+        self.mount_a.wait_until_mounted()
 
         with self.assertRaises(CommandFailedError):
             self.mount_a.run_shell(["setfattr",
@@ -100,6 +101,7 @@ class TestPoolPerm(CephFSTestCase):
                 self.fs.get_data_pool_names()[1],
             ))
         self.mount_a.mount()
+        self.mount_a.wait_until_mounted()
         self.mount_a.run_shell(["setfattr",
                                 "-n", "ceph.file.layout.pool",
                                 "-v", new_pool_name, "layoutfile"])