]> git-server-git.apps.pok.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>
Wed, 1 May 2024 13:00:37 +0000 (09:00 -0400)
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 5cf73f7711222333bd209813286c2f326b7d371f..7bc38131d5876a8a8a02930c84d1b9fa3cdee581 100644 (file)
@@ -1217,6 +1217,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;