]> 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>
Tue, 30 Apr 2024 20:58:01 +0000 (16:58 -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 63abbcac495b1e7cb1e60072afdbc0ab5e44be53..aca2846db88e69061a2c5059d03121d2d0a41e6b 100644 (file)
@@ -1245,6 +1245,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;