Commit Graph

2647 Commits

Author SHA1 Message Date
Zuul 2220a7da8d Merge "Make prepare-workspace-git fail faster." 2024-03-26 09:04:24 +00:00
Radosław Piliszek 32edb51a7e Reenable crio jobs
We switch the crio buildset registry job to run on debian bookworm for
the same reason we switched the other buildset registry jobs:
compatibility between skopeo and docker.

Additionally, we fix the crio/minikube route by avoiding the use of
the removed repo. [1]
kubectl from minikube will be used as it should have always been.

[1] https://kubernetes.io/blog/2023/08/31/legacy-package-repository-deprecation/#can-i-continue-to-use-the-legacy-package-repositories

Change-Id: I25b1f3ba7ba34b0dc0043c659111ca8405b375da
2024-03-21 21:09:37 +00:00
Radosław Piliszek bae449c42c Reenable buildset-registry jobs
As a followup to I4d05f9b187f9e40c3dcb2597e08c5bb50c261b17

We switch buildset-registry jobs to debian bookworm which has new enough
golang to build the latest skopeo version. Latest skopeo is used in
order to get api version negotiation behavior which is necessary for
talking to modern docker (version 25 or newer).

Change-Id: Ie673ef6724b0a40e3cfb2ba83e90d566e1f1837c
Co-Authored-By: Clark Boylan <cboylan@sapwetik.org>
2024-03-21 21:09:01 +00:00
Dr. Jens Harbott 90332e6439 Revert "Override DOCKER_MIN_API_VERSION for skopeo when installing docker"
This reverts *parts* of commit 9519fafd10.

Specifically, this reverts the main fix regarding DOCKER_MIN_API_VERSION.

Reason for revert: Docker 26.0.0 is out, which drops the old API

This patch additionally modifies the Zuul config in two ways:

* disables buildset-registry jobs because they are children of
  opendev-buildset-registry (a base-job in opendev) and thus
  do not pick up new changes - they are reenabled in a followup
* disables crio jobs because they have their repo seemingly broken

Change-Id: I4d05f9b187f9e40c3dcb2597e08c5bb50c261b17
Co-Authored-By: Radosław Piliszek <radek@piliszek.it>
2024-03-21 13:30:29 +00:00
Lukas Kranz be72e626e8 Make prepare-workspace-git fail faster.
In case of aws spot instances, the node can drop the connection anytime.
Ansible loops do not fail when the first item fails, instead they execute all items before reporting the failure.
This leads to a big overhead, if we sync repositories, when the node has dropped the connection beforehand.
Therefore i used include_tasks, which fails for the first unsuccessful item.

Change-Id: Id6079a2cda10a825384d52d47750d9c05d323e00
2024-03-21 07:34:30 +01:00
Zuul 8374db870b Merge "prepare-workspace-git: Add ability to define synced pojects" 2024-03-19 14:59:28 +00:00
Zuul 703d0b1a70 Merge "Drop CentOS 7 test jobs" 2024-03-12 18:23:24 +00:00
Clark Boylan a021a9bba2 Pin requests-oauthlib<1.4.0 under python2.7
While requests-oauthlib 1.4.0 reports compatibility with python2.7
evidence points to the contrary. Specifically:

      import requests_oauthlib as oauth
    File "/home/zuul/src/opendev.org/zuul/zuul-jobs/.tox/py27/lib/python2.7/site-packages/requests_oauthlib/__init__.py", line 5, in <module>
      from .oauth1_session import OAuth1Session
    File "/home/zuul/src/opendev.org/zuul/zuul-jobs/.tox/py27/lib/python2.7/site-packages/requests_oauthlib/oauth1_session.py", line 1, in <module>
      from urllib.parse import urlparse
  ImportError: No module named parse

The azure-storage-blob library depends on this oauthlib which is needed
for log upload role testing. We address that by pinning the lib under
python2.7.

Change-Id: Ia27f2df166ccb33dcc93334d884411670ac859f7
2024-03-12 10:19:51 -07:00
Clark Boylan f2f5220561 Drop CentOS 7 test jobs
CentOS 7 is going EOL in the near future. Due to a lack of demand/need
within OpenDev and the upcoming EOL OpenDev has decided to drop CentOS 7
test nodes entirely. This will free up room for OpenDev to build and
mirror distro releases that are more relevant today. In preparation for
this removal we drop the zuul-jobs CentOS 7 testing.

