]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
tasks/ceph_manager: respect bdev_inject_crash in kill_osd()
authorSage Weil <sage@redhat.com>
Wed, 21 Sep 2016 21:01:29 +0000 (17:01 -0400)
committerSage Weil <sage@redhat.com>
Wed, 21 Sep 2016 21:01:29 +0000 (17:01 -0400)
Note that this will only work with bluestore osds.

Signed-off-by: Sage Weil <sage@redhat.com>
tasks/ceph_manager.py

index 5370415c04a98f3cdadb7e6a2073d2365111f1a1..a844648011ab4d9d2a536dd46ac7a72533048cc8 100644 (file)
@@ -1926,6 +1926,18 @@ class CephManager:
                      'doing powercycle of {s}'.format(o=osd, s=remote.name))
             self._assert_ipmi(remote)
             remote.console.power_off()
+        elif self.config.get('bdev_inject_crash'):
+            self.raw_cluster_cmd(
+                '--', 'tell', 'osd.%d' % osd,
+                'injectargs',
+                '--bdev-inject-crash ' + self.config.get('bdev_inject_crash'),
+            )
+            try:
+                self.ctx.daemons.get_daemon('osd', osd, self.cluster).wait()
+            except:
+                pass
+            else:
+                raise RuntimeError('osd.%s did not fail' % osd)
         else:
             self.ctx.daemons.get_daemon('osd', osd, self.cluster).stop()