Commit Graph

4354 Commits

Author SHA1 Message Date
Steve Baker f61548d863 Add thin provisioning support to growvols
This change enhances the growvols script to support all volumes being
backed by one thin provisioning pool.

If a pool is detected, the following occurs:
- validation to confirm every volume is backed by the pool
- only the pool is extended into the new partition
- volumes are extended by the same amount as the non thin-provisioned
  case

This results in no volumes being over-provisioned, so
out-of-space behaviour will be the same as the non thin-provisioned
case.

This change also switches to using /dev/mapper device mapper paths for
volume block devices, since that is the only path the thin pool is
mapped to.

Change-Id: I96085fc889e72c942cfef7e3acb6f6cd73f606dd
2022-08-24 10:14:26 +12:00
Zuul 15430098a0 Merge "Do dmsetup remove device in rollback" 2022-08-23 16:11:30 +00:00
Ian Wienand 467bbf36dd rocky : create machine-id in 9
It turns out we do need to create the machine-id for the same reason
as on 8.  This was being hidden by the bootloader choosing the root
disk label from the host (see the dependent change).

Change I3b518802d681b888916a5cc6a3dcf7e1b537da1e has modified the
testing to use a different root-disk label, which should help catch
this in the fututure.

Depends-On: https://review.opendev.org/c/zuul/nodepool/+/853574
Change-Id: I64de66cac25fd2e051780fb4812e075c647eb76e
2022-08-19 18:54:43 +10:00
Ian Wienand 3425624686 Allow setting ROOT_LABEL from environment
--root-label was added with I596104d1a63b5dc6549e8460a1ae3da00165ef04

This sets the ROOT_LABEL environment variable.

Over the years how this deploys has become more complex; now this
value gets written into DIB_BLOCK_DEVICE_PARAMS_YAML default values,
which is then loaded into DIB_ROOT_LABEL.

To override this from the environment you need to specify a full
DIB_BLOCK_DEVICE_CONFIG -- we don't have a way to just merge in the
root label setting.

Using the command-line argument is difficult with tools like nodepool
where the command-line is baked into something else.  However we
already have methods for overriding environment variables on dib
calls.

Several of the other variables here accept default values from the
environment, so this is not an outlier.  Making ROOT_LABEL also do
this allows us to test with non-default root devices in the gate (see
the linked change).

Change-Id: Ia1ef48c24841a86f387ff9603c64fd23d8670193
Needed-By: https://review.opendev.org/c/zuul/nodepool/+/853574
2022-08-18 11:21:19 +10:00
Steve Baker 1a4fb0b89b Do dmsetup remove device in rollback
Without this change, the final unmount will timeout after the
rollbacks are called when the partitioning fails due to a user error.

dmsetup remove is called both for partition and LVM volume devices.

Change-Id: I99679ea00338d4018a95d4da9b21685161cd5049
2022-08-18 10:23:41 +12:00
Vanou Ishii e8c7787ec8 Fix wrong yum.conf name of CentOS 9 Stream
This commit fixes wrong name of yum.conf files
on CentOS 9 Stream in centos element to correct ones.

Change-Id: I25f0661fa79b7bc8ac1b8e3b2831a413c4161d1d
2022-08-08 22:53:21 +09:00
Neil Hanlon 6b42cb23ee
Add Rockylinux 9 build configuration and update jobs for 8 and 9
* Add note in Rocky Linux 9 containerfile to explain not needing to run
  systemd-machine-setup-id

Change-Id: I01233ce27cc4558270b2f41fae36b46a17f56e52
2022-08-02 14:07:05 -04:00
Zuul 6745279243 Merge "Upgrade openEuler to 22.03 LTS" 2022-08-02 11:21:59 +00:00
Zuul b918e7188b Merge "rockylinux : create machine-id early" 2022-08-02 09:27:37 +00:00
annumishra_17 2424943e11 Add subscription-manager repo names for RHEL-9
This commit adds subscription-manager repo names for RHEL-9 qcow2 images

Change-Id: I2f6418a70b6afe543c225d5b2d383f8809842393
2022-08-02 08:53:13 +00:00
Clark Boylan df7e05ee3b Disable the opensuse functest
The opensuse qcow2 image seems to regularly have a mismatch with its
sha256sum file. Possibly because these are being served by different
mirrors and are out of sync with each other? I have been able to
reproduce this locally downloading each file and comparing the resutling
hash.

