Commit Graph

3820 Commits

Author SHA1 Message Date
Ian Wienand
7b6819213e Fedora 32 support
Update for Fedora 32 support.

Change-Id: I51c5645856a76e2877c013d72e9849a758ba12ff
2020-08-17 19:40:02 +10:00
Pierre Crégut
840f8ed2b2 Adds gnupg2 for apt-keys in ubuntu-minimal
Change present in debian-minimal pushed to ubuntu-minimal.

Change-Id: I736bffe6dd9fb57e450505d62c6ca000f678ded2
Closes-Bug: #1889076
2020-07-27 16:45:53 +02:00
Zuul
a7fba927ca Merge "Support non-x86_64 DIB_DISTRIBUTION_MIRROR variable for CentOS 7" 2020-07-24 09:38:36 +00:00
Jeffrey Zhang
581ffa023b Support non-x86_64 DIB_DISTRIBUTION_MIRROR variable for CentOS 7
Other architectures are stored under "altarch" for CentOS 7, update
the match.

Convert the delimiters to "," to avoid a subtle problem with "|" --
POSIX states

  Within the BRE and the replacement, the BRE delimiter itself can be
  used as a literal character if it is preceded by a backslash.

So "s|\(foo\|bar\)|moo|" doesn't do what you might think; the inner
pipe becomes a literal | and this will *not* match "foo" or "bar".

Change-Id: Ic1642325e3a59a10453c356d8d839ce649812af8
2020-07-20 10:33:01 +10:00
Matthew Thode
2559933f8f
add openrc init system support to serial console element
Change-Id: Id58e53a592b5f4601b893ba6c828bad07942b07b
Signed-off-by: Matthew Thode <mthode@mthode.org>
2020-07-14 13:59:09 -05:00
Zuul
70892a7a16 Merge "update gentoo-releng gpg key" 2020-07-14 00:39:15 +00:00
Zuul
ea6403388e Merge "Switch from unittest2 compat methods to Python 3.x methods" 2020-07-13 02:21:12 +00:00
Your Name
e384da1a98
update gentoo-releng gpg key
Simplify gpg checking by caching a keyring instead of keys to import.

Change-Id: I5ed74ec0e12732aec40ef31377e72d7ddc347f95
Signed-off-by: Matthew Thode <mthode@mthode.org>
2020-07-12 17:50:00 -05:00
Michael Johnson
8b08d212c3 Fix DIB scripts python version
Now that DIB is python3 only we can remove a hack that made sure
scripts outside the chroot ran with the correct version of python.
This is necessary as python3 does not resolve symbolic links to the
binary like python2.x did, which causes element scripts to fail finding
modules when DIB was run from inside a venv.

This patch does the following:
1. Reverts 9c7b8d1714 which was the
   workaround for mixed python2/3 environments.
2. Updates the scripts to use "python3" instead of "python".

Change-Id: If2402bb02fc8a4778fa9434fa167ea1fafd87c28
2020-07-07 12:53:51 -07:00
Zuul
b6d4bef9eb Merge "Use kpartx option to update partition mappings" 2020-07-07 08:27:29 +00:00
melissaml
bf0dc265ae Switch from unittest2 compat methods to Python 3.x methods
With the removal of Python 2.x we can remove the unittest2 compat
wrappers and switch to assertCountEqual instead of assertItemsEqual

We have been able to use them since then, because
testtools required unittest2, which still included it. With testtools
removing Python 2.7 support [3][4], we will lose support for
assertItemsEqual, so we should switch to use assertCountEqual.

[1] - https://bugs.python.org/issue17866
[2] - https://hg.python.org/cpython/rev/d9921cb6e3cd
[3] - testing-cabal/testtools#286
[4] - testing-cabal/testtools#277

