]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph: send 'ceph tell mgr.X' to the right mgr
authorSage Weil <sage@redhat.com>
Fri, 6 Sep 2019 14:43:35 +0000 (09:43 -0500)
committerSage Weil <sage@redhat.com>
Tue, 1 Oct 2019 21:30:53 +0000 (16:30 -0500)
Previously this would go to the active mgr, whoever that was.

Signed-off-by: Sage Weil <sage@redhat.com>
src/pybind/ceph_argparse.py

index eac7005e2e5e2eae55213e8ccbf44fe7f32486e1..f3e3a5b6176ed5db6bf91c7a7da0444e4280b5d0 100644 (file)
@@ -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]