From 852251cea7441a4d7e987d338f75662864a24a1d Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Wed, 12 Feb 2020 15:48:13 -0600 Subject: [PATCH] mgr/orch: prevent rm mon|mgr Signed-off-by: Sage Weil --- src/pybind/mgr/orchestrator_cli/module.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/pybind/mgr/orchestrator_cli/module.py b/src/pybind/mgr/orchestrator_cli/module.py index f501e7f6bf6..564c6968ae4 100644 --- a/src/pybind/mgr/orchestrator_cli/module.py +++ b/src/pybind/mgr/orchestrator_cli/module.py @@ -549,6 +549,8 @@ Usage: else: service_type = name; service_name = None + if name in ['mon', 'mgr']: + raise orchestrator.OrchestratorError('The mon and mgr services cannot be removed') completion = self.remove_service(service_type, service_name) self._orchestrator_wait([completion]) orchestrator.raise_if_exception(completion) -- 2.39.5