]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
qa/tasks/cbt: construct venv just for cbt 67683/head
authorPatrick Donnelly <pdonnell@ibm.com>
Wed, 27 May 2026 03:05:22 +0000 (23:05 -0400)
committerPatrick Donnelly <pdonnell@ibm.com>
Wed, 27 May 2026 12:45:53 +0000 (08:45 -0400)
commit614993a066f7e42d02fc18671bb136b2d192035f
tree6a6c88e7fa5853216c1117c4261913b3a00f2421
parente9ef70baca75aab426459e2136a98b92fff47595
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>
qa/tasks/cbt.py