From eb2fe8440b2f01f28b70cb3f0815bb6aa9ec202f Mon Sep 17 00:00:00 2001 From: Xiubo Li Date: Sat, 7 Mar 2020 20:56:00 -0500 Subject: [PATCH] qa/tasks/cephfs/test_client_recovery: switch to netns suspend/resume Fixes: https://tracker.ceph.com/issues/44044 Signed-off-by: Xiubo Li --- qa/tasks/cephfs/test_client_recovery.py | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/qa/tasks/cephfs/test_client_recovery.py b/qa/tasks/cephfs/test_client_recovery.py index 2a3e9288e38f..d28388028fda 100644 --- a/qa/tasks/cephfs/test_client_recovery.py +++ b/qa/tasks/cephfs/test_client_recovery.py @@ -238,7 +238,7 @@ class TestClientRecovery(CephFSTestCase): self.mount_b.wait_for_visible() # Simulate client death - self.mount_a.kill() + self.mount_a.suspend_netns() # wait for it to die so it doesn't voluntarily release buffer cap time.sleep(5) @@ -275,10 +275,7 @@ class TestClientRecovery(CephFSTestCase): pass finally: # teardown() doesn't quite handle this case cleanly, so help it out - self.mount_a.kill_cleanup() - - self.mount_a.mount() - self.mount_a.wait_until_mounted() + self.mount_a.resume_netns() def test_stale_read_caps(self): self._test_stale_caps(False) @@ -302,7 +299,7 @@ class TestClientRecovery(CephFSTestCase): self.mount_b.wait_for_visible() # Simulate client death - self.mount_a.kill() + self.mount_a.suspend_netns() # wait for it to die so it doesn't voluntarily release buffer cap time.sleep(5) @@ -336,10 +333,7 @@ class TestClientRecovery(CephFSTestCase): # We killed it (and possibly its node), so it raises an error pass finally: - self.mount_a.kill_cleanup() - - self.mount_a.mount() - self.mount_a.wait_until_mounted() + self.mount_a.resume_netns() def test_trim_caps(self): # Trim capability when reconnecting MDS -- 2.47.3