]> 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@ibm.com>
Tue, 25 Feb 2025 16:17:14 +0000 (11:17 -0500)
In the same epoch, to simplify testing.

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

src/mon/MgrMonitor.cc

index 74cfa7113860058f72598bea28dd18ae1bfc43e2..e6fc50521643ddceccd2e32ef9156ecf250d9182 100644 (file)
@@ -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;