From: Sage Weil Date: Wed, 2 Aug 2017 13:33:55 +0000 (-0400) Subject: ceph: wait for maps before doing 'ceph tell ... help' X-Git-Tag: ses5-milestone10~3^2~24^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F16756%2Fhead;p=ceph.git 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 --- diff --git a/src/ceph.in b/src/ceph.in index e34c468a7e92..bb2516c788f9 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)