Change-Id: Id49d28dd426ecbb3470e234d3b67875a6b097112
2024-03-08 08:20:27 -08:00
Lukas Kranz 5eca8feda9 prepare-workspace-git: Add ability to define synced pojects
The prepare_workspace_sync_required_projects_only variable allows
users to define which projects to sync to the node. This can prevent
syncing of unnecessary repositories. For some builds e.g. the
depends-on repositories dont need to be synced. The projects are
filtered based on the 'required' flag present in each zuul.project
entry and the required projects list also does not contain projects
which are present due to Depends-On or gate queue sequencing.
Having unnecessary repos in the workspace can for example also break
the analysis phase of bazel.

Change-Id: I3cc36cbfc60c81956caf5137da63973aeade4e21
Co-Authored-By: James E. Blair <jim@acmegating.com>
Co-Authored-By: Bernhard Berg <bernhard.berg@bearingpoint.com>
2024-02-28 10:56:48 -08:00
Clark Boylan b81ef9e329 Drop debian buster testing
Debian buster is the old old release of Debian (it has been replaced by
bullseye and bookworm). Drop testing of this release so that OpenDev can
drop image builds and mirroring of content.

Change-Id: I7244c045d3346ff8c222ab5afc77dfbe05420cae
2024-02-23 08:48:40 -08:00
Clark Boylan 6e0af61097 Drop opensuse-15 jobs
The OpenDev team is planning to remove OpenSUSE LEAP 15 images as our
node builds and mirrors are for 15.2 which is ancient and no one is
currently working to modernize these test environments. On top of that
LEAP is apparently going away in the future and will be replaced with
another distro.

Change-Id: I7b35561f2577d0d2a3f951199e10c509bf7de421
2024-02-21 09:17:32 -08:00
James E. Blair 8074d20b8f Fix ensure-docker for Ansible 6
The systemd_service module is known as "systemd" in Ansible 6.  Use
the backwards compat format until Ansible 6 is removed from Zuul.

Change-Id: Ifff1cdfdf4d03426f289355673ee1472f0d37dd6
2024-02-16 06:55:05 -08:00
James E. Blair 509880073e Remove command.warn usage
This is no longer present in Ansible 9.

Removing these upsets ansible-lint, so those errors are ignored.

The base roles job has bitrotted on centos-7 and bionic due to
a bad voluptuous release used in an stestr test.  That is fixed in
this change as well.

Change-Id: I67886d5ad82ab590979f82bd102d6f974b9d4421
2024-02-14 15:17:52 -08:00
Clark Boylan 9519fafd10 Override DOCKER_MIN_API_VERSION for skopeo when installing docker
Skopeo hardcoded the docker api version for image manipulation to
version 1.22 of the api until very recently. Docker 25 sets 1.24 as a
minimum version by default introducing an incompatibility between the
tools. It isn't straightforward to install an updated skopeo everywhere
we need it (due to golang requirements). As a workaround we override
the min version to 1.22 when installing the docker daemon. This should
work until Docker 26 is released and removed the override option.

Note we also pin microk8s from latest/stable (which is currently
1.29/stable) to 1.28/stable to workaround
https://github.com/canonical/microk8s/issues/4361. This is necessary to
get the CI jobs for docker/registry/k8s testing working in order to land
this fixup.

Change-Id: I377ac84d532749eba578c4b32eb2ed6a5ce7a0c9
2024-02-14 10:42:47 -08:00
Clark Boylan e3006463aa Remove openshift + zuul registry testing
The openshift testing relied on openshift 3.11 as this version of
openshift can be deployed locally without using baremetal management.
Unfortunately, docker images for this version of openshift are no longer
available leading to errors like:

  pod_workers.go:186] Error syncing pod b14b1b90-cb64-11ee-816f-bc764e2013fc ("openshift-service-cert-signer-operator-6d477f986b-qx6cs_openshift-core-operators(b14b1b90-cb64-11ee-816f-bc764e2013fc)"), skipping: failed to "StartContainer" for "operator" with ImagePullBackOff: "Back-off pulling image \"openshift/origin-service-serving-cert-signer:v3.11\""

When deploying this version of openshift. Since openshift 4 is not
generally installable in a similar manner we drop the testing. The
testing of the registry with other versions of kubernetes should give us
reasonable coverage.

