ceph/qa
Ilya Dryomov 5555ae2b27 qa/workunits/rbd: add a test for force promote with a user snapshot
Add a reproducer for the crash on a bad variant access which was fixed
in commit 7d75161051 ("librbd: fix a crash in get_rollback_snap_id").

The reproducer deliberately works around many other issues with force
promote in snapshot-based mirroring: stopping rbd-mirror daemon
shouldn't be necessary (let alone with SIGKILL), get_rollback_snap_id()
and its caller can_create_primary_snapshot() are flawed and can pick
the wrong snapshot to roll back to or skip rollback when it's actually
required, the user snapshot in this scenario should be removed as part
of force promoting because it's incomplete and won't be usable after
the image is promoted, etc.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
(cherry picked from commit 0f4a37dd9f)

Conflicts:
	qa/workunits/rbd/rbd_mirror_journal.sh [ commits 3fd8a03887
	  ("qa/workunits/rbd: merge journal and snapshot test scripts")
	  and 3fdbc160bb ("rbd-mirror: allow mirroring to a different
	  namespace") not in reef ]
	qa/workunits/rbd/rbd_mirror_snapshot.sh [ duplicated/cloned for
	  snapshot-based mirroring ]
2025-02-28 20:47:57 +01:00
..
archs
cephfs Merge pull request #59923 from mchangir/wip-68076-reef 2025-02-04 15:19:01 +05:30
client
clusters
config
crontab
debug
distros Merge pull request #58809 from lxbsz/wip-67118 2024-11-26 22:26:06 +05:30
erasure-code
libceph
machine_types
mds
mgr_ttl_cache
mon/bootstrap
mon_election qa: add missing terminating newline 2025-02-25 11:17:15 -05:00
msgr
nightlies
objectstore
objectstore_cephfs
objectstore_debug
overrides
packages
qa_scripts
rbd
releases
rgw
rgw_bucket_sharding
rgw_frontend
rgw_pool_type
standalone test: ceph daemon command with asok path 2025-01-22 12:24:42 +00:00
suites qa/tasks/mgr: add tests for sqlite autocommit 2025-02-25 11:17:15 -05:00
tasks qa/tasks/mgr: add tests for sqlite autocommit 2025-02-25 11:17:15 -05:00
timezone
workunits qa/workunits/rbd: add a test for force promote with a user snapshot 2025-02-28 20:47:57 +01:00
.gitignore
.qa
CMakeLists.txt
find-used-ports.sh
loopall.sh
Makefile os: remove unused btrfs_ioctl.h and tests 2024-11-04 13:56:02 -05:00
mypy.ini
README
run_xfstests_qemu.sh
run_xfstests-obsolete.sh
run_xfstests.sh
run-standalone.sh
runallonce.sh
runoncfuse.sh
runonkclient.sh
setup-chroot.sh
test_import.py
tox.ini
valgrind.supp Merge pull request #58692 from ljflores/wip-67054-reef 2024-12-03 09:37:19 +05:30

ceph-qa-suite
-------------

clusters/    - some predefined cluster layouts
suites/      - set suite

The suites directory has a hierarchical collection of tests.  This can be
freeform, but generally follows the convention of

  suites/<test suite name>/<test group>/...

A test is described by a yaml fragment.

A test can exist as a single .yaml file in the directory tree.  For example:

 suites/foo/one.yaml
 suites/foo/two.yaml

is a simple group of two tests.

A directory with a magic '+' file represents a test that combines all
other items in the directory into a single yaml fragment.  For example:

 suites/foo/bar/+
 suites/foo/bar/a.yaml
 suites/foo/bar/b.yaml
 suites/foo/bar/c.yaml

is a single test consisting of a + b + c.

A directory with a magic '%' file represents a test matrix formed from
all other items in the directory.  For example,

 suites/baz/%
 suites/baz/a.yaml
 suites/baz/b/b1.yaml
 suites/baz/b/b2.yaml
 suites/baz/c.yaml
 suites/baz/d/d1.yaml
 suites/baz/d/d2.yaml

is a 4-dimensional test matrix.  Two dimensions (a, c) are trivial (1
item), so this is really 2x2 = 4 tests, which are

  a + b1 + c + d1
  a + b1 + c + d2
  a + b2 + c + d1
  a + b2 + c + d2

A directory with a magic '$' file, or a directory whose name ends with '$',
represents a test where one of the non-magic items is chosen randomly.  For
example, both

 suites/foo/$
 suites/foo/a.yaml
 suites/foo/b.yaml
 suites/foo/c.yaml

and

 suites/foo$/a.yaml
 suites/foo$/b.yaml
 suites/foo$/c.yaml

is a single test, either a, b or c.  This can be used in conjunction with the
'%' file in the same (see below) or other directories to run a series of tests
without causing an unwanted increase in the total number of jobs run.

Symlinks are okay.

One particular use of symlinks is to combine '%' and the latter form of '$'
feature.  Consider supported_distros directory containing fragments that define
os_type and os_version:

 supported_distros/%
 supported_distros/centos.yaml
 supported_distros/rhel.yaml
 supported_distros/ubuntu.yaml

A test that links supported_distros as distros (a name that doesn't end with
'$') will be run three times: on centos, rhel and ubuntu.  A test that links
supported_distros as distros$ will be run just once: either on centos, rhel or
ubuntu, chosen randomly.

The teuthology code can be found in https://github.com/ceph/teuthology.git