]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
mgr/ssh: add 'osd rm'
authorSage Weil <sage@redhat.com>
Tue, 5 Nov 2019 14:39:16 +0000 (08:39 -0600)
committerSage Weil <sage@redhat.com>
Wed, 6 Nov 2019 14:26:12 +0000 (08:26 -0600)
Signed-off-by: Sage Weil <sage@redhat.com>
doc/mgr/orchestrator_cli.rst
src/pybind/mgr/ssh/module.py

index 9309366bc81e1459ee693aeff746c07f87a97201..80cf9d3d2d1540daf4e16b8a96a85e7890103a06 100644 (file)
@@ -301,7 +301,7 @@ This is an overview of the current implementation status of the orchestrators.
  mon update                          ⚪         ✔       ⚪         ✔
  osd create                          ✔         ✔       ⚪         ✔
  osd device {ident,fault}-{on,off}   ⚪         ⚪       ⚪         ⚪
- osd rm                              â\9c\94         â\9aª       â\9aª         â\9aª
+ osd rm                              â\9c\94         â\9aª       â\9aª         â\9c\94
  device {ident,fault}-(on,off}       ⚪         ⚪       ⚪         ⚪
  device ls                           ✔         ✔       ✔         ✔
  service ls                          ⚪         ✔       ✔         ✔
index e276222afed512181fccc5deaf17f41fb5611655..336a9b75b0426da573bfcc6754114b68fee086b0 100644 (file)
@@ -741,6 +741,17 @@ class SSHOrchestrator(MgrModule, orchestrator.OrchestratorClientMixin):
 
         return SSHWriteCompletion(result)
 
+    def remove_osds(self, name):
+        daemons = self._get_services('osd', service_id=name)
+        results = []
+        for d in daemons:
+            results.append(self._worker_pool.apply_async(
+                self._remove_daemon,
+                ('osd.%s' % d.service_instance, d.nodename)))
+        if not results:
+            raise OrchestratorError('Unable to find osd.%s' % name)
+        return SSHWriteCompletion(results)
+
     def _create_daemon(self, daemon_type, daemon_id, host, keyring,
                        extra_args=[]):
         conn = self._get_connection(host)