]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mon/MgrMonitor: promote standby when unsetting down flag
authorPatrick Donnelly <pdonnell@redhat.com>
Fri, 19 Apr 2024 02:18:57 +0000 (22:18 -0400)
committerPatrick Donnelly <pdonnell@redhat.com>
Mon, 29 Apr 2024 16:22:26 +0000 (12:22 -0400)
In the same epoch, to simplify testing.

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
src/mon/MgrMonitor.cc

index a7bd42c861170da8b32b4b127aff6e9fe6447a27..c235d9e6219e9ffa58b00416994436434546ee71 100644 (file)
@@ -1199,6 +1199,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;