]> git.apps.os.sepia.ceph.com Git - teuthology.git/log
teuthology.git
6 months agoorchestra/opsys: add tumbleweed version to the distro version map 2027/head
Kyrylo Shatskyy [Wed, 26 Feb 2025 18:42:05 +0000 (19:42 +0100)]
orchestra/opsys: add tumbleweed version to the distro version map

openSUSE Tumbleweed is a rolling release, so it has fixed version number
and changable version id is represented by a date of snapshot,
example of vm image:

openSUSE-Tumbleweed-Minimal-VM.x86_64-1.0.0-Cloud-Snapshot20250224.qcow2

In comparison, openSUSE Leap has regular release, incremental version, for example:
15.0, 15.1, ..., 15.6, etc., and recently introduced 16.0 alpha.

Because there is no sense to stick to the date, it is changing almost daily,
it is suggested to fix Tumbleweed version to 1.0 to distinguish from Leap.
As a side effect, once Teuthology locks a node with imaged Tumbleweed
it updates os version correctly to date of release in paddles, and
pulpito display it interface correspondingly as the date.

Signed-off-by: Kyrylo Shatskyy <kyrylo.shatskyy@clyso.com>
6 months agoorchestra/opsys: add 'alma' and 'rocky' to default os map
Kyr Shatskyy [Wed, 19 Feb 2025 22:50:39 +0000 (23:50 +0100)]
orchestra/opsys: add 'alma' and 'rocky' to default os map

Signed-off-by: Kyr Shatskyy <kyrylo.shatskyy@clyso.com>
6 months agoorchestra/opsys: add almalinux versions
Kyr Shatskyy [Tue, 11 Feb 2025 14:47:56 +0000 (15:47 +0100)]
orchestra/opsys: add almalinux versions

Signed-off-by: Kyr Shatskyy <kyrylo.shatskyy@clyso.com>
6 months agoorchestra/opsys: add 'rocky' to DISTRO_CODENAME_MAP
Kyr Shatskyy [Wed, 5 Feb 2025 17:28:32 +0000 (18:28 +0100)]
orchestra/opsys: add 'rocky' to DISTRO_CODENAME_MAP

Signed-off-by: Kyr Shatskyy <kyrylo.shatskyy@clyso.com>
7 months agoMerge pull request #2025 from ceph/nuke-unlock
Zack Cerza [Thu, 13 Feb 2025 21:57:30 +0000 (14:57 -0700)]
Merge pull request #2025 from ceph/nuke-unlock

supervisor: Unlock nodes after reimage failure

7 months agonode_active_job: Improve http error handling 2025/head
Zack Cerza [Mon, 3 Feb 2025 21:17:32 +0000 (14:17 -0700)]
node_active_job: Improve http error handling

Signed-off-by: Zack Cerza <zack1@ibm.com>
7 months agonode_cleanup: Log owner when query fails
Zack Cerza [Mon, 3 Feb 2025 21:12:10 +0000 (14:12 -0700)]
node_cleanup: Log owner when query fails

Signed-off-by: Zack Cerza <zack1@ibm.com>
7 months agosupervisor: Unlock nodes after reimage failure
Zack Cerza [Mon, 3 Feb 2025 21:06:57 +0000 (14:06 -0700)]
supervisor: Unlock nodes after reimage failure

Signed-off-by: Zack Cerza <zack1@ibm.com>
7 months agonode_cleanup: Log a summary of what was done
Zack Cerza [Mon, 3 Feb 2025 21:04:11 +0000 (14:04 -0700)]
node_cleanup: Log a summary of what was done

Signed-off-by: Zack Cerza <zack1@ibm.com>
7 months agoMerge pull request #2024 from kshtsk/wip-64452
Zack Cerza [Thu, 30 Jan 2025 22:28:35 +0000 (15:28 -0700)]
Merge pull request #2024 from kshtsk/wip-64452

7 months agoMerge pull request #1984 from kshtsk/wip-laptop-dispatcher
Zack Cerza [Thu, 30 Jan 2025 22:27:13 +0000 (15:27 -0700)]
Merge pull request #1984 from kshtsk/wip-laptop-dispatcher

7 months agoorchestra/run: better handle weird args 2024/head
Kyr Shatskyy [Thu, 30 Jan 2025 11:18:24 +0000 (12:18 +0100)]
orchestra/run: better handle weird args

If one of the command args in remote.run is None then there is exception
occurs while trying to qoute argument list:

   TypeError: expected string or bytes-like object

This fix addresses the issue and gives user better idea what is
happening, and how to fix the error.

Fixes: https://tracker.ceph.com/issues/64452
Signed-off-by: Kyr Shatskyy <kyrylo.shatskyy@clyso.com>
7 months agoMerge pull request #2022 from kshtsk/wip-stuck-on-vm-create-fail
kyr [Thu, 30 Jan 2025 12:42:01 +0000 (13:42 +0100)]
Merge pull request #2022 from kshtsk/wip-stuck-on-vm-create-fail

