Commit Graph

4330 Commits

Author SHA1 Message Date
Zuul
0e93b853bf Merge "RHEL/Centos 9 does not have package grub2-efi-x64-modules" 2021-10-04 06:51:27 +00:00
Zuul
0a9c0b6ab8 Merge "Support grubby and the Bootloader Spec" 2021-10-04 06:46:29 +00:00
Zuul
a4615a2977 Merge "Move grubenv to EFI dir" 2021-10-04 06:46:28 +00:00
Zuul
175c5c4da6 Merge "Allowing ubuntu element use local image" 2021-10-01 15:31:07 +00:00
Marco Vaschetto
1f4fb1d7a5 Allowing ubuntu element use local image
Patch allow to set path for local image source,
instead download latest or use the cached image.
This permit to build image also in environment without internet access.

Change-Id: I9422e21c5d0445e31d5a7258aa7310b20e39b929
2021-09-27 20:56:06 +02:00
Steve Baker
517e7eca95 Fix lower constraints
decorator-3.4.0 now errors on setup due to using use_2to3, and
networkx-1.1.0 attempts to import fractions.gcd, which is math.gcd
from python-3.5 onwards.

Change-Id: I4f4ddebb079a95708be3dd76086b039db18d5948
2021-09-27 16:03:22 +13:00
Zuul
0aa6e24286 Merge "Fix debian-minimal security repos" 2021-09-14 23:16:28 +00:00
Steve Baker
296c81b9ca Add DIB_YUM_REPO_PACKAGE as an alternative to DIB_YUM_REPO_CONF
A custom yum repository can now be configured by defining
`DIB_YUM_REPO_PACKAGE` as a yum available package or a URL to an rpm file.
This package can install repo files with any associated keys and
certificates.

A good example of such a package upstream is rdo-release[1] which
includes multiple repo files, the repo keys, and a root certificate.
This makes these repos impractical to install via DIB_YUM_REPO_CONF.

Downstream, repo packages like this a frequently used to bootstrap
development builds of RHEL with development repos.

[1] https://www.rdoproject.org/repos/rdo-release.rpm

Change-Id: I2832e723998c9bd7635cdf7541a4c20eff6294d2
2021-09-13 09:32:53 +12:00
Steve Baker
017ba12eb0 Add policycoreutils package mappings for RHEL/Centos 9
Change-Id: I69f0bc39b3ff4759bb66cea76112901ea8afff68
2021-09-13 09:32:53 +12:00
Steve Baker
fd63fe6999 RHEL/Centos 9 does not have package grub2-efi-x64-modules
Change-Id: Ida37eb500b7f331fd35f1b76365940c3b95ec83e
2021-09-13 09:32:53 +12:00
Steve Baker
97f940ace5 Support grubby and the Bootloader Spec
Fedora 30 and RHEL-8.2 onwards support the Bootloader Spec and use grubby
to manage kernel menu entries and kernel arguments.
https://fedoraproject.org/wiki/Changes/BootLoaderSpecByDefault

This change detects if this is a BLS enabled environment, and uses
grubby to set kernel arguments on all kernel entries if it is.

Change-Id: I2701260d54cf6bc79f1ac765b512d99d799e8c43
2021-09-13 09:32:53 +12:00
Steve Baker
b01aac9715 Move grubenv to EFI dir
If the grubenv is regenerated, its changes won't be available to UEFI
boot systems unless the changed grubenv is copied to the EFI
directory.

This change copies the grubenv to the EFI directory when the grub.cfg
is copied.

Change-Id: I512502117a6bf1e6122fdfd8965ca488b4a5bae4
2021-09-13 09:32:29 +12:00
Zuul
3c3ef6e32b Merge "Check and remove existing image interface configurations" 2021-09-10 15:01:28 +00:00
Zuul
48ef1c4d96 Merge "simple-init: allow disabling DHCP fallback" 2021-09-10 14:54:03 +00:00
Zuul
3eae88795d Merge "simple-init: support installing Glean from packages" 2021-09-10 14:54:00 +00:00
Riccardo Pittau
6ed7f3b139 Fix debian-minimal security repos
Debian stable security repos is now stable-security, as well as other
versions.

Move the Debian bullseye job from experimental to non-voting check.

Change-Id: I451cacda6573727de9448b5857bed5181850b4ad
2021-09-10 11:40:48 +02:00
Zuul
f03c50b4a1 Merge "Fix doc typo" 2021-09-09 00:24:00 +00:00
Zuul
8250b33d68 Merge "yum-minimal: use DNF tools on host" 2021-09-09 00:09:56 +00:00
Michal Arbet
db1409f550 Fix cron not installed in debian
This patch adds cron to debian package-installs
as cron should be included in OS.

