From: Xiubo Li Date: Wed, 3 Aug 2022 00:29:18 +0000 (+0800) Subject: qa: add a upgrade test suite from nautilus and test the new getvxattr op X-Git-Tag: v16.2.11~53^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=df2e92fe55857cf73db14087ccf09ea474da2f18;p=ceph.git qa: add a upgrade test suite from nautilus and test the new getvxattr op 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 (cherry picked from commit eae0a16002798e69936f67edf8266fbc9d82bf12) --- diff --git a/qa/suites/fs/upgrade/upgraded_client/.qa b/qa/suites/fs/upgrade/upgraded_client/.qa new file mode 120000 index 0000000000000..a602a0353e751 --- /dev/null +++ b/qa/suites/fs/upgrade/upgraded_client/.qa @@ -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 index 0000000000000..e69de29bb2d1d 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 index 0000000000000..a602a0353e751 --- /dev/null +++ b/qa/suites/fs/upgrade/upgraded_client/from_nautilus/.qa @@ -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 index 0000000000000..17ad98e799ee5 --- /dev/null +++ b/qa/suites/fs/upgrade/upgraded_client/from_nautilus/bluestore-bitmap.yaml @@ -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 index 0000000000000..bd9854e702982 --- /dev/null +++ b/qa/suites/fs/upgrade/upgraded_client/from_nautilus/centos_latest.yaml @@ -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 index 0000000000000..e69de29bb2d1d 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 index 0000000000000..fea2489fdf6d9 --- /dev/null +++ b/qa/suites/fs/upgrade/upgraded_client/from_nautilus/clusters/.qa @@ -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 index 0000000000000..50ffb6d5399b4 --- /dev/null +++ b/qa/suites/fs/upgrade/upgraded_client/from_nautilus/clusters/1-mds-1-client-micro.yaml @@ -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 index 0000000000000..6d47129847fad --- /dev/null +++ b/qa/suites/fs/upgrade/upgraded_client/from_nautilus/conf @@ -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 index 0000000000000..e69de29bb2d1d 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 index 0000000000000..a602a0353e751 --- /dev/null +++ b/qa/suites/fs/upgrade/upgraded_client/from_nautilus/overrides/.qa @@ -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 index 0000000000000..5cb891a95c3c8 --- /dev/null +++ b/qa/suites/fs/upgrade/upgraded_client/from_nautilus/overrides/ignorelist_health.yaml @@ -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 index 0000000000000..f317cb714ca28 --- /dev/null +++ b/qa/suites/fs/upgrade/upgraded_client/from_nautilus/overrides/ignorelist_wrongly_marked_down.yaml @@ -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 index 0000000000000..4ae54a40d3195 --- /dev/null +++ b/qa/suites/fs/upgrade/upgraded_client/from_nautilus/overrides/pg-warn.yaml @@ -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 index 0000000000000..e69de29bb2d1d 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 index 0000000000000..a602a0353e751 --- /dev/null +++ b/qa/suites/fs/upgrade/upgraded_client/from_nautilus/tasks/.qa @@ -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 index 0000000000000..2b6d3753e52a1 --- /dev/null +++ b/qa/suites/fs/upgrade/upgraded_client/from_nautilus/tasks/0-nautilus.yaml @@ -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 index 0000000000000..99b99e642aaae --- /dev/null +++ b/qa/suites/fs/upgrade/upgraded_client/from_nautilus/tasks/1-client-upgrade.yaml @@ -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 index 0000000000000..9508cce65affa --- /dev/null +++ b/qa/suites/fs/upgrade/upgraded_client/from_nautilus/tasks/2-client-sanity.yaml @@ -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 index 0000000000000..4c34dabdd1035 --- /dev/null +++ b/qa/tasks/cephfs/test_newops.py @@ -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")