From: Sage Weil Date: Sun, 17 Mar 2019 19:04:12 +0000 (-0500) Subject: mon/MonClient: tolerate lack of authorizer for some dispatchers X-Git-Tag: v15.1.0~2836^2~7 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=64eddc4d75cdebbe3fa0958c54e1853cc752d84e;p=ceph.git mon/MonClient: tolerate lack of authorizer for some dispatchers This is the equivalent of b8d1c80370443975ca291caeac037ab179dd3791, but in the new auth framework. OSD heartbeats prior to nautilus do not add authorizers to the heartbeat channel. Signed-off-by: Sage Weil --- diff --git a/src/mon/MonClient.cc b/src/mon/MonClient.cc index 351deaa9f4e9..8df084b7df6d 100644 --- a/src/mon/MonClient.cc +++ b/src/mon/MonClient.cc @@ -1430,6 +1430,14 @@ int MonClient::handle_auth_request( const ceph::buffer::list& payload, ceph::buffer::list *reply) { + // for some channels prior to nautilus (osd heartbeat), we tolerate the lack of + // an authorizer. + if (payload.length() == 0 && + !handle_authentication_dispatcher->require_authorizer) { + handle_authentication_dispatcher->ms_handle_authentication(con); + return 1; + } + auth_meta->auth_mode = payload[0]; if (auth_meta->auth_mode < AUTH_MODE_AUTHORIZER || auth_meta->auth_mode > AUTH_MODE_AUTHORIZER_MAX) {