Change-Id: I50140dc98c240911e769acf2b3c11958ffad5494
2021-09-01 23:49:27 +02:00
Piotr Parczewski
169f755165 Fix doc typo
Change-Id: I5b2729fa874e8e19a9f0dc7b1aed2ce7f5090c97
2021-09-01 19:58:52 +02:00
Ian Wienand
5f47584196 yum-minimal: use DNF tools on host
The latest Debian bullseye release doesn't provide yum any more, only
DNF.  This breaks the minimal builds that are using on-host yum tools
to start the chroot.  Probe for yumdownloader, and if it's not there,
use DNF.

Note this requires "dnf download" which may not be packaged.  See
I21cfbd3935e48be4b92591ea36c7eed301230753 for a sample work-around
that installs this plugin in the nodepool-builder container.

Change-Id: Ia7f1e4d115cc67c378d865d91af94a07b8cdc6cc
2021-08-30 14:14:32 +10:00
Eduardo Santos
442d11b236 Bump Ubuntu release to focal
Change-Id: I01689cfb01b095ef69573a48be55353ea7aa2931
2021-08-26 23:28:33 -03:00
Steve Baker
59420be677 Use non-greedy modifier for SUBRELEASE grep
Some fedora mirrors are serving image icon html, and this grep is
over-matching on those mirrors.

Change-Id: Ibd737f44a8d2eee1902b6c5363c61d591feb75c9
2021-08-23 14:12:17 +12:00
Xinliang Liu
a6ee4d0c21 Introduce openEuler distro
Add openeuler-minimal element and add CI functional tests for both
x86_64 and arm64.

OpenEuler is an open source community driven YUM/DNF distro like
Fedora. It references Fedora and CentOS a lot for the rpm packages
building. So somewhat it can be treated as a redhat family distro
and reuse the YUM/DNF related elements to help build openEuler images.

For more info about openEuler, see: https://openeuler.org/en

Depends-On: https://review.opendev.org/c/zuul/zuul-jobs/+/803413
Change-Id: I3e06e49b524364c3a4edeba8bce7a8c06b9c7b76
2021-08-04 03:06:55 +00:00
Zuul
4f5689a409 Merge "Permit specification of extra bootstrap packages" 2021-08-03 23:13:04 +00:00
Gonéri Le Bouder
168bb25e69 Fedora: bump DIB_RELEASE to 34
Fedora 34 is the new stable release.

Change-Id: I2fba6935064823ace418b00f9735e52640c933f3
2021-08-03 16:37:16 +00:00
Jay Faulkner
91da6ab885 Permit specification of extra bootstrap packages
This change permits the yum-minimal element to be used in downstream
custom distributions, which may have additional packages containing repo
config or GPG keys needed.

This could also be utilized at a later time to move the
distribution-specific logic in this method to each distribution element
separately.

Change-Id: Ic1434bb2fe7301086cf11ba6bd7f2ee187c5e6c8
2021-08-02 11:57:11 -07:00
Zuul
0b14750e3f Merge "Update IRC networks" 2021-07-23 02:06:47 +00:00
Zuul
03275c2dd4 Merge "Add a keylime-agent element and a tpm-emulator element" 2021-07-22 10:34:31 +00:00
Takashi Kajinami
4107dc3bc4 Update IRC networks
The following two channels were migrated to OFTC.
 #tripleo
 #openstack-dib

Also, the following channel was migrated to Libera Chat[1].
 #opensuse-cloud

[1] https://en.opensuse.org/openSUSE:IRC_list

Change-Id: Ia4c729a8d284bbfcbdb3b8621ae29d9be57886f5
2021-07-22 19:17:51 +09:00
Zuul
02bda20dce Merge "Auto find greatest Fedora cloud image sub-release" 2021-07-22 07:53:44 +00:00
Zuul
585f34e068 Merge "Replace deprecated import of ABCs from collections" 2021-07-22 07:38:16 +00:00
Danni Shi
05d8f3ae38 Add a keylime-agent element and a tpm-emulator element
Story: #2002713

Task: #41304
Change-Id: Ia5226faabae8accb03f401aa4de3c8311b583455
2021-07-20 10:05:41 -04:00
Zuul
ddd70501d4 Merge "Convert multi line if statement to case" 2021-07-19 23:31:06 +00:00
Takashi Kajinami
b6254398e7 Replace deprecated import of ABCs from collections
ABCs in collections should be imported from collections.abc and direct
import from collections is deprecated since Python 3.3.

Change-Id: Idacff95cbb276eda0bc55de771ce6c701363c2e1
2021-07-17 01:02:19 +09:00
Zuul
556f4f6aa6 Merge "Add a growvols utility for growing LVM volumes" 2021-07-12 10:12:13 +00:00
Zuul
3f2feb6e3b Merge "cache-url : turn down verbose curl" 2021-07-12 09:55:28 +00:00
Zuul
8ba537e6ea Merge "Migrate from testr to stestr" 2021-07-12 08:43:53 +00:00
Zuul
d286f64a76 Merge "Add element block-device-efi-lvm" 2021-07-08 01:08:26 +00:00
Zuul
7831d71066 Merge "fedora-container: install dnf-plugins-core" 2021-07-07 06:51:05 +00:00
Zuul
d4f2d79f89 Merge "Do not uninstall non-installed packages" 2021-07-07 04:55:10 +00:00
Ian Wienand
bc39a5afe7 fedora-container: install dnf-plugins-core
Add dnf-plugins-core to the package-installs; this lets things like
"dnf copr" work automatically and is in-line with fedora-minimal base
packages.  While we're here, clean up some unneeded packages, and
remove the pkg-map that isn't relevant for Fedora builds.

