]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mon/MgrMonitor: read cmd descs if empty on update_from_paxos() 18038/head
authorJoao Eduardo Luis <joao@suse.de>
Wed, 20 Sep 2017 16:53:40 +0000 (17:53 +0100)
committerJoao Eduardo Luis <joao@wipwd.org>
Fri, 29 Sep 2017 10:27:50 +0000 (11:27 +0100)
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 <joao@suse.de>
(cherry picked from commit 3d06079bae0fbc096d6c3639807d9be3597e841a)

src/mon/MgrMonitor.cc

index 3a5ad7391260b5fd5e49e596e7b40a120838be8d..f11859971c620d7077187a2fd2fe39aba879a8e4 100644 (file)
@@ -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;