Commit Graph

26 Commits

Author SHA1 Message Date
Ian Wienand 75a6a641b1
nodepool: infra-package-needs; cleanup tox installs
The package-maps install of tox is only defined for gentoo, and that
came in with the original image build parts.  We don't need that any
more.

10-pip-packages I didn't trace down, but it hasn't been doing anything
for a long time, since we removed pip-and-virtualenv.  We can remove
that.

The install done in 40-install-tox I can not see being used anywhere.
It came in with If5397d731e9fb04431482529aed23cd9fdaecc1d but I can't
see the venv actually referenced anywhere.  I think this has all been
replaced by the ensure-tox role (or, indeed, jobs migrating away from
tox).  Remove it.

Change-Id: If3fddd79dde56f4087e465ed8b8013f0f337e0cb
2023-02-02 11:46:16 +11:00
Ian Wienand c043b9c2b6 nodepool: update package maps for Rocky 9
Update the package maps.  It also seems like matching just "9" will
cover 9-stream and Rocky, which just uses DIB_RELEASE "9".  Also fixup
the 80-enable-haveged to skip on rocky.

Change-Id: Ia352d217d00e10068a463b62f7d9aca72cb88a8c
2022-08-11 10:17:10 +10:00
Ian Wienand efbb9b8961 nodepool elements: fix pip upgrade venv
Change I316e9587b6e290cd421b47f506c91dbebe0975c0 had a rather
embarrasing oversight in that it copied the /usr/bindep-env/bin/pip
invocation for upgrading pip to all the other venv's.

i.e. we were upgrading hte bindep-env pip over and over, and not
actually the pip in the working venv.  The os-testr install on older
platforms has now broken because it still tries to install with the
ancient inbuilt pip -- local testing has confirmed that it works with
the updated pip.

Change-Id: I22c549b5f9b9e3882fcd2340946d2850b0b2f86b
2022-07-06 13:27:58 +10:00
Neil Hanlon cc6b6de7a0
Add Rocky Linux to nodepool elements tooling
Change-Id: I2a94a34b1518c90ef5f0d91c9131482520c38c62
2022-02-15 17:31:34 -05:00
Alfredo Moralejo 42fa5a7e73 Fix haveged installation in CentOS7
When adding support for CentOS Stream 9 [1], I made dib to install haveged
in centos8 or centos8s only. This broke centos7 images.

This patch should get haveged installed in all centos releases != 9-stream and fix
centos7 one.

[1] https://review.opendev.org/c/openstack/project-config/+/811442

Change-Id: I5a33160c6272ee4e452b83599ca3ed552422c6d2
2021-11-05 11:06:08 +01:00
Alfredo Moralejo 4e88e748bb Add support for CentOS Stream 9 in nodepool elements
This patch is adding support for CentOS Stream 9 in elements
infra-package-needs and nodepool-base which are used in nodepool images.

- Remove installation of ntpdate (it has been removed in CS9).
- It skips installation of haveged until it's available in EPEL9.
- It maps package iptables to iptables-service.

Note that this patch has been tested together with dib patch in Depends-On.

Depends-On: https://review.opendev.org/c/openstack/diskimage-builder/+/811392
Change-Id: I25d9bb7272edc3215840a53e5d79efe5d1fd7210
2021-11-03 12:47:06 +01:00
Ian Wienand 00d29d829b infra-package-needs: install latest pip
The pip installed in the venv with "python3 -m venv" on Xenial is 8.X
-- this does not understand python_requires metadata on packages and
can thus pull in requirements that won't actually run inside the
virtualenv.

Avoid this by upgrading pip in the venv before installing.

While this is the immediate need; do the same on the other venv's we
create for general sanity.

Change-Id: I316e9587b6e290cd421b47f506c91dbebe0975c0
2021-10-20 09:56:06 +11:00
Clark Boylan c6660ecfcb Revert "Pin setuptools<50 in our image venvs"
This reverts commit 6f992efbc5.

Setuptools 50.1.0 has been released which reverts the breaking behavior.
https://review.opendev.org/#/c/749766/ tests that these fixes work in
other venvs that exhibited the same problems. That change looks happy so
I think this revert is ready to go.