Change-Id: I870286a2557e41099597c22dc9747743e1077615
2020-07-07 11:11:28 +08:00
Zuul
dba1d390da Merge "Switch to newer openstackdocstheme and reno versions" 2020-07-06 18:52:41 +00:00
Zuul
9f7c35b238 Merge "add musl profile to gentoo" 2020-07-06 18:52:39 +00:00
Zuul
131ddac3cb Merge "Stop bringing the test environment into the mocks" 2020-07-06 13:28:27 +00:00
Carlos Goncalves
31dc53da67 Install yum and yum-utils on Red Hat family hosts
Elements like yum and yum-minimal depend on the yum and yumdownloader
CLIs on the DIB host. We have been assuming these tools are always
installed on Red Hat family distributions but that is no longer the case
starting from RHEL 8 and CentOS 8 and Fedora for a while -- these
systems moved on to DNF and DNF does not have a hard requirement on yum.

We noticed these two tools were missing while building an Octavia
amphora image on a CentOS 8 controller node in CI:

[...] 08-yum-chroot:_install_pkg_manager:223  : sudo -E yum -y [...]
[...] sudo: yum: command not found

Change-Id: I65807751b3764e86ba5adeb47552305ef2ea299b
2020-07-06 08:33:03 +00:00
Zuul
538fd6291e Merge "Revert "Make ipa centos8 job non-voting"" 2020-07-06 05:37:57 +00:00
Zuul
7e00908a28 Merge "add more python selections to gentoo" 2020-07-06 02:59:59 +00:00
Zuul
5d16300f00 Merge "Download latest CentOS cloud image" 2020-07-05 21:06:43 +00:00
Zuul
9ab6811e84 Merge "Add support for CentOS 8 Stream" 2020-07-05 21:06:41 +00:00
yatin
68bc561c09 Revert "Make ipa centos8 job non-voting"
This reverts commit 868a6f0c8a.

Change-Id: I1cc72314716690874eca57526eac224c4e0b24cf
Depends-On: https://review.opendev.org/#/c/738438/
2020-07-01 03:57:30 +00:00
yatinkarel
e999368d2c Disable all enabled epel repos in CentOS8
EPEL centos8 have different epel repos like
epel, epel-modular, epel-playground etc, so
we need to disable all not just epel.

Also ensure other epel repositories in CentOS7
like epel-testing are also disabled.

Related-Bug: #1885315
Change-Id: I02b3b83fa2047702d5f069d3ca1c9c0bcc1dab52
2020-06-30 10:15:30 +05:30
yatinkarel
868a6f0c8a Make ipa centos8 job non-voting
Until the fix for the job [1] lands make the
job non-voting. The fix needs patch in dib[2].

[1] https://review.opendev.org/#/c/738438/
[2] https://review.opendev.org/#/c/738435/

Depends-On: https://review.opendev.org/#/c/738434/
Change-Id: I91cd22f23657a2059334a4249f45f9afbd96b74e
2020-06-29 22:45:05 +05:30
Matthew Thode
64787d8ec2
add musl profile to gentoo
Change-Id: Id954ffe4d9b019c7e7bb648725ff7f976c929b4d
2020-06-22 18:37:30 -05:00
Carlos Goncalves
1f9619cdb5 Download latest CentOS cloud image
DIB was retrieving the oldest cloud image file which, presently, means
retrieving CentOS 8.1 instead of CentOS 8.2. Even though DIB runs a
system update and so catches up to latest, this takes bandwidth, time
and final image space (8.1 + system update = 765M qcow2, vs 8.2 + system
update = 518M qcow2).

This patch fixes that by taking the first image name in a descending
order list.

Change-Id: I648fe19f1f76c03c97492b6ac7be6381f6f9261b
2020-06-22 11:03:36 +02:00
Carlos Goncalves
367dfc9294 Add support for CentOS 8 Stream
This patch adds support for CentOS 8 Stream [1] to the centos-minimal
element. Users should set DIB_RELEASE=8-stream.

[1] https://www.centos.org/stream/

Change-Id: Id0825de735ab957c10daf35fb3c641f850cc6847
2020-06-22 10:36:30 +02:00
Zuul
6822090e22 Merge "update grub cmdline to current kernel parameters" 2020-06-17 12:15:18 +00:00
Zuul
24f2dbb59a Merge "Add .eggs to gitignore" 2020-06-16 11:43:38 +00:00
Matthew Thode
c7b6f0d6a1
add more python selections to gentoo
Change-Id: If4420e9ae7870739aac8a673ff290f9ed1391acf
2020-06-14 01:16:18 -05:00
Matthew Thode
52a8b2fa01
update grub cmdline to current kernel parameters
vga=normal is depreciated, use gfxpayload=text instead

