]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
qa/tasks/nvmeof.py: Add stop_and_join method to thrasher
authorVallari Agrawal <vallari.agrawal@ibm.com>
Mon, 13 Jan 2025 19:10:35 +0000 (00:40 +0530)
committerVallari Agrawal <vallari.agrawal@ibm.com>
Thu, 30 Jan 2025 12:16:59 +0000 (17:46 +0530)
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 <vallari.agrawal@ibm.com>
qa/tasks/nvmeof.py

index e01a13a5f27120dcd5819c17a2e2e1e0fd7de2e0..1009f3860f74e9632bff8744cf50c667e390fac4 100644 (file)
@@ -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')