Change-Id: I31b62be4f85f40f4d99e463cd961dec0a3542f47
2020-09-03 09:19:52 -07:00
Clark Boylan 6f992efbc5 Pin setuptools<50 in our image venvs
setuptools==50 doesn't work with python older than python3.8. There are
a number of issues [0][1][2] the first of which we are tripping over. Be
conservative here and install older setuptools until these issues on
python3.5, 3.6, and 3.7 are sorted out.

[0] https://github.com/pypa/setuptools/issues/2352
[1] https://github.com/pypa/setuptools/issues/2363
[2] https://github.com/pypa/setuptools/issues/2357

Change-Id: I1ae7251c8a4c214544524871fdfe51e947b638f8
2020-08-31 14:02:24 -07:00
Clark Boylan 8dffaef5c1 Install tox into a virtualenv on our images
This will install tox into a virtualenv on our images. On our older
images with globally installed tox this can be ignored but as we move to
"plain" images this can be used as an opt in tox executable by jobs.
Jobs can set the tox_executable path for the ensure-tox role.

We don't install it globally to avoid polluting package manager managed
paths.

Change-Id: If5397d731e9fb04431482529aed23cd9fdaecc1d
2020-03-13 09:27:30 -07:00
Ian Wienand c142764ec4 nodepool-elements: skip tox install with no pip-and-virtualenv
This is a follow-on to I85438baf5bb31790a56fe5b38327361f0a2398e9.

Skip over this install of tox, which no longer works without the
"pip-and-virtualenv" element define of $DIB_PYTHON_PIP.  We want to
not install globally in the image, but move things like this to
ansible roles in base jobs if required.

Change-Id: Id1571210f0778019c78aec9f38e9f1254c1d68f9
2020-03-11 13:25:55 +11:00
Ian Wienand 7602343b6a nodepool-elements: Use venv for utilities
Since all platforms have Python 3, use the new ensure-venv element
from the dependent change to install bindep and os-testr.

Since we are no longer using pip to install anything during the
builder, this drops the dependency on pip-and-virtualenv from
nodepool-base.  Avoiding this element is our long-term goal, as it's
modification to system state are problematic in a number of ways.  To
maintain the status-quo, the pip-and-virtualenv element is added
explicitly to each build's element list, with a note on it's future.

The current plan for backwards compatability is to replicate the
environment pip-and-virtualenv provides in a base role/job that can be
optionally included.  To test this, provide a new node type
"ubuntu-bionic-plain" that will not include the pip-and-virtualenv
element.  This is put on just one provider (rax) to minimise impact.

The dependent-change (and a dib release) is required before merge so
the ensure-venv element is available.

Depends-On: https://review.opendev.org/707513
Change-Id: I85438baf5bb31790a56fe5b38327361f0a2398e9
2020-03-11 10:12:00 +11:00
Alfredo Moralejo e17d562000 Revert "Use virtualenv --seeder=pip so that libs are accessible"
--seeder=pip is breaking images where pip is not installed from source.

New virtualenv upstream release 20.0.2 has fixed the issue seen when
using sudo [1] by copying instead of symlinking and does not need this
fix anymore.

[1] f4fd6a0991

This reverts commit be9530ae16.

Change-Id: I799982d9c023141cf612901084d4ecbd4447e969
2020-02-12 09:42:54 +00:00
Clark Boylan be9530ae16 Use virtualenv --seeder=pip so that libs are accessible
New virtualenv will by default use a common location for seed libs like
setuptools, wheel, and pip. Unfortunately this breaks if root installs
the virtualenv and other users are expected to use it because these
other users cannot access /root/.local (where the files are stashed).

We fix this by using --seeder=pip which will install all of those libs
into the virtualenv itself.

Change-Id: I4922ea50e31dceda96f545a0d409c0d7dc022e19
2020-02-11 08:41:49 -08:00
Ian Wienand c5f807e699 nodepool/elements : use abstracted commands
On platforms such as CentOS 8 which are python3 first, "virtualenv"
and "pip" may not exist (removed to avoid any confusion over them
being v2 or v3 commands).

The referenced dib change exports new variables that should be correct
on all platforms for creating virtualenv's and pip installs.

(note will require DIB release to be active on builders)

