]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/MgrClient: fix 'tell mgr.x ...' 31989/head
authorSage Weil <sage@redhat.com>
Tue, 3 Dec 2019 23:56:46 +0000 (17:56 -0600)
committerSage Weil <sage@redhat.com>
Tue, 3 Dec 2019 23:56:46 +0000 (17:56 -0600)
If we start the command before we get the mgrmap at the client, we
will send MCommand via a different code path; make sure it behaves
correctly too.

Missed this in 6f35d2835268eade059535b62378d6d407ef9e87

Signed-off-by: Sage Weil <sage@redhat.com>
src/mgr/MgrClient.cc

index 0667d8c727357439ee05a9755eac0d5be902eba6..fd22c05e99800ff6df9264a83734fa7eb8e27fd0 100644 (file)
@@ -193,7 +193,7 @@ void MgrClient::reconnect()
   while (p != command_table.get_commands().end()) {
     auto tid = p->first;
     auto& op = p->second;
-    ldout(cct,10) << "resending " << tid << dendl;
+    ldout(cct,10) << "resending " << tid << (op.tell ? " (tell)":" (cli)") << dendl;
     MessageRef m;
     if (op.tell) {
       if (op.name.size() && op.name != map.active_name) {
@@ -206,8 +206,9 @@ void MgrClient::reconnect()
        command_table.erase(tid);
        continue;
       }
-      // note: will not work for pre-octopus mgrs
-      m = op.get_message({}, false);
+      // Set fsid argument to signal that this is really a tell message (and
+      // we are not a legacy client sending a non-tell command via MCommand).
+      m = op.get_message(monmap->fsid, false);
     } else {
       m = op.get_message(
        {},