Change-Id: I2e5be3b07acce14a9f3d47e24938d9da3c5b6c48
2020-06-14 00:39:42 -05:00
Chris MacNaughton
8f57ed9b9e
Stop bringing the test environment into the mocks
Change-Id: I1780f186cf107242cacd6d3da7a5bc81a330b536
Closes-Bug: #1883224
2020-06-12 10:37:36 +02:00
Zuul
2e6a7f949c Merge "Remove virtualenv activation" 2020-06-12 01:17:17 +00:00
Dmitry Tantsur
e793cc4038 Remove virtualenv activation
Since the original merge of this code
(04208e7c79) several things have
changed; particularly now we ship dib-run-parts as part of dib, not as
a separate package.

We setup $_LIB to point to the shipped library diretory via
pkg_resources lookups.  We now call dib-run-parts (as mentioned,
shipped as a dib library now), source scripts, etc. via $_LIB and thus
do not rely on $PATH.  Consequently we don't need this activation
part.

Which is helpful, because "venv" (as opposed to virtualenv) doesn't
have activate_this.py.  So this fixes installation under that for
Python 3.

We update the functional tests to use the virtualenv_command exported
by the ensure-pip role, which will test the venv path.  There is no
need for dib_python as we are Python 3 only now.

Change-Id: Iede929ea2d278008220aac8b1d678ba41eba0d8a
2020-06-11 16:49:15 +10:00
Zuul
3614900572 Merge "Fix yumdownloader cache dir" 2020-06-10 16:24:53 +00:00
Zuul
a0714c2300 Merge "Debuntu: add apt-transport-https" 2020-06-09 10:33:56 +00:00
Zuul
caf72a4c56 Merge "Drop six usage" 2020-06-09 10:28:14 +00:00
Zuul
68017d0046 Merge "Do not fail in a venv when activate_this.py is not found" 2020-06-09 09:54:07 +00:00
Riccardo Pittau
958fb1b6a7 Add .eggs to gitignore
Change-Id: I45da9a837be090983bd8f265b8f104909256b78b
2020-06-09 11:02:00 +02:00
melissaml
abba0b5574 Switch to newer openstackdocstheme and reno versions
Switch to openstackdocstheme 2.2.1 and reno 3.1.0 versions. Using
these versions will allow especially:
* Linking from HTML to PDF document
* Allow parallel building of documents
* Fix some rendering problems

Update Sphinx version as well.

Disable openstackdocs_auto_name to use 'project' variable as name.

Change pygments_style to 'native' since old theme version always used
'native' and the theme now respects the setting and using 'sphinx' can
lead to some strange rendering.

openstackdocstheme renames some variables, so follow the renames
before the next release removes them. A couple of variables are also
not needed anymore, remove them.

See also
http://lists.openstack.org/pipermail/openstack-discuss/2020-May/014971.html

Change-Id: If3e8d8ac29a728aa41562b31976ebe9bfa5df66f
2020-06-09 10:23:37 +02:00
Simon Westphahl
4a424ecabb Use kpartx option to update partition mappings
Fix cases of 'mkfs' failing because the partitions never showed up. Partition
mappings will now be updated instead of just adding them with 'kpartx'. That
means that 'kpartx' will also remove devmappings for deleted partitions.

Traceback of failing mkfs call:

