From dc8946199983342217e30032b18ab7b90b8a83c6 Mon Sep 17 00:00:00 2001 From: Yehuda Sadeh Date: Tue, 11 Feb 2020 18:42:39 -0800 Subject: [PATCH] auth: treat mgr the same as mon when selecting auth mode Also use mon_cluster_modes (and not cluster_modes) when peer is mon/mgr. Signed-off-by: Yehuda Sadeh --- src/auth/AuthRegistry.cc | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/src/auth/AuthRegistry.cc b/src/auth/AuthRegistry.cc index 2229c8ab906..897aa81f089 100644 --- a/src/auth/AuthRegistry.cc +++ b/src/auth/AuthRegistry.cc @@ -196,6 +196,7 @@ void AuthRegistry::get_supported_methods( if (modes) { switch (peer_type) { case CEPH_ENTITY_TYPE_MON: + case CEPH_ENTITY_TYPE_MGR: *modes = mon_client_modes; break; default: @@ -204,10 +205,12 @@ void AuthRegistry::get_supported_methods( } return; case CEPH_ENTITY_TYPE_MON: - // i am mon + case CEPH_ENTITY_TYPE_MGR: + // i am mon/mgr switch (peer_type) { case CEPH_ENTITY_TYPE_MON: - // they are mon + case CEPH_ENTITY_TYPE_MGR: + // they are mon/mgr if (methods) { *methods = cluster_methods; } @@ -230,6 +233,14 @@ void AuthRegistry::get_supported_methods( switch (peer_type) { case CEPH_ENTITY_TYPE_MON: case CEPH_ENTITY_TYPE_MGR: + // they are a mon daemon + if (methods) { + *methods = cluster_methods; + } + if (modes) { + *modes = mon_cluster_modes; + } + break; case CEPH_ENTITY_TYPE_MDS: case CEPH_ENTITY_TYPE_OSD: // they are another daemon -- 2.39.5