teuthology lock is stuck if vm create failed

7 months agodocs/laptop: update localhost setup instructions 1984/head
Kyr Shatskyy [Mon, 29 Jul 2024 11:47:32 +0000 (13:47 +0200)]
docs/laptop: update localhost setup instructions

Signed-off-by: Kyr Shatskyy <kyrylo.shatskyy@clyso.com>
7 months agoprovision/downburst: log multiline stderr on error 2022/head
Kyr Shatskyy [Fri, 10 Jan 2025 14:15:21 +0000 (15:15 +0100)]
provision/downburst: log multiline stderr on error

For better logs readability just log downburst's stderr
line-by-line.

Signed-off-by: Kyr Shatskyy <kyrylo.shatskyy@clyso.com>
7 months agolock/ops: don't misguide user while waiting for vms up
Kyr Shatskyy [Thu, 16 Jan 2025 17:35:52 +0000 (18:35 +0100)]
lock/ops: don't misguide user while waiting for vms up

The message "virtual machine is still unavailable" is mistakenly
shown to user, when vms are actually available.

Signed-off-by: Kyr Shatskyy <kyrylo.shatskyy@clyso.com>
7 months agolock/cli: don't update inventory if failed to create a vm
Kyr Shatskyy [Fri, 10 Jan 2025 14:09:24 +0000 (15:09 +0100)]
lock/cli: don't update inventory if failed to create a vm

If we were not able to create a vm we don't need to update machine's
inventory, because there is going to be an ssh connection established
to the host and teuthology gets stuck infinitely trying to connect to
the machine which does not exist.

Signed-off-by: Kyr Shatskyy <kyrylo.shatskyy@clyso.com>
7 months agoMerge pull request #2014 from ceph/wip-nitzan-add-timout-param-stop-type
Zack Cerza [Mon, 27 Jan 2025 18:52:35 +0000 (11:52 -0700)]
Merge pull request #2014 from ceph/wip-nitzan-add-timout-param-stop-type

7 months agoMerge pull request #2021 from kshtsk/wip-job-archive-in-supervisor
Zack Cerza [Thu, 23 Jan 2025 19:38:46 +0000 (12:38 -0700)]
Merge pull request #2021 from kshtsk/wip-job-archive-in-supervisor

8 months agodispatcher/supervisor: use job config only to unlock targets 2021/head
Kyr Shatskyy [Sat, 18 Jan 2025 00:24:51 +0000 (01:24 +0100)]
dispatcher/supervisor: use job config only to unlock targets

No need to use serializer, because everything needed to unlock
machines already present in job config.

Signed-off-by: Kyr Shatskyy <kyrylo.shatskyy@clyso.com>
8 months agoMerge pull request #2019 from ceph/dependabot/pip/jinja2-3.1.5
kyr [Fri, 10 Jan 2025 23:13:24 +0000 (00:13 +0100)]
Merge pull request #2019 from ceph/dependabot/pip/jinja2-3.1.5

build(deps): bump jinja2 from 3.1.4 to 3.1.5

8 months agoMerge pull request #2017 from kshtsk/wip-drop-future-print
kyr [Fri, 10 Jan 2025 09:30:38 +0000 (10:30 +0100)]
Merge pull request #2017 from kshtsk/wip-drop-future-print

teuthology: drop __future__ import for print

8 months agobuild(deps): bump jinja2 from 3.1.4 to 3.1.5 2019/head
dependabot[bot] [Wed, 8 Jan 2025 20:50:52 +0000 (20:50 +0000)]
build(deps): bump jinja2 from 3.1.4 to 3.1.5