2020-05-11 22:03:25.523 | INFO diskimage_builder.block_device.utils [-] Calling [sudo sync]
2020-05-11 22:03:25.539 | INFO diskimage_builder.block_device.utils [-] Calling [sudo kpartx -avs /dev/loop0]
2020-05-11 22:03:25.581 | INFO diskimage_builder.block_device.utils [-] Calling [sudo mkfs -t ext4 -i 4096 -J size=64 -L cloudimg-rootfs -U 21c6f9eb-4d52-4e5c-b9b7-796735de8909 -q /dev/mapper/loop0p1]
2020-05-11 22:03:25.700 | ERROR diskimage_builder.block_device.blockdevice [-] Create failed; rollback initiated
2020-05-11 22:03:25.700 | Traceback (most recent call last):
2020-05-11 22:03:25.700 |   File "/home/zuul/dib/lib/python3.6/site-packages/diskimage_builder/block_device/blockdevice.py", line 406, in cmd_create
2020-05-11 22:03:25.700 |     node.create()
2020-05-11 22:03:25.700 |   File "/home/zuul/dib/lib/python3.6/site-packages/diskimage_builder/block_device/level2/mkfs.py", line 133, in create
2020-05-11 22:03:25.700 |     exec_sudo(cmd)
2020-05-11 22:03:25.700 |   File "/home/zuul/dib/lib/python3.6/site-packages/diskimage_builder/block_device/utils.py", line 143, in exec_sudo
2020-05-11 22:03:25.700 |     raise e
2020-05-11 22:03:25.700 | diskimage_builder.block_device.exception.BlockDeviceSetupException: exec_sudo failed
2020-05-11 22:03:25.700 | INFO diskimage_builder.block_device.level0.localloop [-] loopdev detach
2020-05-11 22:03:25.701 | INFO diskimage_builder.block_device.utils [-] Calling [sudo losetup -d /dev/loop0]
2020-05-11 22:03:25.732 | INFO diskimage_builder.block_device.level0.localloop [-] Remove image file [/tmp/dib_image.muyw7t1h/image0.raw]
2020-05-11 22:03:25.734 | ERROR diskimage_builder.block_device.blockdevice [-] Rollback complete, exiting
2020-05-11 22:03:25.740 | Traceback (most recent call last):
2020-05-11 22:03:25.740 |   File "/home/zuul/dib/bin/dib-block-device", line 8, in <module>
2020-05-11 22:03:25.740 |     sys.exit(main())
2020-05-11 22:03:25.740 |   File "/home/zuul/dib/lib/python3.6/site-packages/diskimage_builder/block_device/cmd.py", line 120, in main
2020-05-11 22:03:25.740 |     return bdc.main()
2020-05-11 22:03:25.740 |   File "/home/zuul/dib/lib/python3.6/site-packages/diskimage_builder/block_device/cmd.py", line 115, in main
2020-05-11 22:03:25.740 |     self.args.func()
2020-05-11 22:03:25.740 |   File "/home/zuul/dib/lib/python3.6/site-packages/diskimage_builder/block_device/cmd.py", line 36, in cmd_create
2020-05-11 22:03:25.740 |     self.bd.cmd_create()
2020-05-11 22:03:25.740 |   File "/home/zuul/dib/lib/python3.6/site-packages/diskimage_builder/block_device/blockdevice.py", line 406, in cmd_create
2020-05-11 22:03:25.740 |     node.create()
2020-05-11 22:03:25.740 |   File "/home/zuul/dib/lib/python3.6/site-packages/diskimage_builder/block_device/level2/mkfs.py", line 133, in create
2020-05-11 22:03:25.740 |     exec_sudo(cmd)
2020-05-11 22:03:25.740 |   File "/home/zuul/dib/lib/python3.6/site-packages/diskimage_builder/block_device/utils.py", line 143, in exec_sudo
2020-05-11 22:03:25.740 |     raise e
2020-05-11 22:03:25.740 | diskimage_builder.block_device.exception.BlockDeviceSetupException: exec_sudo failed

Change-Id: I374f7f22f9e93ef35eb5813712ca59e75f0733e8
Related-Bug: #1698337
2020-06-09 09:07:55 +02:00
Zuul
1a95c3f93f Merge "Cleanup py27 and docs support" 2020-06-09 05:56:18 +00:00
Zuul
14d3a7ee4f Merge "Add back pep8 and tarball jobs" 2020-06-09 05:25:13 +00:00
Dmitry Tantsur
1e1e36df64 Do not fail in a venv when activate_this.py is not found
The standard Python venv module does not have this script, so currently
DIB unconditionally fails. While a real fix will be provided in
https://review.opendev.org/#/c/704478/ this change at least allows
users to try work around the problem.

