From 64eddc4d75cdebbe3fa0958c54e1853cc752d84e Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Sun, 17 Mar 2019 14:04:12 -0500 Subject: [PATCH] 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 --- src/mon/MonClient.cc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/mon/MonClient.cc b/src/mon/MonClient.cc index 351deaa9f4e..8df084b7df6 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) { -- 2.39.5