From: Vallari Agrawal Date: Mon, 13 Jan 2025 19:10:35 +0000 (+0530) Subject: qa/tasks/nvmeof.py: Add stop_and_join method to thrasher X-Git-Tag: testing/wip-pdonnell-testing-20250205.170831-debug~21^2~8 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=0b0f450e95b1ceab0682f90765fbf2d5c62b443b;p=ceph-ci.git qa/tasks/nvmeof.py: Add stop_and_join method to thrasher Also add nvme-gw show command output in do_checks() and revive daemons with 'ceph orch daemon start' in revive_daemon() method. Signed-off-by: Vallari Agrawal --- diff --git a/qa/tasks/nvmeof.py b/qa/tasks/nvmeof.py index e01a13a5f27..1009f3860f7 100644 --- a/qa/tasks/nvmeof.py +++ b/qa/tasks/nvmeof.py @@ -334,6 +334,13 @@ class NvmeofThrasher(Thrasher, Greenlet): def stop(self): self.stopping.set() + def stop_and_join(self): + """ + Stop the thrashing process and join the thread. + """ + self.stop() + return self.join() + def do_checks(self): """ Run some checks to see if everything is running well during thrashing. @@ -346,6 +353,7 @@ class NvmeofThrasher(Thrasher, Greenlet): run.Raw('&&'), 'ceph', 'orch', 'ps', '--daemon-type', 'nvmeof', '--refresh', run.Raw('&&'), 'ceph', 'health', 'detail', run.Raw('&&'), 'ceph', '-s', + run.Raw('&&'), 'ceph', 'nvme-gw', 'show', 'mypool', 'mygroup0', run.Raw('&&'), 'sudo', 'nvme', 'list', ] for dev in self.devices: @@ -407,6 +415,12 @@ class NvmeofThrasher(Thrasher, Greenlet): ]) elif killed_method == "systemctl_stop": daemon.restart() + else: + name = '%s.%s' % (daemon.type_, daemon.id_) + daemon.remote.run(args=[ + "ceph", "orch", "daemon", "start", + name + ]) def do_thrash(self): self.log('start thrashing')