]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
qa: wait for OSDMap to propagate for snap purge 16226/head
authorPatrick Donnelly <pdonnell@redhat.com>
Fri, 7 Jul 2017 21:43:55 +0000 (14:43 -0700)
committerPatrick Donnelly <pdonnell@redhat.com>
Fri, 7 Jul 2017 22:12:42 +0000 (15:12 -0700)
Note: unmounting the client is not necessary for purging snapshots.

Fixes: http://tracker.ceph.com/issues/20072
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
qa/tasks/cephfs/test_strays.py

index b8538f5353aad59c932a80a51ad419666d4fd71b..b64f3e931dca692e6e3681cf2e270c04f3987c5d 100644 (file)
@@ -785,18 +785,23 @@ class TestStrays(CephFSTestCase):
 
         # Remove the snapshot
         self.mount_a.run_shell(["rmdir", "snapdir/.snap/snap1"])
-        self.mount_a.umount_wait()
 
         # Purging file_a doesn't happen until after we've flushed the journal, because
         # it is referenced by the snapshotted subdir, and the snapshot isn't really
         # gone until the journal references to it are gone
         self.fs.mds_asok(["flush", "journal"])
 
+        # Wait for purging to complete, which requires the OSDMap to propagate to the OSDs.
+        # See also: http://tracker.ceph.com/issues/20072
+        self.wait_until_true(
+            lambda: self.fs.data_objects_absent(file_a_ino, size_mb * 1024 * 1024),
+            timeout=60
+        )
+
         # See that a purge happens now
         self._wait_for_counter("mds_cache", "strays_enqueued", 2)
         self._wait_for_counter("purge_queue", "pq_executed", 2)
 
-        self.assertTrue(self.fs.data_objects_absent(file_a_ino, size_mb * 1024 * 1024))
         self.await_data_pool_empty()
 
     def test_fancy_layout(self):