From: Patrick Donnelly Date: Fri, 19 Apr 2024 02:18:57 +0000 (-0400) Subject: mon/MgrMonitor: promote standby when unsetting down flag X-Git-Tag: testing/wip-mchangir-testing-20250303.143918-reef-debug~1^2~11 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=6a2e7e6d59f22f2989b33479995665979c765ec9;p=ceph-ci.git mon/MgrMonitor: promote standby when unsetting down flag In the same epoch, to simplify testing. Signed-off-by: Patrick Donnelly (cherry picked from commit e0441402d6691f68c3ea95ce60b6e3ba101a0a1e) --- diff --git a/src/mon/MgrMonitor.cc b/src/mon/MgrMonitor.cc index 74cfa711386..e6fc5052164 100644 --- a/src/mon/MgrMonitor.cc +++ b/src/mon/MgrMonitor.cc @@ -1231,6 +1231,9 @@ bool MgrMonitor::prepare_command(MonOpRequestRef op) } } else { pending_map.flags &= ~(MgrMap::FLAG_DOWN); + if (pending_map.active_gid == 0) { + promote_standby(); + } } } else { return -EINVAL;