Change-Id: Ic849f5b2afa488d9518065084112f8fc6e3083b2
2022-08-02 09:51:10 +10:00
Zuul ac5823cab1 Merge "opensuse: better report checksum errors" 2022-08-01 14:44:36 +00:00
wangxiyuan 934a65bc34 Upgrade openEuler to 22.03 LTS
openEuler 20.03-LTS-SP2 was out of date in May 2022. 22.03 LTS
is the newest LTS version. It was release in March 2022 and
will be maintained for 2 years. This patch upgrades the LTS
version. It'll be used in Devstack, Kolla-ansible and so on
in CI jobs.

This patch also enables the YUM mirror to speed up the package
download.

Change-Id: Iba38570d96374226b924db3aca305f7571643823
2022-08-01 19:22:35 +08:00
Ian Wienand 99f10f9380 rockylinux : create machine-id early
Somewhere between the upstream container
rockylinux/rockylinux:8.6.20220515 and the latest release, systemd
started to be pre-installed in the container.

With <= 20220515 installing the kernel-core package would end up
pulling in systemd.  As part of the systemd package installation, the
/etc/machine-id file is created and populated.

The kernel package post-install steps install the kernel with
/bin/kernel-install; this is responsible for copying the kernel
binaries into /boot.  It does this based on the machine-id, and it
seems its failure case with a blank machine-id is to simply skip
copying the kernels into /boot.  To compound this problem, it seems
our bootloader installation doesn't notice that we don't have a kernel
installed, so we end up building an unbootable image.

Testing is/was showing us this; but as rocky is non-voting and this
occured at a random time (rather than in response to a dib change) I
think it slipped by us.

To work around this, create the machine-id early in the container.  We
already have paths that remove the machine-id from final images.

Change-Id: I07e8262102d4e76c861667a98ded9fc3f4f4b82d
2022-08-01 15:55:11 +10:00
Zuul 50390d047f Merge "Removing old grub removal step" 2022-07-25 04:32:11 +00:00
Zuul e304ff7656 Merge "Parse block device lvm lvs size attributes" 2022-07-25 04:23:10 +00:00
Zuul fc0699bec7 Merge "Allow Gentoo to manage python versions by itself" 2022-07-25 02:15:56 +00:00
Zuul a282d2a2bf Merge "cache-url: turn off -x by default" 2022-07-25 02:04:58 +00:00
Zuul ba88a12456 Merge "ubuntu: more exact match on squashfs file, containerfile: use focal" 2022-07-12 16:29:16 +00:00
Ian Wienand 4ba0c588dd cache-url: turn off -x by default
I think that generally this is a lot of noise in the logs, as the
internals of cache-url is well tested, so we don't need to trace log
by default.

Change-Id: I25b5a1ec0d8f99691b2b4b62b9fdd537e5a773e4
2022-07-12 17:09:24 +10:00
Ian Wienand 0abf65eaf7 opensuse: better report checksum errors
Report the checksums and size to make it clearer what is failing.

Change-Id: I7c662e13cdbc19b3935f66ed422f15c2de53e525
2022-07-12 14:03:10 +10:00
Ian Wienand 78d389526c ubuntu: more exact match on squashfs file, containerfile: use focal
This is a squash of two changes that have unfortunately simultaneously
broken the gate.

The functests are failing with

 sha256sum: bionic-server-cloudimg-amd64.squashfs.manifest: No such file or directory

I think what has happened here is that the SHA256 sums file being used
has got a new entry "bionic-server-cloudimg-amd64.squashfs.manifest"
which is showing up in a grep for
"bionic-server-cloudimg-amd64.squashfs".  sha256 then tries to also
check this hash, and has started failing.

To avoid this, add an EOL marker to the grep so it only matches the
exact filename.

Change I7fb585bc5ccc52803eea107e76dddf5e9fde8646 updated the
containerfile tests to Jammy and it seems that cgroups v2 prevents
podman running inside docker [1].  While we investigate, move this
testing back to focal.

[1] https://github.com/containers/podman/issues/14884
Change-Id: I1af9f5599168aadc1e7fcdfae281935e6211a597
2022-07-11 19:56:36 +10:00
Matthew Thode eb162ec6ed
Allow Gentoo to manage python versions by itself
Gentoo can manage python versions itself.  Before this commit users were
forced to set python versions themselves.  Now they have the option to
set it if they wish.

