DIB docs refer to the nodepool-builder container image as an easy way to
run disk-image-builder. Previously this image was hosted on docker hub,
but docker made changes to their image hosting policies and all Zuul and
Nodepool images moved to quay.io. Update the docs to refer to the
new/current image location on quay.io.
Change-Id: Ie19e0e828368bfd0c4aab0ac495c45c19aab7b53
Currently we end up with LANG=en_US.UTF8 without glibc-langpack-en
installed (at least on CentOS 9 Stream).
Change-Id: I252d41d5bc3ea2d1a62795839fedce63923a2a00
With 4k disks, it appears that we can encounter cases where
logical block sizes being larger begins to chip away at space
at the beginning *and* end of an LVM Physical Volume (PV).
With GPT, a similar issue occurs, larger logical block sizes
increases the number of bytes used at the beginning and end
of disk for metadata storage.
For the PV, the signature is on the second logical block, and
there is also reference to a potential backup at the end of the
volume. Which means the overall available space goes from just
being impacted by 1kB to at least 8kB. This can then begin to
impact overall alignment which is in 4MB blocks on top of the
base device.
The attempt here is to dial the sizing back just a little bit,
so we avoid assumptions regarding volume sizing ever possibly
conflicting or cases where we somehow end up asking to grow a
volume on a physical volume group which exceeds the number of
extents LVM has calculated.
Example failure this intends to avoid similar errors on a 4k
disk when growvols is triggered:
Exception: Running command failed: cmd "lvextend -L+952065064960B /dev/mapper/vg-lv_thinpool /dev/sdc6"
Which involves Standard Error ouptut along the lines of:
"Insufficient free space: 226990 extents needed, but only 226988 available"
With this change, we will apply logic to *both* the extent size
of the thinpool, if any, and all logical volumes which effectively
reduces the leveraged volumes by 8MB or two LVM extents, because
growvols tries to convert the user's preference of size or percentage
to bytes, which doesn't compensate for the additional lost extents on
a 4k block device.
Change-Id: I303d504f3c822fd534f3e3642d85873ba30d3f68
While trying to build a new CI job, I came to realize that the
default image was too small, and the block-device-efi-lvm element
example wants 40GB by default.
Even though that can be easily resolved, it kind of requires taking
a look at the code to understand what is going on. So instead,
we'll now log an error as a hint.
Change-Id: I05bfeae1a2b9aef01f781115fdbd5046c80437f0
The yum-minimal element was configuring C, en_US, and en_US.UTF-8 as
languages to be installed by packages notably leaving out C.UTF-8. This
appears to be due to CentOS 7 not supporting C.UTF-8 (its glibc was too
old). Since then CentOS 8, CentOS 8 Stream, and CentOS 9 Stream all
reportedly support C.UTF-8. Since we don't support CentOS 7 any longer
it should be safe to update yum-minimal to include C.UTF-8.
This ensures we have modern C locales available for use which are
starting to be expected (for example Ansible apparently wants a UTF8
locale and some hardcode it to use C.UTF-8).
Change-Id: I0446def63ea0fbf6bb53a0cc56c2d62f47e0ff21
The vm element sets up disk partitioning and bootloader installation in
dib built images. The container based elements are unique among distro
elements in that they have a hard dependency on the vm element. Some
dib users may not need a complete disk image with partition tables and
bootloaders; we remove the vm element to give them that flexibility.
Change-Id: I43bb19415eb0b9c62e44c131497c28ae260369e7
Now minimum python version supported is 3.6, so any logic for older
python versions can be removed.
Change-Id: Ie26cc300c823c3e0615f54453dc9ca9366d7a2e0
The arm64-deb builds are failing for jammy since debootstrap is too old,
let's run them on bookworm instead of bullseye. For consistency do the
same for the x86 builds. Also add functests building noble.
Depends-On: https://review.opendev.org/c/zuul/nodepool/+/929573
Change-Id: I5b25239a7cacda62d3a46f7b15306446b3cc08e6
These files have #!/bin/bash but do not have the execute bit set, and
are never run directly, only sourced. This has triggered RDO packaging
linting. Also outfilter.py can be run directly but does not have an
execute bit set.
This change fixes these issues.
Change-Id: Idd5cac19ec6f10103495bbe217cc5fe41c48e91b
If mkfs fails then the rollback won't delete logical volumes or the
volume group. This prevents unmounting the loop back, and subsequent
image build runs will fail because the volume group still exists.
This change adds lvremove and vgremove rollback actions.
Change-Id: Ib93dfc43f5b3ef90fcec38538e828f135e514f8b
replace-partition
-----------------
A standalone element which consumes a base image which was created with
``diskimage-builder`` and rebuilds it without making any packaging changes. This
allows the image contents to be copied to a new block device layout. Use cases
for this element include:
* Rebuilding a whole-disk image with a different partition layout by setting
``DIB_BLOCK_DEVICE_CONFIG``
* Rebuilding a whole-disk image with the same partitions but with the sector
size increased to 4096 bytes
replace-partition-redhat
------------------------
A redhat family specific version of the ``replace-partition`` element.
Change-Id: I7399c4bf6a4d6acfef43f871df0a40e2961ed44e
Along with DIB_AVOID_PACKAGES_UPDATE it is now possible to invoke the
base element without invoking any package management. This is useful
when using a dib created image as the base image.
Change-Id: Ic6da340627bd55d4d34b1669ebf3a494131f72a6
Some base images will be known to have the required grub packages
installed already so package installation can be skipped.
This is specifically for the case where the base image was built by dib,
and installing any packages is undesirable because repos are not set up.
Change-Id: I0beab9e93838845a0ee533c7e6c7a4980cadd9b3
When using DIB_DISTRIBUTION_MIRROR for an internal mirror with
CentOS Stream >= 9, ensure that the yum repository configuration
files reference the new upstream directory structure layout.
Change-Id: I8360bb77e5ef9370ec69f9c0c327726e3554b7a4
This patch proposes a new element which creates a mechanism for the
image to have automatic updates enabled from the first boot. A custom
config file, is expected during build time, which is injected into
the image.
Change-Id: Ib4c7513db4e00d592447fda1b1d0ed2bc649e1cf
Signed-off-by: Charalampos Kominos <hkominos@gmail.com>
Adds support for the block device size to be asserted for the purpose of
writing out new images, which may be critical for operators with hardware
which requires logical blocks which are 4096 bytes long.
Change-Id: I5c16a042eacfbb94a905b93a0eb9fbc73de0a890
This is for a use-case where running the rest of rpm-distro is not
desirable (rebuilding an image previously build by dib)
Change-Id: I85f4d7fd2ab8a7278f4c76b133104f638a055e74
Since the public mirrors for centos8 are really not available
anymore since it has gone End of Life, changes the default
invocation for a quick disk image to 9-stream.
Users who wish specific behavior should explicitly express
the version they desire.
Change-Id: I12cb10258ab80bae1c754e86aadcf926cdfae805
The GRUB_TIMEOUT was duplicated in
the /etc/grub/defaults.
Changing the DIB_GRUB_TIMEOUT default to the base
image typical default.
Note: Hold shift if you want to interact
with the grub menu.
Change-Id: If4d5ae467706b98d89f9dd6714ef06a5933ccfb3
We were running these test jobs on bullseye which is getting a bit old.
Additionally, it seems that the debootstrap on bullseye may not be able
to build jammy on arm64? Attempt to address that via executing on a
newer platform.
Change-Id: I54195c3f4500dcbcb92c5abb2a14f3078b2461dc
podman is a requirement when building rockylinux images, it must be
included in bindep.txt
Note: zuul ensures that podman is installed in CI jobs, but the
dependency is missing when deploying devstack outside CI.
Change-Id: I17aaac32fdb435b78a2da23b179f2db8d9b0d531
This gives more flexability into defenition and won't result in users to
be blocked until new DIB release will happen with fixed regexp.
Change-Id: I5b6d15dc7cbc6f41b600c5b33f5030df5bdfa793
Current regexp is catching a wrong extra record for HTML-based mirrors [1]
Modifying regexp allows to workaround fetching extra string.
[1] https://paste.openstack.org/show/bVBUEW88mDF58OKKp3kw/
Change-Id: Ibd8806cad10ad7d993b7953eee2d456e92a8f7cf
CentOS-7 went EOL on June 30th. This change removes the job as
mirrorlist.centos.org no longer resolves. Follow-up changes will remove
CentOS-7 from existing elements.
Change-Id: I23a00d2aa2a056dec33516eccb917126f8b766b2
Prior to this change, source images could introduce variation in the
the result of the bootloader element results, if the configuration
is changed later which would could re-introduce arguments not desired
which come from the source image.
Since we assert, bsaed upon user supplied input, new console configuration
we now strip the console configuration from /etc/default/grub configuration
before starting to work on putting in place the user's desired end state.
This also ends up helping reduce/remove the possibility of multiple
console elements as some were sourcing from the original source image.
Change-Id: Ia1f9987d989f1d0e1cbda619f7abdf7005b47fbc