]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mon: mons also connect to mgrs 26385/head
authorRicardo Dias <rdias@suse.com>
Tue, 12 Feb 2019 13:46:19 +0000 (13:46 +0000)
committerRicardo Dias <rdias@suse.com>
Tue, 12 Feb 2019 14:38:58 +0000 (14:38 +0000)
Signed-off-by: Ricardo Dias <rdias@suse.com>
src/mon/Monitor.cc

index 666eeacce375655f05abdf5e0cdc788cd04dd453..bd7ab12932bd8d7c0ee3475131c1d5779fbd908a 100644 (file)
@@ -5875,7 +5875,8 @@ int Monitor::get_auth_request(
   bufferlist *out)
 {
   std::scoped_lock l(auth_lock);
-  if (con->get_peer_type() != CEPH_ENTITY_TYPE_MON) {
+  if (con->get_peer_type() != CEPH_ENTITY_TYPE_MON &&
+      con->get_peer_type() != CEPH_ENTITY_TYPE_MGR) {
     return -EACCES;
   }
   AuthAuthorizer *auth;
@@ -5883,7 +5884,7 @@ int Monitor::get_auth_request(
     return -EACCES;
   }
   auth_meta->authorizer.reset(auth);
-  auth_registry.get_supported_modes(CEPH_ENTITY_TYPE_MON,
+  auth_registry.get_supported_modes(con->get_peer_type(),
                                    auth->protocol,
                                    preferred_modes);
   *method = auth->protocol;