]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mon/MonClient: tolerate lack of authorizer for some dispatchers
authorSage Weil <sage@redhat.com>
Sun, 17 Mar 2019 19:04:12 +0000 (14:04 -0500)
committerSage Weil <sage@redhat.com>
Mon, 22 Apr 2019 12:07:36 +0000 (07:07 -0500)
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 <sage@redhat.com>
src/mon/MonClient.cc

index 351deaa9f4e99a67c0836baaa7d108b9c939ece1..8df084b7df6dd89bcac5ddca53d78872fc1f624e 100644 (file)
@@ -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) {