]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
qa/tasks: rbd_mirror_thrash should wait for daemon exit before restarting
authorJason Dillaman <dillaman@redhat.com>
Thu, 24 May 2018 14:52:46 +0000 (10:52 -0400)
committerJason Dillaman <dillaman@redhat.com>
Thu, 31 May 2018 13:48:47 +0000 (09:48 -0400)
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
qa/suites/rbd/mirror-thrash/rbd-mirror/four-per-cluster.yaml
qa/tasks/rbd_mirror.py
qa/tasks/rbd_mirror_thrash.py

index a239c588503ed7e6ef270f77c2b5c89aea3f4549..70df34e402b1aa1f831bea9721bf3f09b621575a 100644 (file)
@@ -3,20 +3,28 @@ meta:
 tasks:
 - rbd-mirror:
     client: cluster1.client.mirror.0
+    thrash: True
 - rbd-mirror:
     client: cluster1.client.mirror.1
+    thrash: True
 - rbd-mirror:
     client: cluster1.client.mirror.2
+    thrash: True
 - rbd-mirror:
     client: cluster1.client.mirror.3
+    thrash: True
 - rbd-mirror:
     client: cluster2.client.mirror.0
+    thrash: True
 - rbd-mirror:
     client: cluster2.client.mirror.1
+    thrash: True
 - rbd-mirror:
     client: cluster2.client.mirror.2
+    thrash: True
 - rbd-mirror:
     client: cluster2.client.mirror.3
+    thrash: True
 - rbd-mirror-thrash:
     cluster: cluster1
 - rbd-mirror-thrash:
index 851b64fe42c78a62209bec7a3bb1d47f62e2f4a2..880ec305828d65ef1eee57d9f4b6fd82facc5062 100644 (file)
@@ -47,6 +47,7 @@ class RBDMirror(Task):
         client: role - ceph client to connect as
         valgrind: [--tool=<valgrind tool>] - none by default
         coverage: bool - whether this run may be collecting coverage data
+        thrash: bool - whether this run may be thrashed
     """
     def __init__(self, ctx, config):
         super(RBDMirror, self).__init__(ctx, config)
@@ -71,7 +72,8 @@ class RBDMirror(Task):
         super(RBDMirror, self).begin()
         testdir = misc.get_testdir(self.ctx)
         daemon_signal = 'kill'
-        if 'coverage' in self.config or 'valgrind' in self.config:
+        if 'coverage' in self.config or 'valgrind' in self.config or \
+                self.config.get('thrash', False):
             daemon_signal = 'term'
 
         args = [
index 6e35c3140147d5e1ad1057ba515176b188e831c2..380006af25b7d261f90b20c965b95cf6fee33323 100644 (file)
@@ -144,6 +144,9 @@ class RBDMirrorThrasher(Greenlet):
                 self.log('waiting for {delay} secs before reviving daemons'.format(delay=delay))
                 sleep(delay)
 
+                for daemon in killed_daemons:
+                    self.log('waiting for {label}'.format(label=daemon.id_))
+                    daemon.stop()
                 for daemon in killed_daemons:
                     self.log('reviving {label}'.format(label=daemon.id_))
                     daemon.start()