]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mon/MgrMonitor: populate available_modules from promote_standby() 40757/head
authorSage Weil <sage@newdream.net>
Fri, 12 Mar 2021 20:00:49 +0000 (15:00 -0500)
committerNathan Cutler <ncutler@suse.com>
Sat, 10 Apr 2021 17:52:46 +0000 (19:52 +0200)
This was done in the beacon path, where there is no active mgr and we
get a new entrant, but not for this case where an existing standby is
promoted to active.

This fixes a problem during upgrade where a new (standby) mgr's modules
have a new module option but it is not reflected immediately (not until
the next beacon).

Fixes: https://tracker.ceph.com/issues/49778
Signed-off-by: Sage Weil <sage@newdream.net>
(cherry picked from commit cd0094678d0e01fd7b74e2f6f5ff47a16a60dddd)

src/mon/MgrMonitor.cc

index 88b987b721166850fec192dc0a7d6837493af006..6ddc01224522425f3bd79b863d6cfc89a0ae8cd0 100644 (file)
@@ -810,6 +810,8 @@ bool MgrMonitor::promote_standby()
     auto replacement_gid = pending_map.standbys.begin()->first;
     pending_map.active_gid = replacement_gid;
     pending_map.active_name = pending_map.standbys.at(replacement_gid).name;
+    pending_map.available_modules =
+      pending_map.standbys.at(replacement_gid).available_modules;
     pending_map.active_mgr_features =
       pending_map.standbys.at(replacement_gid).mgr_features;
     pending_map.available = false;