]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
qa: add test to verify blocking of osd pool mksnap for fs pools 52397/head
authorMilind Changire <mchangir@redhat.com>
Wed, 26 Apr 2023 05:11:24 +0000 (10:41 +0530)
committerMilind Changire <mchangir@redhat.com>
Tue, 11 Jul 2023 16:05:03 +0000 (21:35 +0530)
Signed-off-by: Milind Changire <mchangir@redhat.com>
(cherry picked from commit ab64bfaaf978cb9a14ff0520d4dc51ea32e1e93c)

qa/tasks/cephfs/test_snapshots.py

index 4462d8d7b9ac64f8f9d106484c41133624b8dc3f..30ac4485df07e83be84d39654be6674e5b4a98a9 100644 (file)
@@ -549,6 +549,16 @@ class TestMonSnapsAndFsPools(CephFSTestCase):
         with self.assertRaises(CommandFailedError):
             self.fs.rados(["mksnap", "snap2"], pool=self.fs.get_metadata_pool_name())
 
+        with self.assertRaises(CommandFailedError):
+            test_pool_name = self.fs.get_data_pool_name()
+            base_cmd = f'osd pool mksnap {test_pool_name} snap3'
+            self.run_cluster_cmd(base_cmd)
+
+        with self.assertRaises(CommandFailedError):
+            test_pool_name = self.fs.get_metadata_pool_name()
+            base_cmd = f'osd pool mksnap {test_pool_name} snap4'
+            self.run_cluster_cmd(base_cmd)
+
     def test_attaching_pools_with_snaps_to_fs_fails(self):
         """
         Test that attempt to attach pool with snapshots to an fs fails