From: Patrick Donnelly Date: Thu, 21 Dec 2023 16:11:03 +0000 (-0500) Subject: qa: allow failing whatever the active mgr is X-Git-Tag: v17.2.8~397^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=477fc5be49c59a873c75e91f16ef27af918de2fb;p=ceph.git qa: allow failing whatever the active mgr is Vanilla `mgr fail` will just fail the active. Signed-off-by: Patrick Donnelly (cherry picked from commit a066467c9dc6f34a58e4085d05238a5db3f45cba) --- diff --git a/qa/tasks/mgr/mgr_test_case.py b/qa/tasks/mgr/mgr_test_case.py index b96f17d81f38..aa5bc6e56a9f 100644 --- a/qa/tasks/mgr/mgr_test_case.py +++ b/qa/tasks/mgr/mgr_test_case.py @@ -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()