]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
qa: use supported releases for featureful_client
authorVenky Shankar <vshankar@redhat.com>
Fri, 7 Jun 2024 05:13:27 +0000 (05:13 +0000)
committerVenky Shankar <vshankar@redhat.com>
Fri, 28 Jun 2024 11:58:53 +0000 (17:28 +0530)
... and switch for centos9.

For reef release, start upgrade from pacific/quincy.

Fixes: https://tracker.ceph.com/issues/65580
Signed-off-by: Venky Shankar <vshankar@redhat.com>
(cherry picked from commit 3715ce671de97530dda30d59fe643cebc3ebc508)

16 files changed:
qa/suites/fs/upgrade/featureful_client/old_client/centos_8.yaml [deleted symlink]
qa/suites/fs/upgrade/featureful_client/old_client/centos_9.stream.yaml [new symlink]
qa/suites/fs/upgrade/featureful_client/old_client/tasks/0-from/quincy.yaml [new file with mode: 0644]
qa/suites/fs/upgrade/featureful_client/old_client/tasks/0-octopus.yaml [deleted file]
qa/suites/fs/upgrade/featureful_client/old_client/tasks/1-client.yaml
qa/suites/fs/upgrade/featureful_client/old_client/tasks/2-upgrade.yaml
qa/suites/fs/upgrade/featureful_client/old_client/tasks/3-compat_client/quincy.yaml [deleted file]
qa/suites/fs/upgrade/featureful_client/old_client/tasks/3-compat_client/yes.yaml [new file with mode: 0644]
qa/suites/fs/upgrade/featureful_client/upgraded_client/centos_8.yaml [deleted symlink]
qa/suites/fs/upgrade/featureful_client/upgraded_client/centos_9.stream.yaml [new symlink]
qa/suites/fs/upgrade/featureful_client/upgraded_client/tasks/0-from/quincy.yaml [new file with mode: 0644]
qa/suites/fs/upgrade/featureful_client/upgraded_client/tasks/0-octopus.yaml [deleted file]
qa/suites/fs/upgrade/featureful_client/upgraded_client/tasks/1-client.yaml
qa/suites/fs/upgrade/featureful_client/upgraded_client/tasks/2-upgrade.yaml
qa/suites/fs/upgrade/featureful_client/upgraded_client/tasks/3-client-upgrade.yaml
qa/tasks/ceph_fuse.py

diff --git a/qa/suites/fs/upgrade/featureful_client/old_client/centos_8.yaml b/qa/suites/fs/upgrade/featureful_client/old_client/centos_8.yaml
deleted file mode 120000 (symlink)
index 5dceec7..0000000
+++ /dev/null
@@ -1 +0,0 @@
-.qa/distros/supported/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 (symlink)
index 0000000..dc442c2
--- /dev/null
@@ -0,0 +1 @@
+.qa/distros/all/centos_9.stream.yaml
\ No newline at end of file
diff --git a/qa/suites/fs/upgrade/featureful_client/old_client/tasks/0-from/quincy.yaml b/qa/suites/fs/upgrade/featureful_client/old_client/tasks/0-from/quincy.yaml
new file mode 100644 (file)
index 0000000..7d36116
--- /dev/null
@@ -0,0 +1,39 @@
+meta:
+- desc: |
+   install ceph/quincy latest
+tasks:
+- install:
+    branch: quincy
+    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 quincy"
+- 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 quincy
+- 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-octopus.yaml
deleted file mode 100644 (file)
index e777442..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-meta:
-- desc: |
-   install ceph/octopus latest
-tasks:
-- install:
-    branch: octopus
-    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 octopus"
-- 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 octopus
-- print: "**** done ceph"
index 976d6e2650bf90a2cfe9d9a247c65fd028673a8d..f545d8bfaaec147b3a5ebe078c9ec950c49f3e98 100644 (file)
@@ -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:
index 26c185946dd6843ded0d07639a34c1090a830f8c..928c40d20e7c97634bde1da9c646c414c63ab6f8 100644 (file)
@@ -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 reef
     - 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/quincy.yaml
deleted file mode 100644 (file)
index 138d8f4..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-overrides:
-  ceph:
-    log-ignorelist:
-      - missing required features
-tasks:
-- exec:
-    mon.a:
-      - ceph fs dump --format=json-pretty
-      - ceph fs required_client_features cephfs add metric_collect
-- sleep:
-    duration: 5
-- fs.clients_evicted:
diff --git a/qa/suites/fs/upgrade/featureful_client/old_client/tasks/3-compat_client/yes.yaml b/qa/suites/fs/upgrade/featureful_client/old_client/tasks/3-compat_client/yes.yaml
new file mode 100644 (file)
index 0000000..138d8f4
--- /dev/null
@@ -0,0 +1,12 @@
+overrides:
+  ceph:
+    log-ignorelist:
+      - missing required features
+tasks:
+- exec:
+    mon.a:
+      - ceph fs dump --format=json-pretty
+      - ceph fs required_client_features cephfs add metric_collect
+- sleep:
+    duration: 5
+- fs.clients_evicted:
diff --git a/qa/suites/fs/upgrade/featureful_client/upgraded_client/centos_8.yaml b/qa/suites/fs/upgrade/featureful_client/upgraded_client/centos_8.yaml
deleted file mode 120000 (symlink)
index 5dceec7..0000000
+++ /dev/null
@@ -1 +0,0 @@
-.qa/distros/supported/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 (symlink)
index 0000000..dc442c2
--- /dev/null
@@ -0,0 +1 @@
+.qa/distros/all/centos_9.stream.yaml
\ No newline at end of file
diff --git a/qa/suites/fs/upgrade/featureful_client/upgraded_client/tasks/0-from/quincy.yaml b/qa/suites/fs/upgrade/featureful_client/upgraded_client/tasks/0-from/quincy.yaml
new file mode 100644 (file)
index 0000000..7d36116
--- /dev/null
@@ -0,0 +1,39 @@
+meta:
+- desc: |
+   install ceph/quincy latest
+tasks:
+- install:
+    branch: quincy
+    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 quincy"
+- 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 quincy
+- print: "**** done ceph"
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-octopus.yaml
deleted file mode 100644 (file)
index e777442..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-meta:
-- desc: |
-   install ceph/octopus latest
-tasks:
-- install:
-    branch: octopus
-    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 octopus"
-- 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 octopus
-- print: "**** done ceph"
index c9b4c046f6c43b4e284c540ebc93b9c3ddba6c98..3485dd680d6fa694346f9756189afdeb71ae5b87 100644 (file)
@@ -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"
index e5ea8b19cef368a046d74e724046fa1fc01a3e13..c1d65d25c07e57535e8c09e841114e64f617780b 100644 (file)
@@ -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 reef
     - for f in `ceph osd pool ls` ; do ceph osd pool set $f pg_autoscale_mode off ; done
 - ceph.healthy:
 - print: "**** done ceph.restart"
index 251c349acb824e362b57110f5bf50904e58e833c..58fdfdbd8d9e899379d5bd0b33fa2826e3e402e9 100644 (file)
@@ -1,7 +1,6 @@
 tasks:
 - install.upgrade:
     client.0:
-      branch: quincy
 - print: "**** done install.upgrade on client.0"
 - ceph-fuse:
     client.0:
index 70cf9bf838539dacf0810b5cca765dc483a955a2..706bdd977650c66d6ead00a69243e5c9ca3740fa 100644 (file)
@@ -4,6 +4,7 @@ Ceph FUSE client task
 
 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()