From 98bfb40bc2d9c672b2c9746bd8bfeaf5ab30bcca Mon Sep 17 00:00:00 2001 From: Ricardo Dias Date: Tue, 12 Feb 2019 13:46:19 +0000 Subject: [PATCH] mon: mons also connect to mgrs Signed-off-by: Ricardo Dias --- src/mon/Monitor.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/mon/Monitor.cc b/src/mon/Monitor.cc index 666eeacce3756..bd7ab12932bd8 100644 --- a/src/mon/Monitor.cc +++ b/src/mon/Monitor.cc @@ -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; -- 2.39.5