]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
qa: allow failing whatever the active mgr is
authorPatrick Donnelly <pdonnell@redhat.com>
Thu, 21 Dec 2023 16:11:03 +0000 (11:11 -0500)
committerPatrick Donnelly <pdonnell@redhat.com>
Tue, 26 Mar 2024 13:35:35 +0000 (09:35 -0400)
Vanilla `mgr fail` will just fail the active.

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
(cherry picked from commit a066467c9dc6f34a58e4085d05238a5db3f45cba)

qa/tasks/mgr/mgr_test_case.py

index b96f17d81f3871b3f4dd1217500a58c0789e42d7..aa5bc6e56a9fac8ffa48178af422d43a4b5704ee 100644 (file)
@@ -29,8 +29,11 @@ class MgrCluster(CephCluster):
     def mgr_stop(self, mgr_id):
         self.mgr_daemons[mgr_id].stop()
 
-    def mgr_fail(self, mgr_id):
-        self.mon_manager.raw_cluster_cmd("mgr", "fail", mgr_id)
+    def mgr_fail(self, mgr_id=None):
+        if mgr_id is None:
+            self.mon_manager.raw_cluster_cmd("mgr", "fail")
+        else:
+            self.mon_manager.raw_cluster_cmd("mgr", "fail", mgr_id)
 
     def mgr_restart(self, mgr_id):
         self.mgr_daemons[mgr_id].restart()