]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
mgr/orch: prevent rm mon|mgr
authorSage Weil <sage@redhat.com>
Wed, 12 Feb 2020 21:48:13 +0000 (15:48 -0600)
committerSage Weil <sage@redhat.com>
Thu, 13 Feb 2020 15:43:38 +0000 (09:43 -0600)
Signed-off-by: Sage Weil <sage@redhat.com>
src/pybind/mgr/orchestrator_cli/module.py

index f501e7f6bf602ce7487bf203e6e9eb9d191648b1..564c6968ae42d70e5e94be85ed1f49c225ac4871 100644 (file)
@@ -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)