From 150ee17f0d0b6e7db7b47f970507c464e8643898 Mon Sep 17 00:00:00 2001 From: Sage Weil Date: Tue, 3 Mar 2020 15:41:24 -0600 Subject: [PATCH] mgr/orchestrator: allow 'orch rm mon|mgr --force' Signed-off-by: Sage Weil --- src/pybind/mgr/orchestrator/module.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/pybind/mgr/orchestrator/module.py b/src/pybind/mgr/orchestrator/module.py index 44394ce4d6e83..ac6e1aca4a6a4 100644 --- a/src/pybind/mgr/orchestrator/module.py +++ b/src/pybind/mgr/orchestrator/module.py @@ -723,10 +723,11 @@ Usage: @_cli_write_command( 'orch rm', - "name=service_name,type=CephString", + 'name=service_name,type=CephString ' + 'name=force,type=CephBool,req=false', 'Remove a service') - def _service_rm(self, service_name): - if service_name in ['mon', 'mgr']: + def _service_rm(self, service_name, force=False): + if service_name in ['mon', 'mgr'] and not force: raise OrchestratorError('The mon and mgr services cannot be removed') completion = self.remove_service(service_name) self._orchestrator_wait([completion]) -- 2.39.5