Change-Id: I6ac87edee2123a5105f3b8138157faa7ecd94b0d
2024-02-14 10:42:12 -08:00
Zuul df5756f765 Merge "Add zuul-tenant-conf-check role/job" 2024-02-13 16:09:34 +00:00
Zuul d2998dfbcd Merge "Introduce LogJuicer roles" 2024-02-13 15:41:51 +00:00
James E. Blair 73bdf1f2df Add zuul-tenant-conf-check role/job
This performs static validation of Zuul tenant config files.

Change-Id: I5d439d6cfb963e55d07b2a0058de76f030fe47b3
2024-02-01 15:56:29 -08:00
Tristan Cacqueray 26db5b3b24 Introduce LogJuicer roles
This change adds new roles to run logjuicer in zuul jobs:
  https://github.com/logjuicer/logjuicer

Change-Id: I02824a18285a16c8f0be6bb96b5404aa0d601c16
2024-01-08 16:09:17 +00:00
Felix Edel 7761396303 mirror-workspace-git-repos: Retry on failure in git update task
We occasionally see the this task fail for the first element in the
zuul.projects list with a MODULE FAILURE and a return code of -13
(SIGPIPE) [1]. So far we couldn't identify the root cause, so try to
mitigate this issue by retrying on failure. This solution is similar to
the one used for the "Synchronize repos" task[2].

There is a bug report in Ansible that fits

