diff --git a/qa/suites/fs/upgrade/featureful_client/old_client/centos_8.stream.yaml b/qa/suites/fs/upgrade/featureful_client/old_client/centos_8.stream.yaml deleted file mode 120000 index e787191b5a270..0000000000000 --- a/qa/suites/fs/upgrade/featureful_client/old_client/centos_8.stream.yaml +++ /dev/null @@ -1 +0,0 @@ -.qa/distros/all/centos_8.stream.yaml \ No newline at end of file diff --git a/qa/suites/fs/upgrade/featureful_client/old_client/centos_9.stream.yaml b/qa/suites/fs/upgrade/featureful_client/old_client/centos_9.stream.yaml new file mode 120000 index 0000000000000..dca92ddbf45e5 --- /dev/null +++ b/qa/suites/fs/upgrade/featureful_client/old_client/centos_9.stream.yaml @@ -0,0 +1 @@ +.qa/distros/podman/centos_9.stream.yaml \ No newline at end of file diff --git a/qa/suites/fs/upgrade/nofs/tasks/0-pacific.yaml b/qa/suites/fs/upgrade/featureful_client/old_client/tasks/0-from/reef.yaml similarity index 82% rename from qa/suites/fs/upgrade/nofs/tasks/0-pacific.yaml rename to qa/suites/fs/upgrade/featureful_client/old_client/tasks/0-from/reef.yaml index b74accc69f09d..09ac14de15a39 100644 --- a/qa/suites/fs/upgrade/nofs/tasks/0-pacific.yaml +++ b/qa/suites/fs/upgrade/featureful_client/old_client/tasks/0-from/reef.yaml @@ -1,9 +1,9 @@ meta: - desc: | - install ceph/pacific latest + install ceph/reef latest tasks: - install: - branch: pacific + branch: reef exclude_packages: - librados3 - ceph-mgr-dashboard @@ -13,7 +13,7 @@ tasks: - cephadm - ceph-volume extra_packages: ['librados2'] -- print: "**** done installing pacific" +- print: "**** done installing reef" - ceph: log-ignorelist: - overall HEALTH_ @@ -35,5 +35,5 @@ tasks: ms bind msgr2: false - exec: osd.0: - - ceph osd set-require-min-compat-client pacific + - ceph osd set-require-min-compat-client reef - print: "**** done ceph" diff --git a/qa/suites/fs/upgrade/featureful_client/old_client/tasks/0-octopus.yaml b/qa/suites/fs/upgrade/featureful_client/old_client/tasks/0-from/squid.yaml similarity index 82% rename from qa/suites/fs/upgrade/featureful_client/old_client/tasks/0-octopus.yaml rename to qa/suites/fs/upgrade/featureful_client/old_client/tasks/0-from/squid.yaml index e7774423fa544..1da1519215bf9 100644 --- a/qa/suites/fs/upgrade/featureful_client/old_client/tasks/0-octopus.yaml +++ b/qa/suites/fs/upgrade/featureful_client/old_client/tasks/0-from/squid.yaml @@ -1,9 +1,9 @@ meta: - desc: | - install ceph/octopus latest + install ceph/squid latest tasks: - install: - branch: octopus + branch: squid exclude_packages: - librados3 - ceph-mgr-dashboard @@ -13,7 +13,7 @@ tasks: - cephadm - ceph-volume extra_packages: ['librados2'] -- print: "**** done installing octopus" +- print: "**** done installing squid" - ceph: log-ignorelist: - overall HEALTH_ @@ -35,5 +35,5 @@ tasks: ms bind msgr2: false - exec: osd.0: - - ceph osd set-require-min-compat-client octopus + - ceph osd set-require-min-compat-client squid - print: "**** done ceph" diff --git a/qa/suites/fs/upgrade/featureful_client/old_client/tasks/1-client.yaml b/qa/suites/fs/upgrade/featureful_client/old_client/tasks/1-client.yaml index 976d6e2650bf9..f545d8bfaaec1 100644 --- a/qa/suites/fs/upgrade/featureful_client/old_client/tasks/1-client.yaml +++ b/qa/suites/fs/upgrade/featureful_client/old_client/tasks/1-client.yaml @@ -1,6 +1,10 @@ tasks: - ceph-fuse: -- print: "**** done octopus client" + client.0: + client_feature_range: "[0-13],[15-21]" + client.1: + client_feature_range: "[0-13],[15-21]" +- print: "**** done client" - workunit: clients: all: diff --git a/qa/suites/fs/upgrade/featureful_client/old_client/tasks/2-upgrade.yaml b/qa/suites/fs/upgrade/featureful_client/old_client/tasks/2-upgrade.yaml index 26c185946dd68..f2c781db9770e 100644 --- a/qa/suites/fs/upgrade/featureful_client/old_client/tasks/2-upgrade.yaml +++ b/qa/suites/fs/upgrade/featureful_client/old_client/tasks/2-upgrade.yaml @@ -22,7 +22,6 @@ tasks: - install.upgrade: # upgrade the single cluster node, which is running all the mon/mds/osd/mgr daemons mon.a: - branch: quincy - print: "**** done install.upgrade the host" - ceph.restart: daemons: [mon.*, mgr.*] @@ -42,7 +41,7 @@ tasks: mon.a: - ceph osd dump -f json-pretty - ceph versions - - ceph osd require-osd-release quincy + - ceph osd require-osd-release squid - for f in `ceph osd pool ls` ; do ceph osd pool set $f pg_autoscale_mode off ; done - ceph.healthy: - print: "**** done ceph.restart" diff --git a/qa/suites/fs/upgrade/featureful_client/old_client/tasks/3-compat_client/quincy.yaml b/qa/suites/fs/upgrade/featureful_client/old_client/tasks/3-compat_client/yes.yaml similarity index 100% rename from qa/suites/fs/upgrade/featureful_client/old_client/tasks/3-compat_client/quincy.yaml rename to qa/suites/fs/upgrade/featureful_client/old_client/tasks/3-compat_client/yes.yaml diff --git a/qa/suites/fs/upgrade/featureful_client/upgraded_client/centos_8.stream.yaml b/qa/suites/fs/upgrade/featureful_client/upgraded_client/centos_8.stream.yaml deleted file mode 120000 index e787191b5a270..0000000000000 --- a/qa/suites/fs/upgrade/featureful_client/upgraded_client/centos_8.stream.yaml +++ /dev/null @@ -1 +0,0 @@ -.qa/distros/all/centos_8.stream.yaml \ No newline at end of file diff --git a/qa/suites/fs/upgrade/featureful_client/upgraded_client/centos_9.stream.yaml b/qa/suites/fs/upgrade/featureful_client/upgraded_client/centos_9.stream.yaml new file mode 120000 index 0000000000000..dca92ddbf45e5 --- /dev/null +++ b/qa/suites/fs/upgrade/featureful_client/upgraded_client/centos_9.stream.yaml @@ -0,0 +1 @@ +.qa/distros/podman/centos_9.stream.yaml \ No newline at end of file diff --git a/qa/suites/fs/upgrade/featureful_client/upgraded_client/tasks/0-octopus.yaml b/qa/suites/fs/upgrade/featureful_client/upgraded_client/tasks/0-from/reef.yaml similarity index 82% rename from qa/suites/fs/upgrade/featureful_client/upgraded_client/tasks/0-octopus.yaml rename to qa/suites/fs/upgrade/featureful_client/upgraded_client/tasks/0-from/reef.yaml index e7774423fa544..09ac14de15a39 100644 --- a/qa/suites/fs/upgrade/featureful_client/upgraded_client/tasks/0-octopus.yaml +++ b/qa/suites/fs/upgrade/featureful_client/upgraded_client/tasks/0-from/reef.yaml @@ -1,9 +1,9 @@ meta: - desc: | - install ceph/octopus latest + install ceph/reef latest tasks: - install: - branch: octopus + branch: reef exclude_packages: - librados3 - ceph-mgr-dashboard @@ -13,7 +13,7 @@ tasks: - cephadm - ceph-volume extra_packages: ['librados2'] -- print: "**** done installing octopus" +- print: "**** done installing reef" - ceph: log-ignorelist: - overall HEALTH_ @@ -35,5 +35,5 @@ tasks: ms bind msgr2: false - exec: osd.0: - - ceph osd set-require-min-compat-client octopus + - ceph osd set-require-min-compat-client reef - print: "**** done ceph" diff --git a/qa/suites/fs/upgrade/featureful_client/upgraded_client/tasks/0-from/squid.yaml b/qa/suites/fs/upgrade/featureful_client/upgraded_client/tasks/0-from/squid.yaml new file mode 100644 index 0000000000000..1da1519215bf9 --- /dev/null +++ b/qa/suites/fs/upgrade/featureful_client/upgraded_client/tasks/0-from/squid.yaml @@ -0,0 +1,39 @@ +meta: +- desc: | + install ceph/squid latest +tasks: +- install: + branch: squid + exclude_packages: + - librados3 + - ceph-mgr-dashboard + - ceph-mgr-diskprediction-local + - ceph-mgr-rook + - ceph-mgr-cephadm + - cephadm + - ceph-volume + extra_packages: ['librados2'] +- print: "**** done installing squid" +- ceph: + log-ignorelist: + - overall HEALTH_ + - \(FS_ + - \(MDS_ + - \(OSD_ + - \(MON_DOWN\) + - \(CACHE_POOL_ + - \(POOL_ + - \(MGR_DOWN\) + - \(PG_ + - \(SMALLER_PGP_NUM\) + - Monitor daemon marked osd + - Behind on trimming + - Manager daemon + conf: + global: + mon warn on pool no app: false + ms bind msgr2: false +- exec: + osd.0: + - ceph osd set-require-min-compat-client squid +- print: "**** done ceph" diff --git a/qa/suites/fs/upgrade/featureful_client/upgraded_client/tasks/1-client.yaml b/qa/suites/fs/upgrade/featureful_client/upgraded_client/tasks/1-client.yaml index c9b4c046f6c43..3485dd680d6fa 100644 --- a/qa/suites/fs/upgrade/featureful_client/upgraded_client/tasks/1-client.yaml +++ b/qa/suites/fs/upgrade/featureful_client/upgraded_client/tasks/1-client.yaml @@ -3,9 +3,11 @@ overrides: nuke-on-error: false tasks: - ceph-fuse: -- print: "**** done octopus client" -#- workunit: -# clients: -# all: -# - suites/fsstress.sh + client.1: + client_feature_range: "[0-13],[15-21]" +- print: "**** done client" +- workunit: + clients: + all: + - suites/fsstress.sh - print: "**** done fsstress" diff --git a/qa/suites/fs/upgrade/featureful_client/upgraded_client/tasks/2-upgrade.yaml b/qa/suites/fs/upgrade/featureful_client/upgraded_client/tasks/2-upgrade.yaml index e5ea8b19cef36..0168ddf5ae7e6 100644 --- a/qa/suites/fs/upgrade/featureful_client/upgraded_client/tasks/2-upgrade.yaml +++ b/qa/suites/fs/upgrade/featureful_client/upgraded_client/tasks/2-upgrade.yaml @@ -22,7 +22,6 @@ tasks: - install.upgrade: # upgrade the single cluster node, which is running all the mon/mds/osd/mgr daemons mon.a: - branch: quincy - print: "**** done install.upgrade the host" - ceph.restart: daemons: [mon.*, mgr.*] @@ -42,7 +41,7 @@ tasks: mon.a: - ceph versions - ceph osd dump -f json-pretty - - ceph osd require-osd-release quincy + - ceph osd require-osd-release squid - for f in `ceph osd pool ls` ; do ceph osd pool set $f pg_autoscale_mode off ; done - ceph.healthy: - print: "**** done ceph.restart" diff --git a/qa/suites/fs/upgrade/featureful_client/upgraded_client/tasks/3-client-upgrade.yaml b/qa/suites/fs/upgrade/featureful_client/upgraded_client/tasks/3-client-upgrade.yaml index 251c349acb824..58fdfdbd8d9e8 100644 --- a/qa/suites/fs/upgrade/featureful_client/upgraded_client/tasks/3-client-upgrade.yaml +++ b/qa/suites/fs/upgrade/featureful_client/upgraded_client/tasks/3-client-upgrade.yaml @@ -1,7 +1,6 @@ tasks: - install.upgrade: client.0: - branch: quincy - print: "**** done install.upgrade on client.0" - ceph-fuse: client.0: diff --git a/qa/suites/fs/upgrade/nofs/centos_8.stream.yaml b/qa/suites/fs/upgrade/nofs/centos_8.stream.yaml deleted file mode 120000 index e787191b5a270..0000000000000 --- a/qa/suites/fs/upgrade/nofs/centos_8.stream.yaml +++ /dev/null @@ -1 +0,0 @@ -.qa/distros/all/centos_8.stream.yaml \ No newline at end of file diff --git a/qa/suites/fs/upgrade/nofs/centos_9.stream.yaml b/qa/suites/fs/upgrade/nofs/centos_9.stream.yaml new file mode 120000 index 0000000000000..dca92ddbf45e5 --- /dev/null +++ b/qa/suites/fs/upgrade/nofs/centos_9.stream.yaml @@ -0,0 +1 @@ +.qa/distros/podman/centos_9.stream.yaml \ No newline at end of file diff --git a/qa/suites/fs/upgrade/nofs/tasks/0-from/reef.yaml b/qa/suites/fs/upgrade/nofs/tasks/0-from/reef.yaml new file mode 100644 index 0000000000000..09ac14de15a39 --- /dev/null +++ b/qa/suites/fs/upgrade/nofs/tasks/0-from/reef.yaml @@ -0,0 +1,39 @@ +meta: +- desc: | + install ceph/reef latest +tasks: +- install: + branch: reef + exclude_packages: + - librados3 + - ceph-mgr-dashboard + - ceph-mgr-diskprediction-local + - ceph-mgr-rook + - ceph-mgr-cephadm + - cephadm + - ceph-volume + extra_packages: ['librados2'] +- print: "**** done installing reef" +- ceph: + log-ignorelist: + - overall HEALTH_ + - \(FS_ + - \(MDS_ + - \(OSD_ + - \(MON_DOWN\) + - \(CACHE_POOL_ + - \(POOL_ + - \(MGR_DOWN\) + - \(PG_ + - \(SMALLER_PGP_NUM\) + - Monitor daemon marked osd + - Behind on trimming + - Manager daemon + conf: + global: + mon warn on pool no app: false + ms bind msgr2: false +- exec: + osd.0: + - ceph osd set-require-min-compat-client reef +- print: "**** done ceph" diff --git a/qa/suites/fs/upgrade/nofs/tasks/0-from/squid.yaml b/qa/suites/fs/upgrade/nofs/tasks/0-from/squid.yaml new file mode 100644 index 0000000000000..1da1519215bf9 --- /dev/null +++ b/qa/suites/fs/upgrade/nofs/tasks/0-from/squid.yaml @@ -0,0 +1,39 @@ +meta: +- desc: | + install ceph/squid latest +tasks: +- install: + branch: squid + exclude_packages: + - librados3 + - ceph-mgr-dashboard + - ceph-mgr-diskprediction-local + - ceph-mgr-rook + - ceph-mgr-cephadm + - cephadm + - ceph-volume + extra_packages: ['librados2'] +- print: "**** done installing squid" +- ceph: + log-ignorelist: + - overall HEALTH_ + - \(FS_ + - \(MDS_ + - \(OSD_ + - \(MON_DOWN\) + - \(CACHE_POOL_ + - \(POOL_ + - \(MGR_DOWN\) + - \(PG_ + - \(SMALLER_PGP_NUM\) + - Monitor daemon marked osd + - Behind on trimming + - Manager daemon + conf: + global: + mon warn on pool no app: false + ms bind msgr2: false +- exec: + osd.0: + - ceph osd set-require-min-compat-client squid +- print: "**** done ceph" diff --git a/qa/suites/fs/upgrade/nofs/tasks/1-upgrade.yaml b/qa/suites/fs/upgrade/nofs/tasks/1-upgrade.yaml index e31e4b43ca8dd..3eb76ec7e5c60 100644 --- a/qa/suites/fs/upgrade/nofs/tasks/1-upgrade.yaml +++ b/qa/suites/fs/upgrade/nofs/tasks/1-upgrade.yaml @@ -23,7 +23,6 @@ tasks: - ceph fs dump - install.upgrade: mon.a: - branch: reef - print: "**** done install.upgrade" - ceph.restart: daemons: [mon.*, mgr.*] @@ -39,7 +38,7 @@ tasks: - ceph versions - ceph osd dump -f json-pretty - ceph fs dump - - ceph osd require-osd-release quincy + - ceph osd require-osd-release squid - for f in `ceph osd pool ls` ; do ceph osd pool set $f pg_autoscale_mode off ; done - ceph.healthy: - print: "**** done ceph.restart" diff --git a/qa/suites/fs/upgrade/upgraded_client/branch/nautilus.yaml b/qa/suites/fs/upgrade/upgraded_client/branch/nautilus.yaml deleted file mode 100644 index 9b1db62e47f5a..0000000000000 --- a/qa/suites/fs/upgrade/upgraded_client/branch/nautilus.yaml +++ /dev/null @@ -1,2 +0,0 @@ -teuthology: - branch: nautilus diff --git a/qa/suites/fs/upgrade/upgraded_client/branch/pacific.yaml b/qa/suites/fs/upgrade/upgraded_client/branch/pacific.yaml deleted file mode 100644 index d86c55a34f9dc..0000000000000 --- a/qa/suites/fs/upgrade/upgraded_client/branch/pacific.yaml +++ /dev/null @@ -1,2 +0,0 @@ -teuthology: - branch: pacific diff --git a/qa/suites/fs/upgrade/upgraded_client/centos_8.stream.yaml b/qa/suites/fs/upgrade/upgraded_client/centos_8.stream.yaml deleted file mode 120000 index e787191b5a270..0000000000000 --- a/qa/suites/fs/upgrade/upgraded_client/centos_8.stream.yaml +++ /dev/null @@ -1 +0,0 @@ -.qa/distros/all/centos_8.stream.yaml \ No newline at end of file diff --git a/qa/suites/fs/upgrade/upgraded_client/centos_9.stream.yaml b/qa/suites/fs/upgrade/upgraded_client/centos_9.stream.yaml new file mode 120000 index 0000000000000..dca92ddbf45e5 --- /dev/null +++ b/qa/suites/fs/upgrade/upgraded_client/centos_9.stream.yaml @@ -0,0 +1 @@ +.qa/distros/podman/centos_9.stream.yaml \ No newline at end of file diff --git a/qa/suites/fs/upgrade/upgraded_client/tasks/0-install.yaml b/qa/suites/fs/upgrade/upgraded_client/tasks/0-install/quincy.yaml similarity index 64% rename from qa/suites/fs/upgrade/upgraded_client/tasks/0-install.yaml rename to qa/suites/fs/upgrade/upgraded_client/tasks/0-install/quincy.yaml index 5b250375a00e1..4e861bea8b03d 100644 --- a/qa/suites/fs/upgrade/upgraded_client/tasks/0-install.yaml +++ b/qa/suites/fs/upgrade/upgraded_client/tasks/0-install/quincy.yaml @@ -1,15 +1,9 @@ -teuthology: - premerge: | - local branch = yaml.teuthology.branch - yaml_fragment['tasks'][0]['install']['branch'] = tostring(branch) - print_branch = "**** done installing "..tostring(branch) - yaml_fragment['tasks'][1]['print'] = print_branch - local exec = yaml_fragment['tasks'][3]['exec']['osd.0'] - local set_compat = "ceph osd set-require-min-compat-client "..tostring(branch) - py_attrgetter(exec).append(set_compat) +meta: +- desc: | + install ceph/quincy latest tasks: - install: - branch: [] + branch: quincy exclude_packages: - cephadm - ceph-mgr-cephadm @@ -33,7 +27,7 @@ tasks: - NetworkManager - iproute - util-linux -- print: [] +- print: "**** done installing quincy" - ceph: log-ignorelist: - overall HEALTH_ @@ -54,5 +48,6 @@ tasks: mon warn on pool no app: false ms bind msgr2: false - exec: - osd.0: [] + osd.0: + - ceph osd set-require-min-compat-client quincy - print: "**** done ceph" diff --git a/qa/suites/fs/upgrade/upgraded_client/tasks/0-install/reef.yaml b/qa/suites/fs/upgrade/upgraded_client/tasks/0-install/reef.yaml new file mode 100644 index 0000000000000..0a4233453fe17 --- /dev/null +++ b/qa/suites/fs/upgrade/upgraded_client/tasks/0-install/reef.yaml @@ -0,0 +1,53 @@ +meta: +- desc: | + install ceph/reef latest +tasks: +- install: + branch: reef + exclude_packages: + - cephadm + - ceph-mgr-cephadm + - ceph-immutable-object-cache + - python3-rados + - python3-rgw + - python3-rbd + - python3-cephfs + - ceph-volume + extra_packages: + - python-rados + - python-rgw + - python-rbd + - python-cephfs + # For kernel_untar_build workunit + extra_system_packages: + - bison + - flex + - elfutils-libelf-devel + - openssl-devel + - NetworkManager + - iproute + - util-linux +- print: "**** done installing reef" +- ceph: + log-ignorelist: + - overall HEALTH_ + - \(FS_ + - \(MDS_ + - \(OSD_ + - \(MON_DOWN\) + - \(CACHE_POOL_ + - \(POOL_ + - \(MGR_DOWN\) + - \(PG_ + - \(SMALLER_PGP_NUM\) + - Monitor daemon marked osd + - Behind on trimming + - Manager daemon + conf: + global: + mon warn on pool no app: false + ms bind msgr2: false +- exec: + osd.0: + - ceph osd set-require-min-compat-client reef +- print: "**** done ceph" diff --git a/qa/suites/fs/upgrade/upgraded_client/tasks/2-clients/fuse-upgrade.yaml b/qa/suites/fs/upgrade/upgraded_client/tasks/2-clients/fuse-upgrade.yaml index cb8ac4d4f2d12..bed83610ff004 100644 --- a/qa/suites/fs/upgrade/upgraded_client/tasks/2-clients/fuse-upgrade.yaml +++ b/qa/suites/fs/upgrade/upgraded_client/tasks/2-clients/fuse-upgrade.yaml @@ -1,13 +1,4 @@ teuthology: - premerge: | - local branch = yaml.teuthology.branch - if tostring(branch) == "nautilus" then - yaml_fragment['tasks'][2]['install.upgrade']['client.0']['branch'] = "pacific" - elseif tostring(branch) == "pacific" then - yaml_fragment['tasks'][2]['install.upgrade']['client.0']['branch'] = "reef" - else - error("invalid source branch") - end postmerge: - if not is_fuse() then reject() end tasks: @@ -17,7 +8,6 @@ tasks: - print: "**** done unmount client.0" - install.upgrade: client.0: - branch: [] - print: "**** done install.upgrade on client.0" - ceph.healthy: - ceph-fuse: diff --git a/qa/tasks/ceph_fuse.py b/qa/tasks/ceph_fuse.py index 70cf9bf838539..706bdd977650c 100644 --- a/qa/tasks/ceph_fuse.py +++ b/qa/tasks/ceph_fuse.py @@ -4,6 +4,7 @@ import contextlib import logging +import re from teuthology import misc from tasks.cephfs.fuse_mount import FuseMount @@ -86,6 +87,32 @@ def task(ctx, config): client.1: mount_subvol_num: 1 + Example for client mount with custom client feature set + + tasks: + - ceph: + - ceph-fuse: + client.0: + client_feature_range: 21 # everything including CEPHFS_FEATURE_MDS_AUTH_CAPS_CHECK + + OR + + tasks: + - ceph: + - ceph-fuse: + client.0: + client_feature_range: "[0-13],[15-21]" # all features except metric_collect (bit 14) + + OR + + tasks: + - ceph: + - ceph-fuse: + client.0: + client_feature_range: "[0-13],16,19,[20-21]" # all features except metric_collect,alternate_name, op_getvxattr, 32bit_retry_fwd + + client_feature_range can have repetitive and overlapping ranges/values - the parsed feature bits would not have duplicates and is sorted. Decreasing ranges are silently ignored. + :param ctx: Context :param config: Configuration """ @@ -161,12 +188,50 @@ def task(ctx, config): for remote in remotes: FuseMount.cleanup_stale_netnses_and_bridge(remote) + def parse_client_feature_range(client_feature_range): + def intify(val): + try: + return int(val) + except ValueError: + log.warn(f'failed to decode feature bit {val}') + raise + feature_bits = [] + pvalue = re.compile(r'(\d+)') + prange = re.compile(r'\[(\d+)\-(\d+)\]') + if (isinstance(client_feature_range, int)): + # everything upto (and including) this feature bit + feature_bits.extend(range(0, client_feature_range+1)) + elif isinstance(client_feature_range, str): + for feat in client_feature_range.split(','): + m = pvalue.match(feat) + if m: + feature_bits.append(intify(m.group(1))) + continue + m = prange.match(feat) + if m: + feature_bits.extend(range(intify(m.group(1)), intify(m.group(2))+1)) + continue + raise ValueError(f'Invalid feature range or value "{feat}"') + else: + raise TypeError("client_feature_range must be of type int or str") + return sorted(set(feature_bits)) + # Mount any clients we have been asked to (default to mount all) log.info('Mounting ceph-fuse clients...') for info in mounted_by_me.values(): config = info["config"] mount_x = info['mount'] - mount_x.mount(mntopts=config.get('mntopts', []), mntargs=config.get('mntargs', [])) + + # apply custom client feature set + client_features = [] + client_feature_range = config.get("client_feature_range", None) + if client_feature_range is not None: + client_features = ",".join(str(i) for i in parse_client_feature_range(client_feature_range)) + mntargs = config.get('mntargs', []) + if client_features: + mntargs.append(f"--client_debug_inject_features={client_features}") + log.debug(f"passing mntargs={mntargs}") + mount_x.mount(mntopts=config.get('mntopts', []), mntargs=mntargs) for info in mounted_by_me.values(): info["mount"].wait_until_mounted()