From: Patrick Donnelly Date: Tue, 3 Dec 2019 23:14:49 +0000 (-0800) Subject: qa: test volumes plugin mount cleanup X-Git-Tag: v14.2.8~53^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F33116%2Fhead;p=ceph.git qa: test volumes plugin mount cleanup Signed-off-by: Patrick Donnelly (cherry picked from commit 67143642db335fef2749559006776d4b4842f008) --- diff --git a/qa/tasks/cephfs/test_volumes.py b/qa/tasks/cephfs/test_volumes.py index 283f801774c4..f39350deeb6f 100644 --- a/qa/tasks/cephfs/test_volumes.py +++ b/qa/tasks/cephfs/test_volumes.py @@ -96,6 +96,21 @@ class TestVolumes(CephFSTestCase): self._delete_test_volume() super(TestVolumes, self).tearDown() + def test_connection_expiration(self): + # unmount any cephfs mounts + self.mount_a.umount_wait() + sessions = self._session_list() + self.assertLessEqual(len(sessions), 1) # maybe mgr is already mounted + + # Get the mgr to definitely mount cephfs + subvolume = self._generate_random_subvolume_name() + self._fs_cmd("subvolume", "create", self.volname, subvolume) + sessions = self._session_list() + self.assertEqual(len(sessions), 1) + + # Now wait for the mgr to expire the connection: + self.wait_until_evicted(sessions[0]['id'], timeout=90) + def test_volume_rm(self): try: self._fs_cmd("volume", "rm", self.volname)