]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
qa: add a upgrade test suite from nautilus and test the new getvxattr op 47891/head
authorXiubo Li <xiubli@redhat.com>
Wed, 3 Aug 2022 00:29:18 +0000 (08:29 +0800)
committerXiubo Li <xiubli@redhat.com>
Mon, 5 Dec 2022 01:06:27 +0000 (09:06 +0800)
For new OPs the old ceph may will crash the MDSs when receiving
unknow OPs. As a workaround the new clients will check the sessions
feature bits to decide to send the new OPs or not.

Fixes: https://tracker.ceph.com/issues/56529
Signed-off-by: Xiubo Li <xiubli@redhat.com>
(cherry picked from commit eae0a16002798e69936f67edf8266fbc9d82bf12)

20 files changed:
qa/suites/fs/upgrade/upgraded_client/.qa [new symlink]
qa/suites/fs/upgrade/upgraded_client/from_nautilus/% [new file with mode: 0644]
qa/suites/fs/upgrade/upgraded_client/from_nautilus/.qa [new symlink]
qa/suites/fs/upgrade/upgraded_client/from_nautilus/bluestore-bitmap.yaml [new symlink]
qa/suites/fs/upgrade/upgraded_client/from_nautilus/centos_latest.yaml [new symlink]
qa/suites/fs/upgrade/upgraded_client/from_nautilus/clusters/% [new file with mode: 0644]
qa/suites/fs/upgrade/upgraded_client/from_nautilus/clusters/.qa [new symlink]
qa/suites/fs/upgrade/upgraded_client/from_nautilus/clusters/1-mds-1-client-micro.yaml [new symlink]
qa/suites/fs/upgrade/upgraded_client/from_nautilus/conf [new symlink]
qa/suites/fs/upgrade/upgraded_client/from_nautilus/overrides/% [new file with mode: 0644]
qa/suites/fs/upgrade/upgraded_client/from_nautilus/overrides/.qa [new symlink]
qa/suites/fs/upgrade/upgraded_client/from_nautilus/overrides/ignorelist_health.yaml [new symlink]
qa/suites/fs/upgrade/upgraded_client/from_nautilus/overrides/ignorelist_wrongly_marked_down.yaml [new symlink]
qa/suites/fs/upgrade/upgraded_client/from_nautilus/overrides/pg-warn.yaml [new file with mode: 0644]
qa/suites/fs/upgrade/upgraded_client/from_nautilus/tasks/% [new file with mode: 0644]
qa/suites/fs/upgrade/upgraded_client/from_nautilus/tasks/.qa [new symlink]
qa/suites/fs/upgrade/upgraded_client/from_nautilus/tasks/0-nautilus.yaml [new file with mode: 0644]
qa/suites/fs/upgrade/upgraded_client/from_nautilus/tasks/1-client-upgrade.yaml [new file with mode: 0644]
qa/suites/fs/upgrade/upgraded_client/from_nautilus/tasks/2-client-sanity.yaml [new file with mode: 0644]
qa/tasks/cephfs/test_newops.py [new file with mode: 0644]