Since it's only the first element in the loop that is failing while
subsequent elements are successful, we currently have two assumptions:

  1. As the task before is using a `delegate_to: localhost' [3],
     there might be a problem with Ansible when switching the connection
     from localhost to the remote host (node).
  2. Since the task before is using the same SSH connection [4] that is
     used by Ansible to push the git repository, there might be some
     "leftovers" on the connection that make the next task fail.
  3. There is also a bug report in Ansible [5] which might be causing
     that error.

[1]:
    {
        "ansible_loop_var": "zj_project",
        "changed": false,
        "failed": true,
        "module_stderr": "",
        "module_stdout": "",
        "msg": "MODULE FAILURE\nSee stdout/stderr for the exact error",
        "rc": -13,
        "zj_project": {...}
    }

[2]: 3b3495e255/roles/mirror-workspace-git-repos/tasks/main.yaml (L32)
[3]: 3b3495e255/roles/mirror-workspace-git-repos/tasks/main.yaml (L25)
[4]: 3b3495e255/roles/mirror-workspace-git-repos/tasks/main.yaml (L16)
[5]: https://github.com/ansible/ansible/issues/81777

Change-Id: I0c4cb87bb076b9b40c9c446dbe5db437daff5897
2023-12-08 06:37:55 -08:00
Roman Kuznecov 6710f84a90 tox: Do not concat stdout and stderr in getting siblings
Several packages in calling "python setup.py --name ..." may return
warning message, e.g.:

  ...
  _DeprecatedInstaller: setuptools.installer and fetch_build_eggs are deprecated.
  !!

          ********************************************************************************
          Requirements should be satisfied by a PEP 517 installer.
          If you are using pip, you can try `pip install --use-pep517`.
          ********************************************************************************

  !!
  dist.fetch_build_eggs(dist.setup_requires)
  WARNING setuptools_scm.pyproject_reading toml section missing 'pyproject.toml does not contain a tool.setuptools_scm section'
  <PACKAGE_NAME>

and then this huge log places into the package_name variable. But
script expects that package_name will contain only package name. Because of this situation could not find siblings packages and
install them.

Change-Id: I5bf9a19233c48d1260b5ab17d749bfc58a8ef2fa
2023-11-24 06:32:19 +00:00
Zuul 3b3495e255 Merge "Deprecate mirror-workspace-git-repos" 2023-09-26 23:24:36 +00:00
Lukas Kranz ce2bea51d4 Deprecate mirror-workspace-git-repos
This change is preparation for https://review.opendev.org/c/zuul/zuul-jobs/+/887917

In the beginning, there was only prepare-workspace[0] which rsynced repos.

Then we added mirror-workspace-git[1] to make it more efficient by using git operation, but it required some openstack-specific code in project-config to work.

Then we added prepare-workspace-git[2] which completed the git-based sync solution by locating everything requried in zuul-jobs.  It used mirror-workspace-git by reference and added this TODO:

  # TODO(tobiash): we might want to deprecate the role mirror-workspace-git-repos
  # and move it here.

This change completes that TODO by moving the mirror-workspace-git-repos code into prepare-workspace-git and places the repo in a sensible and maintainable state with two simple and good options:

 * prepare-workspace (rsync)
 * prepare-workspace-git (git)

In the unlikely event anyone is still using mirror-workspace-git-repos standalone (OpenStack/OpenDev is not, and that solution was haphazard as described above) they would be well served by a notification that there is a better alternative which is what most of the community actually uses now.

[0] cfffd4431b
[1] 348598e96a
[2] 7cee7156bc

Change-Id: Ib80e0447d49363182fd0d4c4d4e269841bc3aa95
2023-09-25 14:51:26 -07:00
James E. Blair 2cf566f363 Unpin stestr and python-subunit in fetch-subunit-output test
It is unclear why stestr is pinned, so let's unpin to see if
latest works.

Change-Id: Ia3735fb7b6efc2d0f64b88b8c048db798fc7cb0b
2023-09-18 10:36:11 -07:00
James E. Blair fbd9ba8144 Revert "Disable base role testing that runs code on localhost"
We can now run untrusted code on the executor, so we can re-enable
these tests.

This reverts commit 44d2187e7f.

Change-Id: I65960af09a3cf3da1e780a96b6d13ddba3ce73d8
2023-09-18 10:36:11 -07:00
James E. Blair 10ffca9ba8 Pin python-subunit in fetch-subunit-output test
This test pins stestr (reason unclear) but does not pin python-subunit.
Python-subunit has made a release incompatible with that version of
stestr, so pin it.

Separately, it may be useful to see if we can unpin both.

Change-Id: Ia7cc45dc53ff0697e7ec84479c08c93e7d872a76
2023-09-18 10:36:11 -07:00
Zuul f2208ed3c3 Merge "Remove the nox-py27 job" 2023-09-06 20:46:32 +00:00
Zuul 6ad6ee7a65 Merge "roles/ensure-python: Fix 'python_use_stow' option" 2023-09-05 14:52:59 +00:00
Zuul 5aca055b8b Merge "Drop Helm v2 support to fix v3 issue" 2023-09-04 14:07:26 +00:00
Clark Boylan 378e039dba Remove the nox-py27 job
We added nox somewhat recently and set it up to mimic existing tox jobs.
This meant adding py27 jobs. Since then (in OpenDev at least) only a
single project has used the py27 job: Bindep. Bindep is dropping support
for python2.7 as the need for it has come to an end. Additionally, nox
doesn't work with python2.7 out of the box due to a virtualenv
dependency that ends up being too new for python2.7 venv creation.
Rather than hack around that let's drop python2.7 job support.

Change-Id: I52c07b01ad173304c19b13a10927fdadf9d84170
2023-08-22 14:28:36 -07:00
Clark Boylan 7ae274dff8 Fix nox job python2.7 support
Virtualenv dropped python2.7 support. When we install latest nox it also
installs latest virtualenv. Then when we try to run python2.7 jobs which
will create a python2.7 venv things fail with:

  RuntimeError: failed to find interpreter for Builtin discover of python_spec='python2.7'

The underlying issue is that we are getting a too new virtualenv. Fix
this by adding a pre run step to the python2.7 jobs that downgrades to a
version of virtualenv that should support python2.7 environments.

Change-Id: I0ed9915b25c752cdaae4df19c9a0e0dc1aafd3d7
2023-08-22 10:02:22 -07:00
James E. Blair 56653e0470 Support ensure-kubernetes on bookworm
Change-Id: I88cd78e73611f97ad0cfb1eebe86626b79fd1699
2023-08-14 11:15:36 -07:00
James E. Blair 03b12b2b3b Stop testing ensure-kubernetes with crio under ubuntu bionic
This hasn't worked since January 2023.

Change-Id: If458bd7aa8ce793178d1f7249c976aee146d6fb4
2023-08-14 11:15:36 -07:00
James E. Blair 467ec0c5d3 Remove fedora-36 container jobs
These aren't testable any more due to fedora 36 EOL.

Change-Id: I8a10c3c08caa02131cab2dc13c81bf9b5d15116a
2023-08-11 14:59:54 -07:00
James E. Blair df906ec2f7 Fix zookeeper install on debian bookworm
This is a workaround for https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1030129
which prevents installation of the JDK on bookworm.

This also updates the test platforms for this role.

Change-Id: I1efe59a4e7884fffe15bc623f717f891189f48ca
2023-08-11 14:59:50 -07:00
Dr. Jens Harbott fcd579ea5b Add testing for Debian bookworm
Change-Id: Ib11e75f4b1cd596781d72672ce4fe08436f0f0f6
2023-08-11 09:34:22 -07:00
James E. Blair d4273c46e2 Remove fedora-36 jobs
Fedora 36 is EOL and the package archive has been moved.

Change-Id: I9032bbeb1bcbf3da79db8fbf6fbbe0a61ef4d868
2023-08-11 09:32:42 -07:00
James E. Blair 78b2911f17 Mark nim jobs unmaintained
The nim test jobs do not work across the board and no one has
stepped up to fix them.

Change-Id: I1bdd9ca95cd4b45c25d2a2645810c19a90e3cc55
2023-08-11 09:12:13 -07:00
Moritz Haase d8af2889f8 roles/ensure-python: Fix 'python_use_stow' option
Fix a syntax error in stow.yaml that broke the 'python_use_stow' option. While
at it, make sure that a proper error message is shown if no stow environments
are installed on the system.

Change-Id: Ifa696daa367997fb705ba22527137f4f051ca558
2023-07-11 06:17:29 +00:00
Lukas Kranz b192ccee73 Fix blockdiag issue
Blockdiag is incompatible with Pillow >= 10.0
Solution for now, pin Pillow < 10.0

Change-Id: I93b9634f7d2813cb1a17aeda2d8ef2ec188f86f3
2023-07-10 09:06:31 +02:00
Zuul d490441a61 Merge "Use zuul_workspace_root for prepare/mirror workspace roles" 2023-06-29 16:24:26 +00:00
Zuul 1d9fcd8017 Merge "Use zuul_workspace_root for prepare/mirror workspace test roles" 2023-06-28 18:35:59 +00:00
Benedikt Loeffler 7f400a0d32 Use zuul_workspace_root for prepare/mirror workspace roles
Use zuul_workspace_root as the destination folder for preparing and
mirroring the workspace, which points to ansible_user_dir by default.
(As is currently the case).
The override of this variable can be useful when using a static node
with multiple slots to use a separate workspace for each slot.

Change-Id: If50abc7ccc2dfb6f4ea9f9d5c6a5091ff6967aef
2023-06-27 14:22:08 +02:00
Benedikt Loeffler 258add7bb4 Use zuul_workspace_root for prepare/mirror workspace test roles
Use zuul_workspace_root as the destination folder for preparing and
mirroring the workspace, which points to ansible_user_dir by default.
(As is currently the case).
The override of this variable can be useful when using a static node
with multiple slots to use a separate workspace for each slot.

Change-Id: I2014b9c876907cfc17a0ec7fa2b6d4e67cb2331c
2023-06-27 14:21:38 +02:00
James E. Blair 97ae13d7a2 Pin podman on jammy
The jammy-updates/universe repo recently added
podman 3.4.4+ds1-1ubuntu1.22.04.1 which produces the error:

  Error validating CNI config file
  /home/zuul/.config/cni/net.d/zuul-tutorial_zuul.conflist:
  [plugin bridge does not support config version \"1.0.0\"
  plugin portmap does not support config version \"1.0.0\"
  plugin firewall does not support config version \"1.0.0\"
  plugin tuning does not support config version \"1.0.0\"]

Pin to 3.4.4+ds1-1ubuntu1 until this is fixed.

Change-Id: I944c6cbb8129abfc8e3383e0f08920520345f5be
2023-06-20 18:49:14 -07:00
Radosław Piliszek 0f662a23d0 Drop Helm v2 support to fix v3 issue
Helm v2 is long gone and there seems to be no interest in
supporting it any longer. [1]

Dropping support for v2 allows for an easy fix to the
command used so that it names the release properly
as it was supposed to instead of trying to set the
namespace name (the -n switch changed purpose [1]).

[1] https://lists.zuul-ci.org/archives/list/zuul-discuss@lists.zuul-ci.org/thread/WUWBM5F3PXXDLKK6JNSP4UR4VTWDNPZ4/

Story: 2010783
Task: 48201
Change-Id: I00676bcc7e8b4f3ec014f2292c6c0ee4c17acd96
2023-06-20 17:06:36 +02:00
Zuul 29f27ebaaa Merge "Use release CentOS SIGS repo to install openvswitch in C9S" 2023-06-13 14:44:44 +00:00
Zuul efdedc66a3 Merge "Force cgroupfs cgroup manager with podman on ubuntu" 2023-06-01 01:15:00 +00:00
Zuul 90fcbf8ee5 Merge "use-docker-mirror: Also run task if docker_mirror is defined" 2023-05-26 17:50:35 +00:00