The workaround needed for git is also no longer needed, so it's been
removed.

Change-Id: I06b259ef73a40df6b8ab92a5b424bffcf4ef764d
Signed-off-by: Matthew Thode <mthode@mthode.org>
2022-07-10 22:12:03 -05:00
Steve Baker d090126c66 Parse block device lvm lvs size attributes
The block device lvm lvs `size` attribute was passed directly to
lvcreate, so using units M, G means base 2. All other block device
size values are parsed with accepted conventions of M, B being base 10
and MiB, GiB being base 2.

lvm lvs `size` attributes are now parsed the same as other size
attributes. This improves consistency and makes it practical to
calculate volume sizes to fill the partition size. This means existing
size values will now create slightly smaller volumes. Previous sizes
can be restored by changing the unit to MiB, GiB, or increasing the
value for a base 10 unit.

The impact on this change should be minimal, the only known uses of lvm
volumes (TripleO, and element block-device-efi-lvm) uses extents
percentage instead of size. The smaller sizes can always be increased
after deployment.

Requested sizes will also be rounded down to align with physical
extents (4MiB). Previously specifying a value which did not align on
4MiB would consume an extra extent which could unexpectedly consume
more than the partition size.

Change-Id: Ia109cc5105071d82cc895d8d9cb85bc47da20a7a
2022-07-06 11:27:42 +12:00
Zuul 527e75a6de Merge "update default python for gentoo to 3.10" 2022-07-01 00:13:39 +00:00
Zuul e43597affe Merge "Use internal dhcp client for centos 9-stream and beyond" 2022-06-30 18:20:50 +00:00
Matthew Thode d85a3421a7
update default python for gentoo to 3.10
Change-Id: Iaf1788342e7418af92dd35714415a979b0ba11db
Signed-off-by: Matthew Thode <mthode@mthode.org>
2022-06-30 09:50:35 -05:00
Christopher Stone d0a1909e62 Removing old grub removal step
Closes-bug: #1950701
Change-Id: I01f7190db9924baafac4fbc0b45a4c0e158355cc
2022-06-29 15:30:39 -07:00
Julia Kreger 5f01bd5d61 Use internal dhcp client for centos 9-stream and beyond
All indication in CI is that Centos Stream9's use of dhclient
appears to point to compatability issues when interacting with
dnsmasq. However, this doesn't appear to be the issue with the
internal dhcp client. As such, lets constraint the RH default
so that it no longer applies to Centos 9-stream.

I've also added a documentation entry for DIB_DHCP_CLIENT which
was previously undocumented.

As an aside, I've already reached out to RH's NetworkManager team
regarding this, but root cause is not entirely understood at this
point.

Change-Id: I235f75b385a8b0348c8fe064038c51409f8722c4
Story: 2010109
Task: 45677
2022-06-28 11:02:03 -07:00
Steve Baker f118649738 Fix BLS entries for /boot partitions
Creating a separate /boot partition is desirable in some cases[1].
This change detects if /boot is a partition, and ensures that the
kernel/ramdisk paths are correct in either case. This is applied to
all BLS entries files, whether they were generated by the previous
grub2-mkconfig call or in the source image.

This means the rhel9 specific workaround can be removed since all
paths are now normalised at this stage.

[1] https://review.opendev.org/c/openstack/tripleo-image-elements/+/846807

