From: Sage Weil Date: Wed, 21 Sep 2016 21:01:29 +0000 (-0400) Subject: tasks/ceph_manager: respect bdev_inject_crash in kill_osd() X-Git-Tag: v11.1.1~58^2^2~93^2~5 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=2ae53848cfb87e2489bc09bbb577c79553af3cba;p=ceph.git tasks/ceph_manager: respect bdev_inject_crash in kill_osd() Note that this will only work with bluestore osds. Signed-off-by: Sage Weil --- diff --git a/tasks/ceph_manager.py b/tasks/ceph_manager.py index 5370415c04a9..a844648011ab 100644 --- a/tasks/ceph_manager.py +++ b/tasks/ceph_manager.py @@ -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()