mon: mons also connect to mgrs

Signed-off-by: Ricardo Dias <rdias@suse.com>
This commit is contained in:
Ricardo Dias 2019-02-12 13:46:19 +00:00
parent ad7abc3995
commit 98bfb40bc2
No known key found for this signature in database
GPG Key ID: 74390C579BD37B68

View 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;