diff --git a/qa/suites/fs/upgrade/upgraded_client/.qa b/qa/suites/fs/upgrade/upgraded_client/.qa
new file mode 120000 (symlink)
index 0000000..a602a03
--- /dev/null
@@ -0,0 +1 @@
+../.qa/
\ No newline at end of file
diff --git a/qa/suites/fs/upgrade/upgraded_client/from_nautilus/% b/qa/suites/fs/upgrade/upgraded_client/from_nautilus/%
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/qa/suites/fs/upgrade/upgraded_client/from_nautilus/.qa b/qa/suites/fs/upgrade/upgraded_client/from_nautilus/.qa
new file mode 120000 (symlink)
index 0000000..a602a03
--- /dev/null
@@ -0,0 +1 @@
+../.qa/
\ No newline at end of file
diff --git a/qa/suites/fs/upgrade/upgraded_client/from_nautilus/bluestore-bitmap.yaml b/qa/suites/fs/upgrade/upgraded_client/from_nautilus/bluestore-bitmap.yaml
new file mode 120000 (symlink)
index 0000000..17ad98e
--- /dev/null
@@ -0,0 +1 @@
+../../../../../cephfs/objectstore-ec/bluestore-bitmap.yaml
\ No newline at end of file
diff --git a/qa/suites/fs/upgrade/upgraded_client/from_nautilus/centos_latest.yaml b/qa/suites/fs/upgrade/upgraded_client/from_nautilus/centos_latest.yaml
new file mode 120000 (symlink)
index 0000000..bd9854e
--- /dev/null
@@ -0,0 +1 @@
+.qa/distros/supported/centos_latest.yaml
\ No newline at end of file
diff --git a/qa/suites/fs/upgrade/upgraded_client/from_nautilus/clusters/% b/qa/suites/fs/upgrade/upgraded_client/from_nautilus/clusters/%
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/qa/suites/fs/upgrade/upgraded_client/from_nautilus/clusters/.qa b/qa/suites/fs/upgrade/upgraded_client/from_nautilus/clusters/.qa
new file mode 120000 (symlink)
index 0000000..fea2489
--- /dev/null
@@ -0,0 +1 @@
+../.qa
\ No newline at end of file
diff --git a/qa/suites/fs/upgrade/upgraded_client/from_nautilus/clusters/1-mds-1-client-micro.yaml b/qa/suites/fs/upgrade/upgraded_client/from_nautilus/clusters/1-mds-1-client-micro.yaml
new file mode 120000 (symlink)
index 0000000..50ffb6d
--- /dev/null
@@ -0,0 +1 @@
+.qa/cephfs/clusters/1-mds-1-client-micro.yaml
\ No newline at end of file
diff --git a/qa/suites/fs/upgrade/upgraded_client/from_nautilus/conf b/qa/suites/fs/upgrade/upgraded_client/from_nautilus/conf
new file mode 120000 (symlink)
index 0000000..6d47129
--- /dev/null
@@ -0,0 +1 @@
+.qa/cephfs/conf/
\ No newline at end of file
diff --git a/qa/suites/fs/upgrade/upgraded_client/from_nautilus/overrides/% b/qa/suites/fs/upgrade/upgraded_client/from_nautilus/overrides/%
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/qa/suites/fs/upgrade/upgraded_client/from_nautilus/overrides/.qa b/qa/suites/fs/upgrade/upgraded_client/from_nautilus/overrides/.qa
new file mode 120000 (symlink)
index 0000000..a602a03
--- /dev/null
@@ -0,0 +1 @@
+../.qa/
\ No newline at end of file
diff --git a/qa/suites/fs/upgrade/upgraded_client/from_nautilus/overrides/ignorelist_health.yaml b/qa/suites/fs/upgrade/upgraded_client/from_nautilus/overrides/ignorelist_health.yaml
new file mode 120000 (symlink)
index 0000000..5cb891a
--- /dev/null
@@ -0,0 +1 @@
+.qa/cephfs/overrides/ignorelist_health.yaml
\ No newline at end of file
diff --git a/qa/suites/fs/upgrade/upgraded_client/from_nautilus/overrides/ignorelist_wrongly_marked_down.yaml b/qa/suites/fs/upgrade/upgraded_client/from_nautilus/overrides/ignorelist_wrongly_marked_down.yaml
new file mode 120000 (symlink)
index 0000000..f317cb7
--- /dev/null
@@ -0,0 +1 @@
+.qa/cephfs/overrides/ignorelist_wrongly_marked_down.yaml
\ No newline at end of file
diff --git a/qa/suites/fs/upgrade/upgraded_client/from_nautilus/overrides/pg-warn.yaml b/qa/suites/fs/upgrade/upgraded_client/from_nautilus/overrides/pg-warn.yaml
new file mode 100644 (file)
index 0000000..4ae54a4
--- /dev/null
@@ -0,0 +1,5 @@
+overrides:
+  ceph:
+    conf:
+      global:
+        mon pg warn min per osd: 0
diff --git a/qa/suites/fs/upgrade/upgraded_client/from_nautilus/tasks/% b/qa/suites/fs/upgrade/upgraded_client/from_nautilus/tasks/%
new file mode 100644 (file)
index 0000000..e69de29
diff --git a/qa/suites/fs/upgrade/upgraded_client/from_nautilus/tasks/.qa b/qa/suites/fs/upgrade/upgraded_client/from_nautilus/tasks/.qa
new file mode 120000 (symlink)
index 0000000..a602a03
--- /dev/null
@@ -0,0 +1 @@
+../.qa/
\ No newline at end of file
diff --git a/qa/suites/fs/upgrade/upgraded_client/from_nautilus/tasks/0-nautilus.yaml b/qa/suites/fs/upgrade/upgraded_client/from_nautilus/tasks/0-nautilus.yaml
new file mode 100644 (file)
index 0000000..2b6d375
--- /dev/null
@@ -0,0 +1,44 @@
+meta:
+- desc: |
+   install ceph/nautilus latest
+tasks:
+- install:
+    branch: nautilus
+    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
+- print: "**** done installing nautilus"
+- 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 nautilus
+- print: "**** done ceph"
diff --git a/qa/suites/fs/upgrade/upgraded_client/from_nautilus/tasks/1-client-upgrade.yaml b/qa/suites/fs/upgrade/upgraded_client/from_nautilus/tasks/1-client-upgrade.yaml
new file mode 100644 (file)
index 0000000..99b99e6
--- /dev/null
@@ -0,0 +1,7 @@
+tasks:
+- install.upgrade:
+    client.0:
+- print: "**** done install.upgrade on client.0"
+- ceph-fuse:
+    client.0:
+- print: "**** done remount client"
diff --git a/qa/suites/fs/upgrade/upgraded_client/from_nautilus/tasks/2-client-sanity.yaml b/qa/suites/fs/upgrade/upgraded_client/from_nautilus/tasks/2-client-sanity.yaml
new file mode 100644 (file)
index 0000000..9508cce
--- /dev/null
@@ -0,0 +1,4 @@
+tasks:
+  - cephfs_test_runner:
+      modules:
+        - tasks.cephfs.test_newops
diff --git a/qa/tasks/cephfs/test_newops.py b/qa/tasks/cephfs/test_newops.py
new file mode 100644 (file)
index 0000000..4c34dab
--- /dev/null
@@ -0,0 +1,25 @@
+import logging
+from tasks.cephfs.cephfs_test_case import CephFSTestCase
+from tasks.cephfs.fuse_mount import FuseMount
+from tasks.cephfs.kernel_mount import KernelMount
+
+log = logging.getLogger(__name__)
+
+class TestNewOps(CephFSTestCase):
+    def test_newops_getvxattr(self):
+        """
+        For nautilus it will crash the MDSs when receive unknown OPs, as a workaround
+        the clients should avoid sending them to nautilus
+        """
+        if isinstance(self.mount_a, FuseMount):
+            log.info('client is fuse mounted')
+        elif isinstance(self.mount_a, KernelMount):
+            log.info('client is kernel mounted')
+            self.skipTest("Currently kclient hasn't fixed new ops issue yet.")
+
+        log.info("Test for new getvxattr op...")
+        self.mount_a.run_shell(["mkdir", "newop_getvxattr_dir"])
+
+        # to test whether will nautilus crash the MDSs
+        self.mount_a.getfattr("./newop_getvxattr_dir", "ceph.dir.pin.random")
+        log.info("Test for new getvxattr op succeeds")