Depends-On: https://review.opendev.org/684462
Change-Id: I3414fb9e503f94ff744b560eff9ec0f4afdbb50e
2019-10-09 03:07:08 +00:00
Ian Wienand ed153e9e70 infra-package-needs: fix haveged install for all CentOS releases
We've never really tested any of this on RHEL, so remove that match
(also, rhel7 element is deprecated for the version-less rhel element).

The CentOS elements export $YUM to be either dnf/yum as appropriate,
so use that behind the distro check where it will be defined.

Change-Id: I3dc18b2f7b6a624719a5f8d7d8b888c69fc0ac2b
2019-10-09 03:07:06 +00:00
Matthew Thode 997486eff6
remove sudo from pip and virtualenv calls
Change-Id: I2f8ea4260c82d8623c74b8ac6355d9eb5f6698e9
2018-09-10 18:11:19 -05:00
Nicolas Hicher e0f471889c Ensure rhel7 image could be build
Add rhel7 distrib in unbound and iptables script for nodepool-base, and
add haveged installation for infra-package-needs to ensure users could
use these elements to build rhel based image.

Change-Id: Ib0ad877369bafab64a1fd25cc331363d771d5753
2018-05-22 14:14:50 -04:00
Matthew Thode 56929e4639
make a gentoo nodepool image
Depends-On: I17202de3016616ce34c8cbead7d0fb047a64e96b

Change-Id: Icf5e7e8bc4f005111cd2492d3c1a2c492b8a7a96
2017-10-18 15:20:11 -05:00
Paul Belanger 24a91a8ebd
Revert "Pin tox to 2.7.0"
Tox 2.8.1 was released to fix our unpack errors.

This reverts commit 0bcbb286b0.

Change-Id: I79348cca11c67369e88626f235b1d03cb211f610
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2017-09-04 17:45:10 -04:00
Clark Boylan 0bcbb286b0 Pin tox to 2.7.0
There is a fun new bug [0] in tox 2.8.0 that affects tempest. To avoid
this crashing everything to a hault pin to 2.7.0 for now.

[0] https://github.com/tox-dev/tox/issues/595

Change-Id: I811fa4c71b63cfa39c3fd1018f9e3d3117ee2300
2017-09-01 12:21:04 -07:00
Paul Belanger 9deb72e02e
Remove git-review from DIB elements
Looking at the git history for git-review, it isn't clear where we are
actually using it.  Additionally, codesearch.o.o seems to show some
projects already managing git-review as a requirement.

Ensure everybody is okay with this change by sending a ML post too.

Change-Id: I53a45736de74b842c5c01982bb153f04bff5622c
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2017-05-29 08:40:17 -04:00
Paul Belanger ff14b3244a
Remove cache-bindep element
Currently, we only install bindep into a virtualenv in our
cache-bindep element. We can move this into infra-package-needs as an
optimization and reduce elements we depend on.

Change-Id: I591ed9a0835609c1ff8cc6069e45231032fd9f28
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2017-05-01 17:32:42 -04:00
Paul Belanger cfcb690b0d
Install haveged on nodepool diskimages
With centos we need to manually enabled epel to only install haveged,
this is why we cannot use package-installs.

Change-Id: I3dff1c1e136eada97d957cf7af8d80e13b651545
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2017-04-20 13:22:24 -04:00
Paul Belanger 3ef54ff90b
Disable xconsole for rsyslog on ubuntu
Until fixed properly upstream, we need to ship our own 50-default.conf
file.

  https://bugs.launchpad.net/ubuntu/+source/rsyslog/+bug/459730

Change-Id: I3eaf646e4d22ae0bcdecbf8b675930ae5587496b
Signed-off-by: Paul Belanger <pabelanger@redhat.com>
2017-04-19 14:56:20 -04:00
Colleen Murphy 4269696003 Install tox and git-review with DIB
Instead of installing these things in puppet[1] we can build them into
the image. This also carries-over a TODO to install git-review in a
virtualenv and update jobs to use it.

[1] http://git.openstack.org/cgit/openstack-infra/system-config/tree/modules/openstack_project/manifests/single_use_slave.pp?id=b3f8b4106c2d391c60f4c3c10e1b6c313b211f17#n47
Change-Id: Ibe427f8b43312f58b4a1a4a1205b764a9d2d79e9
2017-04-13 04:35:29 +00:00