]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
tasks/cephfs: umount unused clients before running
authorJohn Spray <jspray@redhat.com>
Fri, 19 Dec 2014 14:03:41 +0000 (14:03 +0000)
committerJohn Spray <jspray@redhat.com>
Fri, 9 Jan 2015 10:09:52 +0000 (10:09 +0000)
When unused clients were mounted during an fs new,
they would end up in a state where they stalled
on subsequent attempts to umount them (ceph-fuse
stalls on exit if it can't terminate its mds_session)

Signed-off-by: John Spray <john.spray@redhat.com>
tasks/cephfs/cephfs_test_case.py

index 9929cd29c2f19e5dd9896dd21da573207e1faad6..8700bc51c541d605847368e927d7fc93c57d7356 100644 (file)
@@ -139,6 +139,7 @@ class CephFSTestCase(unittest.TestCase):
 
         log.debug("wait_until_true: success")
 
+
 class LogStream(object):
     def __init__(self):
         self.buffer = ""
@@ -195,6 +196,15 @@ def run_tests(ctx, config, test_klass, params):
         result_class = InteractiveFailureResult
     else:
         result_class = unittest.TextTestResult
+
+    # Unmount all clients not involved
+    for mount in ctx.mounts.values():
+        if mount is not params.get('mount_a') and mount is not params.get('mount_b'):
+            if mount.is_mounted():
+                log.info("Unmounting unneeded client {0}".format(mount.client_id))
+                mount.umount_wait()
+
+    # Execute!
     result = unittest.TextTestRunner(
         stream=LogStream(),
         resultclass=result_class,