From: Jason Dillaman Date: Thu, 24 May 2018 14:52:46 +0000 (-0400) Subject: qa/tasks: rbd_mirror_thrash should wait for daemon exit before restarting X-Git-Tag: v14.0.1~1210^2~3 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=21ec764499d468d7d2c201717b9a20e7f0bb314c;p=ceph.git qa/tasks: rbd_mirror_thrash should wait for daemon exit before restarting Signed-off-by: Jason Dillaman --- diff --git a/qa/suites/rbd/mirror-thrash/rbd-mirror/four-per-cluster.yaml b/qa/suites/rbd/mirror-thrash/rbd-mirror/four-per-cluster.yaml index a239c588503e..70df34e402b1 100644 --- a/qa/suites/rbd/mirror-thrash/rbd-mirror/four-per-cluster.yaml +++ b/qa/suites/rbd/mirror-thrash/rbd-mirror/four-per-cluster.yaml @@ -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: diff --git a/qa/tasks/rbd_mirror.py b/qa/tasks/rbd_mirror.py index 851b64fe42c7..880ec305828d 100644 --- a/qa/tasks/rbd_mirror.py +++ b/qa/tasks/rbd_mirror.py @@ -47,6 +47,7 @@ class RBDMirror(Task): client: role - ceph client to connect as 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 = [ diff --git a/qa/tasks/rbd_mirror_thrash.py b/qa/tasks/rbd_mirror_thrash.py index 6e35c3140147..380006af25b7 100644 --- a/qa/tasks/rbd_mirror_thrash.py +++ b/qa/tasks/rbd_mirror_thrash.py @@ -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()