From: Joao Eduardo Luis Date: Wed, 20 Sep 2017 16:53:40 +0000 (+0100) Subject: mon/MgrMonitor: read cmd descs if empty on update_from_paxos() X-Git-Tag: v12.2.2~182^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F18038%2Fhead;p=ceph.git mon/MgrMonitor: read cmd descs if empty on update_from_paxos() If the MgrMonitor's `command_descs` is empty, the monitor will not send the mgr commands to clients on `get_descriptions`. This, in turn, has the clients sending the commands to the monitors, which will have no idea how to handle them. Therefore, make sure to read the `command_descs` from disk if the vector is empty. Fixes: http://tracker.ceph.com/issues/21300 Signed-off-by: Joao Eduardo Luis (cherry picked from commit 3d06079bae0fbc096d6c3639807d9be3597e841a) --- diff --git a/src/mon/MgrMonitor.cc b/src/mon/MgrMonitor.cc index 3a5ad739126..f11859971c6 100644 --- a/src/mon/MgrMonitor.cc +++ b/src/mon/MgrMonitor.cc @@ -85,8 +85,9 @@ void MgrMonitor::update_from_paxos(bool *need_bootstrap) check_subs(); if (version == 1 - || (map.get_available() - && (!old_available || old_gid != map.get_active_gid()))) { + || command_descs.empty() + || (map.get_available() + && (!old_available || old_gid != map.get_active_gid()))) { dout(4) << "mkfs or daemon transitioned to available, loading commands" << dendl; bufferlist loaded_commands;