class KernelMount(CephFSMount):
def __init__(self, ctx, test_dir, client_id, client_remote,
client_keyring_path=None, hostfs_mntpt=None,
- cephfs_name=None, cephfs_mntpt=None, brxnet=None):
+ cephfs_name=None, cephfs_mntpt=None, brxnet=None, config=None):
super(KernelMount, self).__init__(ctx=ctx, test_dir=test_dir,
client_id=client_id, client_remote=client_remote,
client_keyring_path=client_keyring_path, hostfs_mntpt=hostfs_mntpt,
cephfs_name=cephfs_name, cephfs_mntpt=cephfs_mntpt, brxnet=brxnet)
+ self.rbytes = config.get('rbytes', False)
+
def mount(self, mntopts=[], createfs=True, check_status=True, **kwargs):
self.update_attrs(**kwargs)
self.assert_and_log_minimum_mount_details()
opts += ',conf=' + self.config_path
if self.cephfs_name:
opts += ",mds_namespace=" + self.cephfs_name
+ if self.rbytes:
+ opts += ",rbytes"
+ else:
+ opts += ",norbytes"
if mntopts:
opts += ',' + ','.join(mntopts)
else:
raise ValueError("Invalid config object: {0} ({1})".format(config, config.__class__))
- # config has been converted to a dict by this point
- overrides = ctx.config.get('overrides', {})
- deep_merge(config, overrides.get('kclient', {}))
-
clients = list(misc.get_clients(ctx=ctx, roles=client_roles))
test_dir = misc.get_testdir(ctx)
KernelMount.cleanup_stale_netnses_and_bridge(remote)
mounts = {}
+ overrides = ctx.config.get('overrides', {}).get('kclient', {})
for id_, remote in clients:
client_config = config.get("client.%s" % id_)
if client_config is None:
client_config = {}
+ deep_merge(client_config, overrides)
+
if config.get("disabled", False) or not client_config.get('mounted', True):
continue
test_dir=test_dir,
client_id=id_,
client_remote=remote,
- brxnet=ctx.teuthology_config.get('brxnet', None))
+ brxnet=ctx.teuthology_config.get('brxnet', None),
+ config=client_config)
mounts[id_] = kernel_mount