Change-Id: I62120ec8c65876e451532d2654d37435eb3606a6
Resolves: rhbz#2101514
2022-06-28 02:41:21 +00:00
Zuul 0b72dbf293 Merge "Revert "Temporarily stop running OpenSUSE functtests"" 2022-06-27 00:14:29 +00:00
Zuul cdf931d190 Merge "Add Fedora 36 support" 2022-06-21 23:42:21 +00:00
Zuul 8bb14b9195 Merge "containerfile: warn if we don't have a Dockerfile" 2022-06-21 23:42:18 +00:00
Ian Wienand 0385857cd9 Add Fedora 36 support
Change-Id: I89ff95604aabf59217382bc784783759191c59a3
2022-06-21 14:47:12 +10:00
Zuul a8f2eee128 Merge "Add support for Python 3.10" 2022-06-21 04:18:32 +00:00
Zuul 1230a9730b Merge "Drop tumbleweed job" 2022-06-21 03:26:01 +00:00
Zuul 80c1a519c2 Merge "Add a warning in satellite configuration" 2022-06-21 03:25:58 +00:00
Zuul 97990e4134 Merge "Use plain tox jobs instead of openstack ones" 2022-06-21 02:50:12 +00:00
Zuul 3489fa091b Merge "Stop using openstack upper constraints" 2022-06-21 02:50:08 +00:00
Ian Wienand 3e51709307 containerfile: warn if we don't have a Dockerfile
Currently if no Dockerfile is specified or found, we exit later with
an obscure error.  Check this after the element search; if we still
don't have something to build then we can't continue.

Change-Id: Ifb17a0995fab0ccfe7ee08363676c1fa57e37592
2022-06-21 12:03:46 +10:00
Jay Faulkner 00721dc747 Add support for Python 3.10
Unit tests are currently passing on python 3.10, and distributions
shipping python 3.10.  Mark dib as supporting this in setup.cfg

Change-Id: I32dfefbe4bf5285d94b92822fd64141b748ae9ef
2022-06-21 11:36:30 +10:00
Ian Wienand 0cebad3d06 Revert "CentOS 9-stream : work around selinux permissions issue"
This reverts commit 975522472a.

Thankfully the fix is released upstream now.  This spawned a thread
for disucssion at

  https://lists.centos.org/pipermail/centos-devel/2022-June/120414.html

Change-Id: I5b53e2b7e751ceaf74da8914875203d631a6137c
2022-06-16 11:24:24 +10:00
Zuul 979ad64dd5 Merge "Fix backward regex match" 2022-06-16 00:52:57 +00:00
Zuul 46855e1377 Merge "Revert "Remove py 3.6 support and update jobs"" 2022-06-15 22:41:13 +00:00
Lon Hohberger 887546d927 Fix backward regex match
'9-stream' was being matched against the regex '9',
causing builds on RHEL9 to try to install C9S RPMs.
We want this the other way so that DIB_RELEASE=9
will not match the regex '9-stream'.

Resolves: rhbz#2097443

Signed-off-by: Lon Hohberger <lhh@redhat.com>
Change-Id: Iefd7c23512c460e33117d12bbc33606134daa9e2
2022-06-15 13:58:24 -04:00
David Hill 49285db4d3 Add a warning in satellite configuration
Add a warning in satellite configuration as when no activation_key
is provided and no environment is configured, subscription-manager
might hang as it's prompting the user to provide the missing
parameter.

Change-Id: I9564841ca845eafc2bd39be6b05bef62e8062f28
2022-06-14 08:45:28 -04:00
Dr. Jens Harbott 0d56d4596a Use plain tox jobs instead of openstack ones
We want to be more flexible in terms of selecting which python versions
we test against. So replace the use of the openstack template with
explicit job invocations.

Change-Id: I2159e81d4a2fd46a83993b01bbea5fb37546ace5
2022-06-10 13:38:37 +02:00
Dr. Jens Harbott 4667e6b361 Stop using openstack upper constraints
We want to be able to support older Python versions than those that are
possible with the current OpenStack constraints. Run unit tests without
constraints instead.

Change-Id: I4237a56ff9733b5e3c9521193cc5e9758c28095e
2022-06-10 13:33:29 +02:00
Ian Wienand 975522472a CentOS 9-stream : work around selinux permissions issue
Due to the referenced inline issue, 9-stream currently fails running
setfiles in a chroot without /proc.  Since we want to actually label
/proc, we don't want it mounted.  This pulls in the fixed packages to
get things going until the fix is rolled out.

Change-Id: Id41c16130e975779cb70e2ab19807a689450d026
2022-06-09 17:39:50 +00:00
Dr. Jens Harbott 931f5b0a33 Revert "Remove py 3.6 support and update jobs"
This reverts commit fe0e5324d4.

Reason for revert: Python3.6 is still being used on Centos 8 based
platforms.

This is a partial revert, since the py36 job is currently failing, it
will be restored in a follow-up patch.

Change-Id: Idc0373f9a639cd66925543376fb1e2e3398666da
2022-06-09 08:51:01 +02:00