From 5c1269b11e7f40bc4c525a0c84c3bd18c02b32d6 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Fri, 6 Sep 2019 09:43:35 -0500 Subject: [PATCH] ceph: send 'ceph tell mgr.X' to the right mgr Previously this would go to the active mgr, whoever that was. Signed-off-by: Sage Weil --- src/pybind/ceph_argparse.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/pybind/ceph_argparse.py b/src/pybind/ceph_argparse.py index eac7005e2e5e2..f3e3a5b6176ed 100644 --- a/src/pybind/ceph_argparse.py +++ b/src/pybind/ceph_argparse.py @@ -1378,11 +1378,14 @@ def send_command(cluster, target=('mon', ''), cmd=None, inbuf=b'', timeout=0, cluster.osd_command, osdid, cmd, inbuf, timeout=timeout) elif target[0] == 'mgr': + name = '' + if len(target) > 1: + name = target[1] if verbose: - print('submit {0} to {1}'.format(cmd, target[0]), + print('submit {0} to {1} name {2}'.format(cmd, target[0], name), file=sys.stderr) ret, outbuf, outs = run_in_thread( - cluster.mgr_command, cmd, inbuf, timeout=timeout) + cluster.mgr_command, cmd, inbuf, timeout=timeout, target=name) elif target[0] == 'pg': pgid = target[1] -- 2.39.5