]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/cephadm: checking service name before removal
authorRedouane Kachach <rkachach@redhat.com>
Wed, 9 Mar 2022 13:19:02 +0000 (14:19 +0100)
committerAdam King <adking@redhat.com>
Tue, 5 Apr 2022 20:10:21 +0000 (16:10 -0400)
Fixes: https://tracker.ceph.com/issues/54503
Signed-off-by: Redouane Kachach <rkachach@redhat.com>
(cherry picked from commit b26c114c8456941d6cccf7d4355445f21cb373a7)

src/pybind/mgr/cephadm/module.py

index f40bd7f5a49da5570664c26798603303795c02a2..94c42df9abf11e6c4327979c4a429116ef3212ee 100644 (file)
@@ -2106,6 +2106,8 @@ Then run the following:
             if self.spec_store[service_name].spec.service_type in ('mon', 'mgr'):
                 return f'Unable to remove {service_name} service.\n' \
                        f'Note, you might want to mark the {service_name} service as "unmanaged"'
+        else:
+            return f"Invalid service '{service_name}'. Use 'ceph orch ls' to list available services.\n"
 
         # Report list of affected OSDs?
         if not force and service_name.startswith('osd.'):