Skip to content

Commit

Permalink
mgr/MgrClient: fix 'tell mgr.x ...'
Browse files Browse the repository at this point in the history
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 6f35d28

Signed-off-by: Sage Weil <sage@redhat.com>
  • Loading branch information
liewegas committed Dec 3, 2019
1 parent e585152 commit dd23fb4
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/mgr/MgrClient.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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(
{},
Expand Down

0 comments on commit dd23fb4

Please sign in to comment.