From: Michael Fritch Date: Fri, 11 Sep 2020 14:10:38 +0000 (-0600) Subject: mgr/cephadm: disallow removing the mon keyring X-Git-Tag: v16.1.0~1117^2~1 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=2266cc1e75a25ee46bbe8964af077b83f256a864;p=ceph.git mgr/cephadm: disallow removing the mon keyring Signed-off-by: Michael Fritch --- diff --git a/src/pybind/mgr/cephadm/services/cephadmservice.py b/src/pybind/mgr/cephadm/services/cephadmservice.py index 97cd882775e0..b19e5068e1d3 100644 --- a/src/pybind/mgr/cephadm/services/cephadmservice.py +++ b/src/pybind/mgr/cephadm/services/cephadmservice.py @@ -294,6 +294,10 @@ class CephService(CephadmService): daemon_id: str = daemon.daemon_id host: str = daemon.hostname + if daemon_id == 'mon': + # do not remove the mon keyring + return + entity = self.get_auth_entity(daemon_id, host=host) logger.info(f'Remove keyring: {entity}')