]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/orchestrator: allow 'orch rm mon|mgr --force'
authorSage Weil <sage@redhat.com>
Tue, 3 Mar 2020 21:41:24 +0000 (15:41 -0600)
committerSage Weil <sage@redhat.com>
Wed, 4 Mar 2020 20:25:31 +0000 (14:25 -0600)
Signed-off-by: Sage Weil <sage@redhat.com>
src/pybind/mgr/orchestrator/module.py

index 44394ce4d6e8327b5f153602ae7311d0022596ae..ac6e1aca4a6a4512ec2a10f5735b44ba75fac8ec 100644 (file)
@@ -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])