+++ /dev/null
-.qa/cephfs/begin.yaml
\ No newline at end of file
+++ /dev/null
-../.qa/
\ No newline at end of file
+++ /dev/null
-.qa/cephfs/clusters/1-mds-1-client-coloc.yaml
\ No newline at end of file
+++ /dev/null
-.qa/cephfs/conf
\ No newline at end of file
+++ /dev/null
-.qa/distros/supported-random-distro$
\ No newline at end of file
+++ /dev/null
-../.qa/
\ No newline at end of file
+++ /dev/null
-.qa/cephfs/mount/fuse.yaml
\ No newline at end of file
+++ /dev/null
-../.qa/
\ No newline at end of file
+++ /dev/null
-overrides:
- ceph:
- conf:
- global:
- ms inject socket failures: 2500
- ms inject delay type: osd mds
- ms inject delay probability: .005
- ms inject delay max: 1
- mon client directed command retry: 5
- log-ignorelist:
- - \(OSD_SLOW_PING_TIME
--- /dev/null
+../.qa/
\ No newline at end of file
--- /dev/null
+.qa/cephfs/begin.yaml
\ No newline at end of file
--- /dev/null
+../.qa/
\ No newline at end of file
--- /dev/null
+.qa/cephfs/clusters/1a3s-mds-2c-client.yaml
\ No newline at end of file
--- /dev/null
+.qa/cephfs/conf
\ No newline at end of file
--- /dev/null
+.qa/distros/supported-random-distro$
\ No newline at end of file
--- /dev/null
+.qa/cephfs/mount/
\ No newline at end of file
--- /dev/null
+../.qa/
\ No newline at end of file
--- /dev/null
+overrides:
+ ceph:
+ conf:
+ global:
+ ms inject socket failures: 2500
+ ms inject delay type: osd mds
+ ms inject delay probability: .005
+ ms inject delay max: 1
+ mon client directed command retry: 5
+ log-ignorelist:
+ - \(OSD_SLOW_PING_TIME
--- /dev/null
+../.qa/
\ No newline at end of file
--- /dev/null
+.qa/objectstore/bluestore-bitmap.yaml
\ No newline at end of file
--- /dev/null
+../.qa/
\ No newline at end of file
--- /dev/null
+.qa/cephfs/overrides/frag_enable.yaml
\ No newline at end of file
--- /dev/null
+overrides:
+ ceph:
+ cephfs:
+ fs:
+ - name: a
+ - name: b
+ ceph-fuse:
+ client.0:
+ cephfs_name: a
+ client.1:
+ cephfs_name: b
+ kclient:
+ client.0:
+ cephfs_name: a
+ client.1:
+ cephfs_name: b
--- /dev/null
+.qa/cephfs/overrides/session_timeout.yaml
\ No newline at end of file
--- /dev/null
+.qa/tasks/thrashosds-health.yaml
\ No newline at end of file
--- /dev/null
+.qa/cephfs/overrides/whitelist_health.yaml
\ No newline at end of file
--- /dev/null
+.qa/cephfs/overrides/whitelist_wrongly_marked_down.yaml
\ No newline at end of file
--- /dev/null
+../.qa/
\ No newline at end of file
--- /dev/null
+../.qa/
\ No newline at end of file
--- /dev/null
+tasks:
+- mds_thrash:
+
+overrides:
+ ceph:
+ log-ignorelist:
+ - Replacing daemon mds
--- /dev/null
+overrides:
+ ceph:
+ log-ignorelist:
+ - overall HEALTH_
+ - \(MON_DOWN\)
+tasks:
+- mon_thrash:
+ check_mds_failover: True
+ revive_delay: 20
+ thrash_delay: 10
--- /dev/null
+../.qa/
\ No newline at end of file
--- /dev/null
+tasks:
+- workunit:
+ clients:
+ all:
+ - fs/snaps
--- /dev/null
+.qa/cephfs/tasks/cfuse_workunit_suites_fsstress.yaml
\ No newline at end of file
--- /dev/null
+overrides:
+ ceph:
+ conf:
+ client:
+ fuse set user groups: true
+tasks:
+- workunit:
+ timeout: 6h
+ clients:
+ all:
+ - suites/pjd.sh
--- /dev/null
+.qa/cephfs/tasks/cfuse_workunit_trivial_sync.yaml
\ No newline at end of file
--- /dev/null
+overrides:
+ ceph:
+ log-ignorelist:
+ - SLOW_OPS
+ - slow request
+ conf:
+ osd:
+ filestore flush min: 0
+tasks:
+- workunit:
+ clients:
+ all:
+ - suites/ffsb.sh
--- /dev/null
+tasks:
+- workunit:
+ clients:
+ all:
+ - suites/iozone.sh
+++ /dev/null
-.qa/cephfs/objectstore-ec
\ No newline at end of file
+++ /dev/null
-../.qa/
\ No newline at end of file
+++ /dev/null
-.qa/cephfs/overrides/frag_enable.yaml
\ No newline at end of file
+++ /dev/null
-.qa/cephfs/overrides/session_timeout.yaml
\ No newline at end of file
+++ /dev/null
-.qa/tasks/thrashosds-health.yaml
\ No newline at end of file
+++ /dev/null
-.qa/cephfs/overrides/whitelist_health.yaml
\ No newline at end of file
+++ /dev/null
-.qa/cephfs/overrides/whitelist_wrongly_marked_down.yaml
\ No newline at end of file
+++ /dev/null
-../.qa/
\ No newline at end of file
+++ /dev/null
-../.qa/
\ No newline at end of file
+++ /dev/null
-tasks:
-- mds_thrash:
-
-overrides:
- ceph:
- log-ignorelist:
- - Replacing daemon mds
+++ /dev/null
-overrides:
- ceph:
- log-ignorelist:
- - overall HEALTH_
- - \(MON_DOWN\)
-tasks:
-- mon_thrash:
- check_mds_failover: True
- revive_delay: 20
- thrash_delay: 10
+++ /dev/null
-overrides:
- ceph:
- log-ignorelist:
- - but it is still running
- - objects unfound and apparently lost
-tasks:
-- thrashosds:
+++ /dev/null
-../.qa/
\ No newline at end of file
+++ /dev/null
-tasks:
-- workunit:
- clients:
- all:
- - fs/snaps
+++ /dev/null
-.qa/cephfs/tasks/cfuse_workunit_suites_fsstress.yaml
\ No newline at end of file
+++ /dev/null
-overrides:
- ceph:
- conf:
- client:
- fuse set user groups: true
-tasks:
-- workunit:
- timeout: 6h
- clients:
- all:
- - suites/pjd.sh
+++ /dev/null
-.qa/cephfs/tasks/cfuse_workunit_trivial_sync.yaml
\ No newline at end of file
+++ /dev/null
-overrides:
- ceph:
- log-ignorelist:
- - SLOW_OPS
- - slow request
- conf:
- osd:
- filestore flush min: 0
-tasks:
-- workunit:
- clients:
- all:
- - suites/ffsb.sh
+++ /dev/null
-tasks:
-- workunit:
- clients:
- all:
- - suites/iozone.sh
--- /dev/null
+../.qa/
\ No newline at end of file
--- /dev/null
+.qa/cephfs/begin.yaml
\ No newline at end of file
--- /dev/null
+../.qa/
\ No newline at end of file
--- /dev/null
+.qa/cephfs/clusters/1-mds-1-client-coloc.yaml
\ No newline at end of file
--- /dev/null
+.qa/cephfs/conf
\ No newline at end of file
--- /dev/null
+.qa/distros/supported-random-distro$
\ No newline at end of file
--- /dev/null
+.qa/cephfs/mount/
\ No newline at end of file
--- /dev/null
+../.qa/
\ No newline at end of file
--- /dev/null
+overrides:
+ ceph:
+ conf:
+ global:
+ ms inject socket failures: 2500
+ ms inject delay type: osd mds
+ ms inject delay probability: .005
+ ms inject delay max: 1
+ mon client directed command retry: 5
+ log-ignorelist:
+ - \(OSD_SLOW_PING_TIME
--- /dev/null
+.qa/cephfs/objectstore-ec
\ No newline at end of file
--- /dev/null
+../.qa/
\ No newline at end of file
--- /dev/null
+.qa/cephfs/overrides/frag_enable.yaml
\ No newline at end of file
--- /dev/null
+.qa/cephfs/overrides/session_timeout.yaml
\ No newline at end of file
--- /dev/null
+.qa/tasks/thrashosds-health.yaml
\ No newline at end of file
--- /dev/null
+.qa/cephfs/overrides/whitelist_health.yaml
\ No newline at end of file
--- /dev/null
+.qa/cephfs/overrides/whitelist_wrongly_marked_down.yaml
\ No newline at end of file
--- /dev/null
+../.qa/
\ No newline at end of file
--- /dev/null
+../.qa/
\ No newline at end of file
--- /dev/null
+tasks:
+- mds_thrash:
+
+overrides:
+ ceph:
+ log-ignorelist:
+ - Replacing daemon mds
--- /dev/null
+overrides:
+ ceph:
+ log-ignorelist:
+ - overall HEALTH_
+ - \(MON_DOWN\)
+tasks:
+- mon_thrash:
+ check_mds_failover: True
+ revive_delay: 20
+ thrash_delay: 10
--- /dev/null
+overrides:
+ ceph:
+ log-ignorelist:
+ - but it is still running
+ - objects unfound and apparently lost
+tasks:
+- thrashosds:
--- /dev/null
+../.qa/
\ No newline at end of file
--- /dev/null
+tasks:
+- workunit:
+ clients:
+ all:
+ - fs/snaps
--- /dev/null
+.qa/cephfs/tasks/cfuse_workunit_suites_fsstress.yaml
\ No newline at end of file
--- /dev/null
+overrides:
+ ceph:
+ conf:
+ client:
+ fuse set user groups: true
+tasks:
+- workunit:
+ timeout: 6h
+ clients:
+ all:
+ - suites/pjd.sh
--- /dev/null
+.qa/cephfs/tasks/cfuse_workunit_trivial_sync.yaml
\ No newline at end of file
--- /dev/null
+overrides:
+ ceph:
+ log-ignorelist:
+ - SLOW_OPS
+ - slow request
+ conf:
+ osd:
+ filestore flush min: 0
+tasks:
+- workunit:
+ clients:
+ all:
+ - suites/ffsb.sh
--- /dev/null
+tasks:
+- workunit:
+ clients:
+ all:
+ - suites/iozone.sh
log = logging.getLogger(__name__)
-def get_client_configs(ctx, config):
- """
- Get a map of the configuration for each FUSE client in the configuration by
- combining the configuration of the current task with any global overrides.
-
- :param ctx: Context instance
- :param config: configuration for this task
- :return: dict of client name to config or to None
- """
- if config is None:
- config = dict(('client.{id}'.format(id=id_), None)
- for id_ in teuthology.all_roles_of_type(ctx.cluster, 'client'))
- elif isinstance(config, list):
- config = dict((name, None) for name in config)
-
- overrides = ctx.config.get('overrides', {})
- teuthology.deep_merge(config, overrides.get('ceph-fuse', {}))
-
- return config
-
-
@contextlib.contextmanager
def task(ctx, config):
"""
"""
log.info('Running ceph_fuse task...')
+ if config is None:
+ ids = teuthology.all_roles_of_type(ctx.cluster, 'client')
+ client_roles = [f'client.{id_}' for id_ in ids]
+ config = dict([r, dict()] for r in client_roles)
+ elif isinstance(config, list):
+ client_roles = config
+ config = dict([r, dict()] for r in client_roles)
+ elif isinstance(config, dict):
+ client_roles = filter(lambda x: 'client.' in x, config.keys())
+ else:
+ raise ValueError(f"Invalid config object: {config} ({config.__class__})")
+ log.info(f"config is {config}")
+
+ clients = list(teuthology.get_clients(ctx=ctx, roles=client_roles))
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 = {}
skipped = {}
brxnet = config.get("brxnet", None)
# Construct any new FuseMount instances
+ overrides = ctx.config.get('overrides', {}).get('ceph-fuse', {})
+ top_overrides = dict(filter(lambda x: 'client.' not in x[0], overrides.items()))
for id_, remote in clients:
- remotes.add(remote)
- client_config = config.get("client.%s" % id_)
+ entity = f"client.{id_}"
+ client_config = config.get(entity)
if client_config is None:
client_config = {}
+ # top level overrides
+ for k, v in top_overrides.items():
+ if v is not None:
+ client_config[k] = v
+ # mount specific overrides
+ client_config_overrides = overrides.get(entity)
+ teuthology.deep_merge(client_config, client_config_overrides)
+ log.info(f"{entity} config is {client_config}")
+ remotes.add(remote)
auth_id = client_config.get("auth_id", id_)
cephfs_name = client_config.get("cephfs_name")
:param config: Configuration
"""
log.info('Mounting kernel clients...')
- assert config is None or isinstance(config, list) or isinstance(config, dict), \
- "task kclient got invalid config"
if config is None:
- config = ['client.{id}'.format(id=id_)
- for id_ in misc.all_roles_of_type(ctx.cluster, 'client')]
-
- if isinstance(config, list):
+ ids = misc.all_roles_of_type(ctx.cluster, 'client')
+ client_roles = [f'client.{id_}' for id_ in ids]
+ config = dict([r, dict()] for r in client_roles)
+ elif isinstance(config, list):
client_roles = config
config = dict([r, dict()] for r in client_roles)
elif isinstance(config, dict):
client_roles = filter(lambda x: 'client.' in x, config.keys())
else:
- raise ValueError("Invalid config object: {0} ({1})".format(config, config.__class__))
+ raise ValueError(f"Invalid config object: {config} ({config.__class__})")
+ log.info(f"config is {config}")
clients = list(misc.get_clients(ctx=ctx, roles=client_roles))
mounts = {}
overrides = ctx.config.get('overrides', {}).get('kclient', {})
+ top_overrides = dict(filter(lambda x: 'client.' not in x[0], overrides.items()))
for id_, remote in clients:
- client_config = config.get("client.%s" % id_)
+ entity = f"client.{id_}"
+ client_config = config.get(entity)
if client_config is None:
client_config = {}
-
- deep_merge(client_config, overrides)
+ # top level overrides
+ for k, v in top_overrides.items():
+ if v is not None:
+ client_config[k] = v
+ # mount specific overrides
+ client_config_overrides = overrides.get(entity)
+ deep_merge(client_config, client_config_overrides)
+ log.info(f"{entity} config is {client_config}")
cephfs_name = client_config.get("cephfs_name")
if config.get("disabled", False) or not client_config.get('mounted', True):