Change-Id: Iad5a4717bcb55928377cc159b3360b0a70c5c5ac
2021-07-07 11:02:10 +10:00
Ian Wienand
12b60c4088 Mount /sys RO
As noted inline, this works around potential issues by being a strong
indication you are in a container (e.g. [1]).  Since nothing should be
changing anything on the host/build system, this is a generically
safer way to operate.

[1] https://bugzilla.redhat.com/show_bug.cgi?id=1975588

Change-Id: Ic6802c4ffc2e825f129af10717860a2d1770fe80
2021-07-05 11:45:02 +10:00
Steve Baker
a6e0bf83db Add a growvols utility for growing LVM volumes
There is currently no automated way of growing LVM volumes on boot
like single partition images do with their growroot mechanism. This
lack likely contributes to LVM not being widely used on VM and
baremetal workloads, since growing to the full disk requires workload
knowledge to determine which volumes to grow and by what amount.

The growvols element contributes a growvols python script which can be
run on firstboot (via systemd or cloud-init) or manually via
automation such as ansible. It is also an interactive script which
displays the full list of modifying commands before prompting for
confirmation to run them all.

By default the script will grow the root volume, but arguments allow
any volume to grow by a specified amount, or a percentage of the
available disk space.

Blueprint: whole-disk-default
Change-Id: Idcf774384e56cce03e56c0e19c7d08a768606399
2021-07-01 11:16:31 +12:00
HeroicHitesh
687a3127d3 Migrate from testr to stestr
* Replace .testr.conf by .stestr.conf for migration and update
  .gitignore, test-requirements.txt and lower-constraints.txt
  files accordingly
* Use py3 as the default runtime and 3.18.0 as the minversion
  for tox
* Add group_regex to run all tests

Signed-off-by: HeroicHitesh <email.hiteshkumar@gmail.com>
Change-Id: I704356082e2c25d21aff3c5433efa077259b0b1d
2021-06-30 18:58:35 +05:30
Ian Wienand
ba5bcce036 cache-url : turn down verbose curl
curl's "-v" is a bit too verbose for "-x", especially when what you're
downloading bounces through a few redirects as is common.  Turn this
down and put it behind "-xx" or greater.

Change-Id: I6d91166bb237f2a1818cae7532e794ef0f01288b
2021-06-24 10:09:00 +10:00
Steve Baker
ab8d2910c4 Add element block-device-efi-lvm
Element block-device-efi-lvm has been added which is like
block-device-efi but defines an LVM logical group in the root
partition. Three logical volumes are defined in that group, mounted to
/, /var, and /home.

This volume layout will not meet all requirements, but this is more of
an example demonstrating the capability to encourage more usage of
this existing feature.

This is based on the overcloud-partition-uefi element in
tripleo-image-elements, and I believe this capability is too useful to
have the only working example buried in a related project repo.

This change also fixes the element string matching in
_arg_defaults_hack, the 'vm' test was also matching against 'lvm' and
'block-device-efi-lvm' elements. Also the 'block-device-' test now
properly tests for this being the prefix of the block-device element.

This change also makes block-device-efi fsck-passno compliant with the
documentation[1] so that / has value 1 and all other mounts are set to
2.

[1] https://www.man7.org/linux/man-pages/man5/fstab.5.html

Change-Id: If86a0e49186ce5a65cc0084101d31ce59a97b854
Blueprint: whole-disk-default
2021-06-01 17:27:28 +12:00
Zuul
75ee18b01b Merge "bootloader: remove extlinux/syslinux path" 2021-05-28 04:51:23 +00:00
Matthew Thode
2ff65d512e
Do not uninstall non-installed packages
The bootloader element uses the grub-efi-$arch package to remove already
installed packages (for redhat).  The uninstall of a non-installed
package fails with a non-zero exit code on gentoo.  The gentoo base
tarball does not include a bootloader and the grub-efi-$arch package is
only used for uninstalls, so zero out the variable to allow bootable
images to be generated.

Change-Id: If8572abd6e19a02f2f63b33d4f83a7054774d7e6
Signed-off-by: Matthew Thode <mthode@mthode.org>
2021-05-25 23:32:16 -05:00
Ian Wienand
bbd28193aa Remove octvia-v1-dsvm-* jobs
These haven't existed since I3082962841d3b645f3cbd1a6b41fc7fb28dcf7e6?

Change-Id: Icb33f4b31c1863befc1b0ce2440f3084c1c366eb
2021-05-26 14:22:30 +10:00