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__)
: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:
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
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()
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()