Bumps [jinja2](https://github.com/pallets/jinja) from 3.1.4 to 3.1.5.
- [Release notes](https://github.com/pallets/jinja/releases)
- [Changelog](https://github.com/pallets/jinja/blob/main/CHANGES.rst)
- [Commits](https://github.com/pallets/jinja/compare/3.1.4...3.1.5)

---
updated-dependencies:
- dependency-name: jinja2
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
8 months agoMerge pull request #2010 from chrisphoffman/wip-dd-syncseek
kyr [Tue, 7 Jan 2025 13:22:21 +0000 (14:22 +0100)]
Merge pull request #2010 from chrisphoffman/wip-dd-syncseek

teuthology: Add support for seek and sync in write_file

8 months agoMerge pull request #1998 from phlogistonjohn/jjm-config-alt-path
kyr [Tue, 7 Jan 2025 13:22:00 +0000 (14:22 +0100)]
Merge pull request #1998 from phlogistonjohn/jjm-config-alt-path

config: allow reading teuthology config from env var location

8 months agoMerge pull request #2018 from ceph/devcontainer-no-pat
Zack Cerza [Mon, 6 Jan 2025 23:11:43 +0000 (16:11 -0700)]
Merge pull request #2018 from ceph/devcontainer-no-pat

8 months agocontainers/teuthology-dev: Remove access token 2018/head
Zack Cerza [Mon, 6 Jan 2025 22:33:08 +0000 (15:33 -0700)]
containers/teuthology-dev: Remove access token

This container is built and pushed via GitHub Actions. GHA likes to provision a
personal access token for each job that gives tightly-scoped access to the git
repository to the job. When we build our container, we end up including
`.git/config`, which contains the token. Later, in ceph-dev-stack's CI, an
`ls-remote` is run against ceph.git, which ends up causing git to prompt for
credentials even though the repo is public. Removing the token should allow
reading all the relevant repos from the built container image.

Signed-off-by: Zack Cerza <zack@redhat.com>
8 months agoteuthology: Add tests for seek and sync in write_file 2010/head
Christopher Hoffman [Mon, 6 Jan 2025 14:44:49 +0000 (14:44 +0000)]
teuthology: Add tests for seek and sync in write_file

Signed-off-by: Christopher Hoffman <choffman@redhat.com>
8 months agoteuthology: Add support for seek and sync in write_file
Christopher Hoffman [Fri, 25 Oct 2024 15:50:59 +0000 (15:50 +0000)]
teuthology: Add support for seek and sync in write_file

Signed-off-by: Christopher Hoffman <choffman@redhat.com>
8 months agoconfig: allow reading teuthology config from env var location 1998/head
John Mulligan [Fri, 9 Aug 2024 14:15:15 +0000 (10:15 -0400)]
config: allow reading teuthology config from env var location

Allow changing the default "user" location of the teuthology
configuration yaml using the (optional) TEUTHOLOGY_CONFIG environment
variable. This change aids my effort to run a customized local
teuthology environment.

Signed-off-by: John Mulligan <jmulligan@redhat.com>
8 months agoMerge pull request #2015 from thuvh/lab_setup_python3
kyr [Wed, 25 Dec 2024 20:11:21 +0000 (21:11 +0100)]
Merge pull request #2015 from thuvh/lab_setup_python3

doc: use python3 cause of deprecating of python on ubuntu

8 months agodoc: use python3 cause of deprecating of python on ubuntu 2015/head
Hoai-Thu Vuong [Fri, 13 Dec 2024 04:06:06 +0000 (11:06 +0700)]
doc: use python3 cause of deprecating of python on ubuntu

Signed-off-by: Hoai-Thu Vuong <thuvh87@gmail.com>
9 months agoMerge pull request #2016 from ceph/dependabot/pip/configobj-5.0.9
kyr [Fri, 20 Dec 2024 22:57:37 +0000 (23:57 +0100)]
Merge pull request #2016 from ceph/dependabot/pip/configobj-5.0.9

build(deps): bump configobj from 5.0.8 to 5.0.9

9 months agoteuthology: drop __future__ import for print 2017/head
Kyrylo Shatskyy [Fri, 20 Dec 2024 00:00:07 +0000 (01:00 +0100)]
teuthology: drop __future__ import for print

We don't need to support backward compatibility with python 2.

Signed-off-by: Kyrylo Shatskyy <kyrylo.shatskyy@gmail.com>
9 months agobuild(deps): bump configobj from 5.0.8 to 5.0.9 2016/head
dependabot[bot] [Mon, 16 Dec 2024 22:51:42 +0000 (22:51 +0000)]
build(deps): bump configobj from 5.0.8 to 5.0.9

Bumps [configobj](https://github.com/DiffSK/configobj) from 5.0.8 to 5.0.9.
- [Release notes](https://github.com/DiffSK/configobj/releases)
- [Changelog](https://github.com/DiffSK/configobj/blob/release/CHANGES.rst)
- [Commits](https://github.com/DiffSK/configobj/compare/v5.0.8...v5.0.9)

---
updated-dependencies:
- dependency-name: configobj
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
9 months agoteuthology/misc: Add timeout parameter to stop_daemons_of_type for better flexibility 2014/head
Nitzan Mordechai [Tue, 10 Dec 2024 06:12:00 +0000 (06:12 +0000)]
teuthology/misc: Add timeout parameter to stop_daemons_of_type for better flexibility

Updated stop_daemons_of_type to accept a timeout parameter,
allowing dynamic control over the timeout value passed to the
stop function of each daemon.

Signed-off-by: Nitzan Mordechai <nmordech@redhat.com>
9 months agoMerge pull request #2013 from ceph/dependabot/pip/ansible-core-2.17.7
kyr [Wed, 4 Dec 2024 11:05:23 +0000 (12:05 +0100)]
Merge pull request #2013 from ceph/dependabot/pip/ansible-core-2.17.7

build(deps): bump ansible-core from 2.16.6 to 2.17.7

9 months agobuild(deps): bump ansible-core from 2.16.6 to 2.17.7 2013/head
dependabot[bot] [Tue, 3 Dec 2024 22:03:51 +0000 (22:03 +0000)]
build(deps): bump ansible-core from 2.16.6 to 2.17.7

Bumps [ansible-core](https://github.com/ansible/ansible) from 2.16.6 to 2.17.7.
- [Release notes](https://github.com/ansible/ansible/releases)
- [Commits](https://github.com/ansible/ansible/compare/v2.16.6...v2.17.7)

---
updated-dependencies:
- dependency-name: ansible-core
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
10 months agoMerge pull request #2009 from ceph/fog-image
Zack Cerza [Tue, 19 Nov 2024 17:10:53 +0000 (10:10 -0700)]
Merge pull request #2009 from ceph/fog-image

10 months agoMerge pull request #2008 from batrick/fragment-merge-base-config
Zack Cerza [Fri, 25 Oct 2024 16:20:21 +0000 (10:20 -0600)]
Merge pull request #2008 from batrick/fragment-merge-base-config

10 months agoprovision.fog: Be more informative re: API errors 2009/head
Zack Cerza [Thu, 24 Oct 2024 17:54:29 +0000 (11:54 -0600)]
provision.fog: Be more informative re: API errors

Signed-off-by: Zack Cerza <zack@redhat.com>
10 months agoteuthology/tasks/kernel: default branch should be "distro" fragment-merge-base-config 2008/head
Patrick Donnelly [Sat, 19 Oct 2024 17:39:38 +0000 (13:39 -0400)]
teuthology/tasks/kernel: default branch should be "distro"

Generally, we don't want to install any kernel by default. There also is no
"main" branch for the ceph-client.git project.

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
10 months agoteuthology/suite: merge base_config with other fragments
Patrick Donnelly [Fri, 18 Oct 2024 12:44:13 +0000 (08:44 -0400)]
teuthology/suite: merge base_config with other fragments

Presently the code tries to merge the base_config when the worker starts
running. There's no need to construct it this way and it prevents sharing the
"defaults" with the fragment merging infrastructure. It also prevents
overriding defaults like:

    kernel
        branch: wip-pdonnell-i66704
        client:
            branch: wip-pdonnell-i66704
            flavor: default
            kdb: 1
            sha1: 745cacd8f31e50d7f3b6039bbd8c9a8dfc07bf03
        flavor: default
        kdb: 1
        sha1: 745cacd8f31e50d7f3b6039bbd8c9a8dfc07bf03

A YAML fragment can set kernel.client but it cannot delete the defaults for
kernel.(branch|flavor|kdb|sha1) because there's no way to remove YAML elements
via a deep merge.

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
10 months agoMerge pull request #2002 from ceph/node-cleanup-false-pos
Zack Cerza [Mon, 21 Oct 2024 23:05:25 +0000 (17:05 -0600)]
Merge pull request #2002 from ceph/node-cleanup-false-pos

11 months agoteuthology/suite: set the kernel branch in the kernel config
Patrick Donnelly [Thu, 17 Oct 2024 19:59:07 +0000 (15:59 -0400)]
teuthology/suite: set the kernel branch in the kernel config

For inspection by scripts.

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
11 months agoteuthology/suite: print base config before config merge
Patrick Donnelly [Thu, 17 Oct 2024 19:58:30 +0000 (15:58 -0400)]
teuthology/suite: print base config before config merge

So it's easier to see its value before any configs are generated.

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
11 months agoMerge pull request #2004 from ceph/suite-user
Zack Cerza [Mon, 7 Oct 2024 18:23:00 +0000 (12:23 -0600)]
Merge pull request #2004 from ceph/suite-user

suite: use owner value for user name

11 months agoMerge pull request #2007 from ceph/wip-68285
Zack Cerza [Mon, 7 Oct 2024 18:22:31 +0000 (12:22 -0600)]
Merge pull request #2007 from ceph/wip-68285

run: Fix reference to ctx for interactive jobs

11 months agoMerge pull request #2006 from joscollin/wip-B68037-drop-packages_2-1
Zack Cerza [Mon, 7 Oct 2024 17:21:35 +0000 (11:21 -0600)]
Merge pull request #2006 from joscollin/wip-B68037-drop-packages_2-1

teuthology/task: drop packages that are not built

11 months agorun: Fix reference to ctx for interactive jobs 2007/head
Zack Cerza [Wed, 2 Oct 2024 16:45:34 +0000 (10:45 -0600)]
run: Fix reference to ctx for interactive jobs

Fixes: https://tracker.ceph.com/issues/68285
Signed-off-by: Zack Cerza <zack@redhat.com>
11 months agotest_run: Add test_main_interactive
Zack Cerza [Wed, 2 Oct 2024 16:44:59 +0000 (10:44 -0600)]
test_run: Add test_main_interactive

Signed-off-by: Zack Cerza <zack@redhat.com>
11 months agoteuthology/task: drop packages that are not built 2006/head
Jos Collin [Tue, 1 Oct 2024 03:24:07 +0000 (08:54 +0530)]
teuthology/task: drop packages that are not built

Fixes the error `Unable to find a match: python3-ceph`.

Fixes: https://tracker.ceph.com/issues/68037
Signed-off-by: Jos Collin <jcollin@redhat.com>
11 months agoMerge pull request #2005 from ceph/wip-B68037-drop-packages
Zack Cerza [Wed, 25 Sep 2024 15:55:47 +0000 (09:55 -0600)]
Merge pull request #2005 from ceph/wip-B68037-drop-packages

teuthology/task: drop packages that are not built

11 months agoMerge pull request #1936 from amathuria/wip-amat-fix-suite-sha1
Zack Cerza [Tue, 24 Sep 2024 17:44:01 +0000 (11:44 -0600)]
Merge pull request #1936 from amathuria/wip-amat-fix-suite-sha1

suite/run: Add a option to specify suite sha1

11 months agoteuthology/task: drop packages that are not built 2005/head
Jos Collin [Tue, 24 Sep 2024 11:02:23 +0000 (16:32 +0530)]
teuthology/task: drop packages that are not built

FIxes: https://tracker.ceph.com/issues/68037
Signed-off-by: Jos Collin <jcollin@redhat.com>
11 months agosuite: use owner value for user name 2004/head
Zack Cerza [Tue, 13 Aug 2024 20:29:45 +0000 (14:29 -0600)]
suite: use owner value for user name

Signed-off-by: Zack Cerza <zack@redhat.com>
12 months agolock: Avoid querying paddles for non-jobs 2002/head
Zack Cerza [Thu, 29 Aug 2024 23:03:20 +0000 (17:03 -0600)]
lock: Avoid querying paddles for non-jobs

When we encounter a node that's locked with a description that doesn't look
like it points to a job, avoid the inevitable 404 we'd get from paddles. Without
this, the cleanup process gets short-circuited.

Signed-off-by: Zack Cerza <zack@redhat.com>
12 months agoMerge pull request #2001 from ceph/bootstrap
Dan Mick [Wed, 28 Aug 2024 22:31:44 +0000 (15:31 -0700)]
Merge pull request #2001 from ceph/bootstrap

bootstrap: Simplify dependency checking/install

12 months agobootstrap: Simplify dependency checking/install 2001/head
Zack Cerza [Wed, 28 Aug 2024 21:42:29 +0000 (15:42 -0600)]
bootstrap: Simplify dependency checking/install

Signed-off-by: Zack Cerza <zack@redhat.com>
12 months agoMerge pull request #1997 from kshtsk/wip-exclude-tests-from-wheel 1.2.1
Zack Cerza [Mon, 26 Aug 2024 22:55:58 +0000 (16:55 -0600)]
Merge pull request #1997 from kshtsk/wip-exclude-tests-from-wheel

setup.cfg: exclude tests from wheel package

13 months agoMerge pull request #2000 from ceph/user
Dan Mick [Tue, 20 Aug 2024 23:51:36 +0000 (16:51 -0700)]
Merge pull request #2000 from ceph/user

orchestra: Respect username if set in ssh config

13 months agoorchestra: Respect username if set in ssh config 2000/head
Zack Cerza [Tue, 20 Aug 2024 22:24:33 +0000 (16:24 -0600)]
orchestra: Respect username if set in ssh config

Signed-off-by: Zack Cerza <zack@redhat.com>
13 months agosetup.cfg: exclude tests from packaging 1997/head
Kyr Shatskyy [Sun, 4 Aug 2024 13:12:42 +0000 (15:12 +0200)]
setup.cfg: exclude tests from packaging

Signed-off-by: Kyr Shatskyy <kyrylo.shatskyy@clyso.com>
13 months agoMerge pull request #1995 from kshtsk/wip-fix-1816 1.2.0
kyr [Wed, 14 Aug 2024 22:53:30 +0000 (00:53 +0200)]
Merge pull request #1995 from kshtsk/wip-fix-1816

contextutil.safe_while does not sleep between tries if needed to loop infinitely

13 months agoMerge pull request #1999 from ljflores/wip-revert-tracker-66742
Laura Flores [Wed, 14 Aug 2024 20:07:56 +0000 (15:07 -0500)]
Merge pull request #1999 from ljflores/wip-revert-tracker-66742

Revert "orchestra/daemon/cephadmunit.py: fix method kill_cmd()"

13 months agoRevert "orchestra/daemon/cephadmunit.py: fix method kill_cmd()" 1999/head
Laura Flores [Wed, 14 Aug 2024 19:37:06 +0000 (14:37 -0500)]
Revert "orchestra/daemon/cephadmunit.py: fix method kill_cmd()"

This reverts commit 2c6d64a222b4d38d4782ed407e045a86df0a6524.

Related tracker: https://tracker.ceph.com/issues/66883

13 months agoMerge pull request #1983 from ceph/expiry
Zack Cerza [Thu, 8 Aug 2024 18:59:24 +0000 (12:59 -0600)]
Merge pull request #1983 from ceph/expiry

Add job expiration dates

13 months agoMerge pull request #1990 from kshtsk/wip-downburst-fixes
Zack Cerza [Thu, 8 Aug 2024 16:22:10 +0000 (10:22 -0600)]
Merge pull request #1990 from kshtsk/wip-downburst-fixes

bunch of downburst fixes

13 months agosupervisor: Check for job expiration 1983/head
Zack Cerza [Thu, 1 Aug 2024 18:16:04 +0000 (12:16 -0600)]
supervisor: Check for job expiration

This commit isn't strictly necessary for the feature's implementation, but will
allow testing the feature on the production teuthology cluster before merging.

Signed-off-by: Zack Cerza <zack@redhat.com>
13 months agoAdd job expiration dates
Zack Cerza [Mon, 1 Jul 2024 23:00:46 +0000 (17:00 -0600)]
Add job expiration dates

This feature has two parts:
* Specifying expiration dates when scheduling test runs
* A global maximum age

Expiration dates are provided by passing `--expire` to `teuthology-suite` with
a relative value like `1d` (one day), `1w` (one week), or an absolute value like
`1999-12-31_23:59:59`.

A new configuration item, `max_job_age`, is specified in seconds. This defaults
to two weeks.

When the dispatcher checks the queue for the next job to run, it will first
compare the job's `timestamp` value - which reflects the time the job was
scheduled. If more than `max_job_age` seconds have passed, the job is skipped
and marked dead. It next checks for an `expire` value; if that value is in the
past, the job is skipped and marked dead. Otherwise, it will be run as usual.

Signed-off-by: Zack Cerza <zack@redhat.com>
13 months agosuite: Ensure teuthology config is consistent between tests
Zack Cerza [Thu, 1 Aug 2024 19:50:51 +0000 (13:50 -0600)]
suite: Ensure teuthology config is consistent between tests

test_init.py was making modifications to the config object that persisted
between tests. When I fixed that, initially some tests in test_run_.py started
failing because of settings in my local ~/.teuthology.yaml. This change causes
all of the tests in suite.test to use default config values.

Signed-off-by: Zack Cerza <zack@redhat.com>
13 months agotest_misc: Speed up and fix two test bugs
Zack Cerza [Thu, 1 Aug 2024 00:45:57 +0000 (18:45 -0600)]
test_misc: Speed up and fix two test bugs

One test had a missing assert; another had a comparison that would never fire
because of an expected exception being raised during the call.

Signed-off-by: Zack Cerza <zack@redhat.com>
13 months agoteuthology-dev: Allow passing more suite args
Zack Cerza [Tue, 9 Jul 2024 19:53:37 +0000 (13:53 -0600)]
teuthology-dev: Allow passing more suite args

Signed-off-by: Zack Cerza <zack@redhat.com>
13 months agoutil.time: Add parse_timestamp
Zack Cerza [Wed, 31 Jul 2024 20:11:52 +0000 (14:11 -0600)]
util.time: Add parse_timestamp

And move the format string to the time module.

Signed-off-by: Zack Cerza <zack@redhat.com>
13 months agoutil.time: Add new submodule with parse_offset()
Zack Cerza [Mon, 8 Jul 2024 22:24:10 +0000 (16:24 -0600)]
util.time: Add new submodule with parse_offset()

Signed-off-by: Zack Cerza <zack@redhat.com>
13 months agodocs/siteconfig.rst: Update references to worker
Zack Cerza [Tue, 23 Jul 2024 18:26:13 +0000 (12:26 -0600)]
docs/siteconfig.rst: Update references to worker

Signed-off-by: Zack Cerza <zack@redhat.com>
13 months agoMerge pull request #1996 from kshtsk/wip-shlex-instead-of-pipes
Zack Cerza [Wed, 7 Aug 2024 21:08:28 +0000 (15:08 -0600)]
Merge pull request #1996 from kshtsk/wip-shlex-instead-of-pipes

orcherstra/run: don't use pipes, but shlex

13 months agoorcherstra/run: don't use pipes, but shlex 1996/head
Kyr Shatskyy [Sat, 3 Aug 2024 15:08:48 +0000 (17:08 +0200)]
orcherstra/run: don't use pipes, but shlex

Finally get rid of deprecation warning for 'pipes':

    teuthology/orchestra/run.py:12
      /teuthology/teuthology/orchestra/run.py:12: DeprecationWarning: 'pipes' is deprecated and slated for removal in Python 3.13
        import pipes

Signed-off-by: Kyr Shatskyy <kyrylo.shatskyy@clyso.com>
13 months agomisc: allow _ssh_keyscan return None again 1990/head
Kyr Shatskyy [Wed, 31 Jul 2024 21:48:09 +0000 (23:48 +0200)]
misc: allow _ssh_keyscan return None again

A host may not have any keys, so _ssh_keyscan should return None,
instead of failing with error:

    IndexError: list index out of range

Fixes: dbd55e37563ce0fde01e1bfa19ca2fd2c03f0194
Signed-off-by: Kyr Shatskyy <kyrylo.shatskyy@clyso.com>
13 months agoprovision/downburst: add PATH to environment
Kyr Shatskyy [Thu, 1 Aug 2024 10:01:10 +0000 (12:01 +0200)]
provision/downburst: add PATH to environment

Need to passthrough the PATH to downburst environment,
otherwise on some system like macos where mkisofs installed
via homebrew it cannot be found.

Signed-off-by: Kyr Shatskyy <kyrylo.shatskyy@clyso.com>
13 months agoprovision/downburst: ignore "username@" prefix in hostname
Kyr Shatskyy [Fri, 2 Aug 2024 17:32:33 +0000 (19:32 +0200)]
provision/downburst: ignore "username@" prefix in hostname

If downburst gets hostname as an argument which does not have
a username@ prefix (does not include @-symbol) there is an
index out of range error will occur, which we, obviously,
don't want and wish to allow hostnames don't use login names.

Signed-off-by: Kyr Shatskyy <kyrylo.shatskyy@clyso.com>
13 months agoMerge pull request #1989 from kshtsk/wip-stop-node
Zack Cerza [Wed, 7 Aug 2024 19:48:17 +0000 (13:48 -0600)]
Merge pull request #1989 from kshtsk/wip-stop-node

lock/ops: try to stop_node before unlock

13 months agoMerge pull request #1991 from kshtsk/wip-arbitrary-bootstrap-venv
Zack Cerza [Wed, 7 Aug 2024 19:06:16 +0000 (13:06 -0600)]
Merge pull request #1991 from kshtsk/wip-arbitrary-bootstrap-venv

bootstrap: fix VENV variable utilization

13 months agoMerge pull request #1992 from kshtsk/wip-deprecation-warnings
Zack Cerza [Wed, 7 Aug 2024 19:05:28 +0000 (13:05 -0600)]
Merge pull request #1992 from kshtsk/wip-deprecation-warnings

get rid of deprecation warnings

13 months agoMerge pull request #1993 from kshtsk/wip-allow-apple-git
Zack Cerza [Wed, 7 Aug 2024 19:03:03 +0000 (13:03 -0600)]
Merge pull request #1993 from kshtsk/wip-allow-apple-git

test/test_repo_utils: correctly parse system git version

13 months agolock/query: make use of tries for list_locks() 1995/head
Kyr Shatskyy [Tue, 6 Aug 2024 22:59:53 +0000 (00:59 +0200)]
lock/query: make use of tries for list_locks()

The list_locks has been updated with new argument 'tries' in PR#1816,
but by unfortunate mistake hasn't been used yet.

Fixes: 55886eac960cfc6f311fb4c9812311c420761793
Signed-off-by: Kyr Shatskyy <kyrylo.shatskyy@clyso.com>
13 months agosuite/util: list_lock() once for get_arch()
Kyr Shatskyy [Tue, 6 Aug 2024 22:54:00 +0000 (00:54 +0200)]
suite/util: list_lock() once for get_arch()

We only want to try to list_locks() for getting arch by
machine_type when scheduling a suite. Otherwise we've
got into an infinite loop and console log flooded
with useless error messages.

Signed-off-by: Kyr Shatskyy <kyrylo.shatskyy@clyso.com>
13 months agocontextutil: sleep between tries in safe_while again
Kyr Shatskyy [Tue, 6 Aug 2024 22:42:32 +0000 (00:42 +0200)]
contextutil: sleep between tries in safe_while again

This patch fixes an issue introduced within PR #1816,
that when tries are < 0 (e.g. -1) there is no sleep
occurred between tries.

It also fixes error message, so we repot correct
number of tries we've done now.

Fixes: ee43f87cfe88a8155566b662750d663c1d8742ff
Signed-off-by: Kyr Shatskyy <kyrylo.shatskyy@clyso.com>
13 months agoMerge pull request #1981 from ceph/import-tests
Zack Cerza [Tue, 6 Aug 2024 20:12:34 +0000 (14:12 -0600)]
Merge pull request #1981 from ceph/import-tests

Disable prometheus when exporter isn't running

13 months agoMerge PR #1994 into main
Patrick Donnelly [Tue, 6 Aug 2024 20:03:11 +0000 (16:03 -0400)]
Merge PR #1994 into main

* refs/pull/1994/head:
teuthology/suite: add len() lupa function

Reviewed-by: Samuel Just <sjust@redhat.com>
13 months agoteuthology/suite: add len() lupa function 1994/head
Patrick Donnelly [Mon, 5 Aug 2024 21:13:50 +0000 (17:13 -0400)]
teuthology/suite: add len() lupa function

Namespacing for this is weird which is why I missed it.

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
13 months agotimer: use datetime.timezone.utc for python 3.10 1992/head
Kyr Shatskyy [Sun, 4 Aug 2024 23:15:24 +0000 (01:15 +0200)]
timer: use datetime.timezone.utc for python 3.10

Python 3.10 doesn't have datetime.UTC yet as Python 3.12 does

Signed-off-by: Kyr Shatskyy <kyrylo.shatskyy@clyso.com>
13 months agotest/test_repo_utils: correctly parse system git version 1993/head
Kyr Shatskyy [Sat, 3 Aug 2024 15:12:22 +0000 (17:12 +0200)]
test/test_repo_utils: correctly parse system git version

On macos there are bunch of tests fails because system
git version output cannot be parsed because of extra ending.

Output example for macos:
   git version 2.39.3 (Apple Git-146)
Output example for linux:
   git version 2.45.2

Signed-off-by: Kyr Shatskyy <kyrylo.shatskyy@clyso.com>
13 months agotask/ssh_keys: fix invalid escape sequence '\w'
Kyr Shatskyy [Sun, 4 Aug 2024 22:46:19 +0000 (00:46 +0200)]
task/ssh_keys: fix invalid escape sequence '\w'

Fix syntax warning message:

    <unknown>:68: SyntaxWarning: invalid escape sequence '\w'
    teuthology/task/ssh_keys.py:57: SyntaxWarning: invalid escape sequence '\w'
      match = re.match('[\w-]+ {key} \S+@\S+'.format(key=re.escape(ssh_key)), line_to_test)
    teuthology/task/ssh_keys.py:68: SyntaxWarning: invalid escape sequence '\w'
      match = re.match('[\w-]+ \S+ {username}@\S+'.format(username=username), line_to_test)

Signed-off-by: Kyr Shatskyy <kyrylo.shatskyy@clyso.com>
13 months agotask/mpi: fix invalid escape sequence
Kyr Shatskyy [Sun, 4 Aug 2024 22:17:36 +0000 (00:17 +0200)]
task/mpi: fix invalid escape sequence

    teuthology/task/mpi.py:21: SyntaxWarning: invalid escape sequence '\s'
      version = re.search("^\s+Version:\s+(.+)$", version_str, re.MULTILINE).group(1)

Signed-off-by: Kyr Shatskyy <kyrylo.shatskyy@clyso.com>
13 months agoutil/scanner: get rid of FutureWarning message
Kyr Shatskyy [Sun, 4 Aug 2024 22:06:33 +0000 (00:06 +0200)]
util/scanner: get rid of FutureWarning message

Get rid of the warning:

    teuthology/util/test/test_scanner.py::TestValgrindScanner::test_scan_all_files
      /Users/kyr/kshtsk/teuthology/teuthology/util/scanner.py:133: FutureWarning: The behavior of this method will change in future versions. Use specific 'len(elem)' or 'elem is not None' test instead.
        if not xml_tree:

Signed-off-by: Kyr Shatskyy <kyrylo.shatskyy@clyso.com>
13 months agotimer: fix deprecation warning for utcfromtimestamp
Kyr Shatskyy [Sat, 3 Aug 2024 18:25:41 +0000 (20:25 +0200)]
timer: fix deprecation warning for utcfromtimestamp

Signed-off-by: Kyr Shatskyy <kyrylo.shatskyy@clyso.com>
13 months agolock/cli: fix invalid escape sequence
Kyr Shatskyy [Wed, 31 Jul 2024 22:02:20 +0000 (00:02 +0200)]
lock/cli: fix invalid escape sequence

Address warning message which is going to be an error in future
python versions:

  SyntaxWarning: invalid escape sequence '\w'

Signed-off-by: Kyr Shatskyy <kyrylo.shatskyy@clyso.com>
13 months agotask/kernel: fix invalid escape sequence
Kyr Shatskyy [Sat, 3 Aug 2024 18:24:27 +0000 (20:24 +0200)]
task/kernel: fix invalid escape sequence

Signed-off-by: Kyr Shatskyy <kyrylo.shatskyy@clyso.com>
13 months agobootstrap: fix VENV variable utilization 1991/head
Kyr Shatskyy [Sun, 4 Aug 2024 21:21:32 +0000 (23:21 +0200)]
bootstrap: fix VENV variable utilization

Allow bootstrap to use path outside of teuthology repo
root directory for building virtualenv.

Signed-off-by: Kyr Shatskyy <kyrylo.shatskyy@clyso.com>