]> git.proxmox.com Git - ceph.git/blobdiff - ceph/qa/tasks/ceph_fuse.py
update sources to ceph Nautilus 14.2.1
[ceph.git] / ceph / qa / tasks / ceph_fuse.py
index 14c6989720b584772d5159c6b82abf130f1c6ed7..08254fed3c3d0001bc669688a8ea911c72589091 100644 (file)
@@ -7,7 +7,6 @@ import logging
 
 from teuthology import misc as teuthology
 from cephfs.fuse_mount import FuseMount
-from tasks.cephfs.filesystem import MDSCluster
 from tasks.cephfs.filesystem import Filesystem
 
 log = logging.getLogger(__name__)
@@ -94,24 +93,19 @@ def task(ctx, config):
     :param ctx: Context
     :param config: Configuration
     """
-    log.info('Mounting ceph-fuse clients...')
+    log.info('Running ceph_fuse task...')
 
     testdir = teuthology.get_testdir(ctx)
+    log.info("config is {}".format(str(config)))
     config = get_client_configs(ctx, config)
+    log.info("new config is {}".format(str(config)))
 
     # List clients we will configure mounts for, default is all clients
     clients = list(teuthology.get_clients(ctx=ctx, roles=filter(lambda x: 'client.' in x, config.keys())))
 
     all_mounts = getattr(ctx, 'mounts', {})
     mounted_by_me = {}
-
-    log.info('Wait for MDS to reach steady state...')
-    mds_cluster = MDSCluster(ctx)
-    status = mds_cluster.status()
-    for filesystem in status.get_filesystems():
-        fs = Filesystem(ctx, fscid=filesystem['id']) 
-        fs.wait_for_daemons()
-    log.info('Ready to start ceph-fuse...')
+    skipped = {}
 
     # Construct any new FuseMount instances
     for id_, remote in clients:
@@ -119,8 +113,13 @@ def task(ctx, config):
         if client_config is None:
             client_config = {}
 
+        skip = client_config.get("skip", False)
+        if skip:
+            skipped[id_] = skip
+            continue
+
         if id_ not in all_mounts:
-            fuse_mount = FuseMount(client_config, testdir, id_, remote)
+            fuse_mount = FuseMount(ctx, client_config, testdir, id_, remote)
             all_mounts[id_] = fuse_mount
         else:
             # Catch bad configs where someone has e.g. tried to use ceph-fuse and kcephfs for the same client
@@ -132,6 +131,7 @@ def task(ctx, config):
     ctx.mounts = all_mounts
 
     # Mount any clients we have been asked to (default to mount all)
+    log.info('Mounting ceph-fuse clients...')
     for mount in mounted_by_me.values():
         mount.mount()
 
@@ -139,7 +139,7 @@ def task(ctx, config):
         mount.wait_until_mounted()
 
     # Umount any pre-existing clients that we have not been asked to mount
-    for client_id in set(all_mounts.keys()) - set(mounted_by_me.keys()):
+    for client_id in set(all_mounts.keys()) - set(mounted_by_me.keys()) - set(skipped.keys()):
         mount = all_mounts[client_id]
         if mount.is_mounted():
             mount.umount_wait()