From 21ec764499d468d7d2c201717b9a20e7f0bb314c Mon Sep 17 00:00:00 2001 From: Jason Dillaman Date: Thu, 24 May 2018 10:52:46 -0400 Subject: [PATCH] qa/tasks: rbd_mirror_thrash should wait for daemon exit before restarting Signed-off-by: Jason Dillaman --- .../rbd/mirror-thrash/rbd-mirror/four-per-cluster.yaml | 8 ++++++++ qa/tasks/rbd_mirror.py | 4 +++- qa/tasks/rbd_mirror_thrash.py | 3 +++ 3 files changed, 14 insertions(+), 1 deletion(-) 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 a239c588503ed..70df34e402b1a 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 851b64fe42c78..880ec305828d6 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 6e35c3140147d..380006af25b7d 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() -- 2.39.5