Add beanstalk as a possible queue backend for Teuthology Jobs along with Paddles
With the use of the --queue-backend argument the user can specify which backend(paddles/beanstalk) they would like to use for maintaining the teuthology Jobs queue.
In order to avoid overlapping Job IDs, when a job is being scheduled in beanstalk it is also written to paddles which returns a unique ID.
This is the ID teuthology will treat as the Job ID throughout the run of the job.
To differentiate between the 2 queue backends, the teuthology-queue command has been split into teuthology-paddles-queue command and teuthology-beanstalk-queue command.
Add retry for paddles calls and modify pause queue command
1. Add retry loop for the paddles calls.
2. Add run name as a parameter for updating priority of jobs in paddles.
3. Modify the pause queue command to run on server side with an optional pause duration parameter.
The following changes support the removal of Beanstalk from Teuthology.
In place of Beanstalk, we will now be using Paddles for queue management in Teuthology.
This PR has the corresponding changes for the paddles PR: https://github.com/ceph/paddles/pull/94/files.
The changes include:
1. Removing all beanstalk related code
2. Teuthology scheduler and dispatcher using Paddles queue for scheduling and dispatching jobs
3. Adding support for Paddles queue management
4. Additional functionality of being able to change the priority of Teuthology jobs in the queued state in the teuthology-queue command
Patrick Donnelly [Tue, 24 May 2022 16:14:04 +0000 (12:14 -0400)]
Merge PR #1704 into master
* refs/pull/1704/head:
teuthology/suite/test: test nested subsets
teuthology: add option to disable nested subsets
teuthology/suite: create nested matrix subsets
teuthology/suite: patch builtin open method
teuthology/test: use correct exception type
teuthology/suite/test: make sure patchers are cleaned up on exception
teuthology/suite/test: clarify variable name
Patrick Donnelly [Fri, 14 Jan 2022 20:25:14 +0000 (15:25 -0500)]
teuthology/suite: create nested matrix subsets
The general idea is to allow the `%` convolution operator to also subset
the resulting matrix. This is done by specifying a number of divisions
for the subset in the `%` file. Such as:
dir/%:
8
This commit maps a matrix index range of `[0, Subset.size())` to the
matrix it is taking a subset of, `[0, Matrix.size())`. To get full
coverage, a random number is used to specify "which" subset to use.
Contrast with the `--subset` argument to `teuthology-suite` which lets
you specify which subset.
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
If config.teuthology_path is set, we don't fetch teuthology at runtime.
This can lead to confusing situations if --teuthology-branch is passed
to teuthology-suite, as the job config will claim a branch is used when
it is not. We can avoid this problem by refusing to schedule if there
is a mismatch.
With this change, we can avoid rerunning bootstrap on build if
requirements.txt hasn't changed. Build times after non-requirements
changes go from 3-5min to ~2s.
The docker-compose dev setup was the inspiration for this feature; it
allows us to split the installation of dependencies and the project
itself into two phases. This in turn allows us to avoid rerunning
bootstrap if requirements.txt didn't change.
* move the dependencies from options.install_requires to
options.extras_require if those dependencies are only used by tests.
as per
https://packaging.python.org/en/latest/discussions/install-requires-vs-requirements/#id5
> install_requires is a setuptools setup.py keyword that should be
> used to specify what a project minimally needs to run correctly.
* remove the duplicated dependencies from options.extras_require
if they are also listed in options.install_requires.
* update requirements.txt using
"pip-compile --extra=test pyproject.toml", so requirements.txt
can include the dependencies required by tests.
Zack Cerza [Thu, 31 Mar 2022 19:32:14 +0000 (15:32 -0400)]
Modernized versioning
Using setuptools_scm; we can automatically generate version numbers
instead of using this odd combination of hardcoding and running git
commands. This method is faster as well.
While doing packaging work, I noticed that teuthology began claiming it
couldn't find the 'tests' task. After some slightly painful debugging I
realized the issue was that the task was trying to import pytest, which
wasn't installed. The ModuleNotFoundError that was being raised was
being confused with the exception that would be raised if the task
couldn't be found at all. With this change, we see the root cause.
Instead of scheduling the teuthology:no-ceph suite and then exiting
when it finishes, schedule nothing and don't exit automatically. This
allows running whatever - and however many - tests are desired.
The docker-compose dev setup was the inspiration for this feature; it
allows us to split the installation of dependencies and the project
itself into two phases. This in turn allows us to avoid rerunning
bootstrap if requirements.txt didn't change.
Zack Cerza [Thu, 31 Mar 2022 19:32:14 +0000 (15:32 -0400)]
Modernized versioning
Using setuptools_scm; we can automatically generate version numbers
instead of using this odd combination of hardcoding and running git
commands. This method is faster as well.
This effectively hardcoded the path to the virtualenv we'll use, which
aside from being bad generally, also prevented us from supporting
absolute-pathed virtualenvs.
While doing packaging work, I noticed that teuthology began claiming it
couldn't find the 'tests' task. After some slightly painful debugging I
realized the issue was that the task was trying to import pytest, which
wasn't installed. The ModuleNotFoundError that was being raised was
being confused with the exception that would be raised if the task
couldn't be found at all. With this change, we see the root cause.