From cd0094678d0e01fd7b74e2f6f5ff47a16a60dddd Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Fri, 12 Mar 2021 15:00:49 -0500 Subject: [PATCH] mon/MgrMonitor: populate available_modules from promote_standby() 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 --- src/mon/MgrMonitor.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/mon/MgrMonitor.cc b/src/mon/MgrMonitor.cc index 52f1f8b94e1..4c9cfb6efd9 100644 --- a/src/mon/MgrMonitor.cc +++ b/src/mon/MgrMonitor.cc @@ -871,6 +871,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; -- 2.39.5