ceph-mirror/qa
Patrick Donnelly 614993a066
qa/tasks/cbt: construct venv just for cbt
So we no longer need to install system-wide.

Avoids errors like on Ubuntu 24.04:

    2026-05-24T13:48:19.681 DEBUG:teuthology.orchestra.run.trial043:> python3 -m pip install -r /home/ubuntu/cephtest/cbt/requirements.txt
    2026-05-24T13:48:19.861 INFO:teuthology.orchestra.run.trial043.stderr:error: externally-managed-environment
    2026-05-24T13:48:19.861 INFO:teuthology.orchestra.run.trial043.stderr:
    2026-05-24T13:48:19.861 INFO:teuthology.orchestra.run.trial043.stderr:× This environment is externally managed
    2026-05-24T13:48:19.861 INFO:teuthology.orchestra.run.trial043.stderr:╰─> To install Python packages system-wide, try apt install
    2026-05-24T13:48:19.862 INFO:teuthology.orchestra.run.trial043.stderr:    python3-xyz, where xyz is the package you are trying to
    2026-05-24T13:48:19.862 INFO:teuthology.orchestra.run.trial043.stderr:    install.
    2026-05-24T13:48:19.862 INFO:teuthology.orchestra.run.trial043.stderr:
    2026-05-24T13:48:19.862 INFO:teuthology.orchestra.run.trial043.stderr:    If you wish to install a non-Debian-packaged Python package,
    2026-05-24T13:48:19.862 INFO:teuthology.orchestra.run.trial043.stderr:    create a virtual environment using python3 -m venv path/to/venv.
    2026-05-24T13:48:19.862 INFO:teuthology.orchestra.run.trial043.stderr:    Then use path/to/venv/bin/python and path/to/venv/bin/pip. Make
    2026-05-24T13:48:19.862 INFO:teuthology.orchestra.run.trial043.stderr:    sure you have python3-full installed.
    2026-05-24T13:48:19.862 INFO:teuthology.orchestra.run.trial043.stderr:
    2026-05-24T13:48:19.862 INFO:teuthology.orchestra.run.trial043.stderr:    If you wish to install a non-Debian packaged Python application,
    2026-05-24T13:48:19.862 INFO:teuthology.orchestra.run.trial043.stderr:    it may be easiest to use pipx install xyz, which will manage a
    2026-05-24T13:48:19.862 INFO:teuthology.orchestra.run.trial043.stderr:    virtual environment for you. Make sure you have pipx installed.
    2026-05-24T13:48:19.863 INFO:teuthology.orchestra.run.trial043.stderr:
    2026-05-24T13:48:19.863 INFO:teuthology.orchestra.run.trial043.stderr:    See /usr/share/doc/python3.12/README.venv for more information.
    2026-05-24T13:48:19.863 INFO:teuthology.orchestra.run.trial043.stderr:
    2026-05-24T13:48:19.863 INFO:teuthology.orchestra.run.trial043.stderr:note: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.
    2026-05-24T13:48:19.863 INFO:teuthology.orchestra.run.trial043.stderr:hint: See PEP 668 for the detailed specification.
    2026-05-24T13:48:19.883 DEBUG:teuthology.orchestra.run:got remote process result: 1
    2026-05-24T13:48:19.883 ERROR:teuthology.run_tasks:Saw exception from tasks.
    Traceback (most recent call last):
      File "/home/teuthworker/src/git.ceph.com_teuthology_3686f8793d626abcf5a0018da0a50786e41fed9d/teuthology/run_tasks.py", line 112, in run_tasks
        manager.__enter__()
      File "/home/teuthworker/src/git.ceph.com_teuthology_3686f8793d626abcf5a0018da0a50786e41fed9d/teuthology/task/__init__.py", line 122, in __enter__
        self.setup()
      File "/home/teuthworker/src/github.com_ceph_ceph-c_1bc3c25246d3a6fbc360dc78d9b4b51200743391/qa/tasks/cbt.py", line 173, in setup
        self.install_dependencies()
      File "/home/teuthworker/src/github.com_ceph_ceph-c_1bc3c25246d3a6fbc360dc78d9b4b51200743391/qa/tasks/cbt.py", line 112, in install_dependencies
        self.first_mon.run(args=pip_install_cmd)
      File "/home/teuthworker/src/git.ceph.com_teuthology_3686f8793d626abcf5a0018da0a50786e41fed9d/teuthology/orchestra/remote.py", line 596, in run
        r = self._runner(client=self.ssh, name=self.shortname, **kwargs)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      File "/home/teuthworker/src/git.ceph.com_teuthology_3686f8793d626abcf5a0018da0a50786e41fed9d/teuthology/orchestra/run.py", line 461, in run
        r.wait()
      File "/home/teuthworker/src/git.ceph.com_teuthology_3686f8793d626abcf5a0018da0a50786e41fed9d/teuthology/orchestra/run.py", line 161, in wait
        self._raise_for_status()
      File "/home/teuthworker/src/git.ceph.com_teuthology_3686f8793d626abcf5a0018da0a50786e41fed9d/teuthology/orchestra/run.py", line 181, in _raise_for_status
        raise CommandFailedError(
    teuthology.exceptions.CommandFailedError: Command failed on trial043 with status 1: 'python3 -m pip install -r /home/ubuntu/cephtest/cbt/requirements.txt'

Signed-off-by: Patrick Donnelly <pdonnell@ibm.com>
2026-05-27 08:45:53 -04:00
..
archs
cephfs Merge PR #67822 into main 2026-04-16 12:28:52 -04:00
client
clusters qa: remove vestiges of ceph-deploy 2026-04-14 09:03:58 -04:00
config qa: Add rgw singleton test to crimson 2026-04-06 07:48:46 +05:30
crontab qa/crontab/teuthology-cronjobs: Use debug flavor 2026-01-22 14:56:45 +02:00
debug
distros qa/distros: use consistent naming 2026-05-27 08:45:53 -04:00
erasure-code qa: Add cauchy and 16K chunk size profiles 2025-08-15 09:53:42 +01:00
libceph
machine_types
mds
mgr_ttl_cache
mon/bootstrap
mon_election
msgr
nightlies
objectstore qa: remove vestiges of ceph-deploy 2026-04-14 09:03:58 -04:00
objectstore_cephfs
objectstore_crimson qa: exclude crimson from random-objectstore 2025-12-04 14:07:08 +05:30
objectstore_debug qa: Reduce number of osd threads when using compression 2025-11-27 07:45:07 +00:00
overrides qa: ignore expected OSD_ROOT_DOWN 2026-05-15 13:20:50 -04:00
packages qa: install ceph-osd-classic and ceph-osd-crimson 2025-11-12 18:11:49 +00:00
rbd qa: krbd_blkroset.t: eliminate a race in the open_count test 2026-01-22 16:41:14 +01:00
releases qa/workunits/cephtool/test: update to umbrella 2026-03-25 16:53:04 +00:00
rgw
rgw_bucket_sharding
rgw_frontend
rgw_pool_type
standalone Merge pull request #67715 from NitzanMordhai/wip-nitzan-is_pg_clean-hang-after-teardown 2026-05-11 13:15:14 -05:00
suites qa/distros: use consistent naming 2026-05-27 08:45:53 -04:00
tasks qa/tasks/cbt: construct venv just for cbt 2026-05-27 08:45:53 -04:00
timezone
workunits Merge pull request #67551 from Ericmzhang/wip-improve-pg-autoscale 2026-05-26 18:04:43 -04:00
.gitignore
.qa
asan.supp qa/{asan,lsan}.supp: suppress Python module and libstdc++ false positives 2025-09-06 08:52:02 +08:00
CMakeLists.txt
find-used-ports.sh
loopall.sh
lsan.supp qa/lsan.supp: suppress CPython 3.10 interpreter shutdown leaks 2026-04-25 21:44:44 +08:00
Makefile
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 various: update pip+https URLs to new form. 2025-09-08 17:55:40 -07:00
valgrind.supp Merge pull request #66432 from stzuraski898/unittests-mgr 2026-04-23 09:52:23 -05:00

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

Note: The performance suites clone CBT from master here: https://github.com/ceph/cbt.git
CBT will not support cosbench beyond release tag v0.3, therefore no qa suite should use cosbench.
cosbench support has been removed from qa/tasks/cbt.py.