]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mon/MgrMonitor: read cmd descs if empty on update_from_paxos() 18813/head
authorJoao Eduardo Luis <joao@suse.de>
Wed, 20 Sep 2017 16:53:40 +0000 (17:53 +0100)
committerNathan Cutler <ncutler@suse.com>
Wed, 8 Nov 2017 10:22:34 +0000 (11:22 +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)
(cherry picked from commit 86d143722e1f16a19a56ed7a163d1dc9327c0c90)
Signed-off-by: Joao Eduardo Luis <joao@suse.de>
(cherry picked from commit bb7ee14556c76062e68bb68c53fda851f38cc2f4)

src/mon/MgrMonitor.cc

index 1d43ec90255ce36ffd9cd8230a83648be2f1d895..7d01b6c7fac4ac61fdb9f537cfb68639b9e66125 100644 (file)
@@ -92,8 +92,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;