Change-Id: I45b79d4d283f2b3ea909612e652672dcb6092488
2020-06-09 12:53:21 +10:00
Carlos Goncalves
9d9dd9249c Fix yumdownloader cache dir
TMPDIR env is not being honored as cache dir in EL 8.

Change-Id: I8281675ec5f0951b3e190a8d6727744a1a5cd8d7
2020-06-07 21:58:49 +02:00
Albin Vass
913937bb10 Update readme to clarify an ubuntu bionic image is built
Change-Id: Ia0263c743a5266bac9465675345fe974c1a1d6bc
2020-06-07 19:53:46 +02:00
Andreas Jaeger
4493208048 Drop six usage
With python3, six is not needed anymore, drop it.

Change-Id: I70bb679270605ac32ca0cceb9414ea3a210e5842
2020-06-05 12:04:37 +02:00
Andreas Jaeger
e7885499dd Cleanup py27 and docs support
This repo is now testing only with Python 3, so let's make
a few cleanups:
- Remove python 2.7 stanza from setup.py
- Remove obsolete sections from setup.cfg
- Update classifiers
- Update requirements, no need for python_version anymore
- Cleanup doc/source/conf.py to remove now obsolete content,
  use sphinxcontrib.apidoc to build module index again (this
  seems to have been broken when switching to sphinx-build).
- Remove install_command from tox.ini, the default is fine
- Use TOX_CONSTRAINTS_FILE instead of obsolete UPPER_CONSTRAINTS_FILE.
- Update tox.ini for python3 only support.

Change-Id: Id8738ecfb0f578d2a7953c63ffe10779f835bcaf
2020-06-05 12:04:30 +02:00
Andreas Jaeger
7c73557d72 Add back pep8 and tarball jobs
Use the victoria python3 template to add py36, py38, pep8 and tarball
publishing back in.

Dependency added to fix ironic-python-agent-check-image-dib-centos8 job.

Depends-On: https://review.opendev.org/733794
Change-Id: I2a789dbfbdc3e0104fa9715dcfe5233453ccbf9c
2020-06-05 12:01:52 +02:00
Monty Taylor
3477dfad00 Drop support for python2
python2 is EOL. OpenStack and Zuul both are python3 only.

Drop the Python-2 CentOS 7 build host testing, including the tripleo
centos-7 train job.

Drop the old openstack-python-jobs template and move to specific
version templates for what we support.

Drop upper-constraints from the py35 environment, as master of
requirements is now using python 3.6-only libraries.

Drop the Xenial tests for similar reasons (rather than making some
sort of forced install); we are keeping Python 3.5 support just for
Zuul compatability at this point so a tox run is enough.

Depends-On: https://review.opendev.org/729787
Depends-On: https://review.opendev.org/729508

Change-Id: I6d90754cb4b7217b10ae777d414c03466b751761
2020-05-29 09:47:18 +10:00
Ian Wienand
de57271ed2 Prepare to drop Python 2 support
Pin func test requirements to stable/train; the last stable release
with Python 2 support.  Switch to the python-jobs-no-constraints
template to avoid using master constraints file.

Only build focal on bionic, other debootstraps are too old.

Remove pip-and-virtualenv testing as we are moving to plain images.

The tripleo-buildimage-jobs are unstable; see linked bug.

Add a note that this is the last Python 2 release.

Change-Id: Ibde7a564dd41cc2d6e80e2dffe5a95a57bbf8ada
2020-05-29 09:44:54 +10:00
Ian Wienand
0c94eef7be Revert "dib-lint: use yamllint to parse YAML files"
This reverts commit 6ee2995214 and
e85c2a6f03.

I missed that if you pip install and then run dib-lint, it's not going
to pick up the .yamllint file shipped here.  Thus it gives spurious
errors.

The reason for this was simply better duplicate key detection in yaml
files, which caused us problems with the kernel installs.  However, at
this point it seems just the old "does it load" test from pyyaml will
be enough.

Change-Id: I87a9fc9bb119cfeffad48fc0fa0df31f0181825d
2020-05-28 16:44:49 +10:00