From 9bd7b70aa369ff0e8f448ee2f1cfee46ae94a1ae Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Wed, 2 Aug 2017 09:33:55 -0400 Subject: [PATCH] ceph: wait for maps before doing 'ceph tell ... help' If we don't have a mgrmap yet (usually we do, but it's racy) MgrClient will assume EACCES if we try to send a command. This can lead to EACCES from 'ceph tell mgr help'. The mon sends maps in alphanumeric order, so waiting for osdmap will include mgrmap and fsmap. That's everything (current) except servicemap, but we can't 'tell' those anyway. Fixes: http://tracker.ceph.com/issues/20113 Signed-off-by: Sage Weil --- src/ceph.in | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/ceph.in b/src/ceph.in index e34c468a7e9..bb2516c788f 100755 --- a/src/ceph.in +++ b/src/ceph.in @@ -355,6 +355,9 @@ def do_extended_help(parser, args, target, partial): partial=partial)) def help_for_target(target, partial=None): + # wait for osdmap because we know this is sent after the mgrmap + # and monmap (it's alphabetical). + cluster_handle.wait_for_latest_osdmap() ret, outbuf, outs = json_command(cluster_handle, target=target, prefix='get_command_descriptions', timeout=10)