Commit graph

2588 commits

Author SHA1 Message Date
Gianluca Zuccarelli
a198b292b5 test/cases: include rhel9 in filesystem test 2021-08-25 13:18:12 +02:00
Gianluca Zuccarelli
34ade35a5d rhel90: filsystem customization tests 2021-08-25 13:18:12 +02:00
Gianluca Zuccarelli
8374af3e6d distro: rhel90 custom filesystem support 2021-08-25 13:18:12 +02:00
Gianluca Zuccarelli
382b5370c0 distro: export common types
squash

unused type
2021-08-25 13:18:12 +02:00
Juan Abia
ee0af8b901 retry subscribing to RHN 2021-08-25 13:12:08 +02:00
Juan Abia
1e52484688 remove all rhn subscriptions before registering a new one 2021-08-24 11:53:08 +02:00
Gianluca Zuccarelli
b782ecaf1f distro: rhel85 internal tests 2021-08-24 00:22:29 +02:00
Gianluca Zuccarelli
d892909b2c test/cases: add filesystem failed case test 2021-08-24 00:22:29 +02:00
Gianluca Zuccarelli
d4403a03c0 distro: rhel85 add sub mounts to allow list 2021-08-24 00:22:29 +02:00
Tomas Hozza
a8d503e5b9 RHEL-85/90: modify the x86_64 EC2 images dracut configuration
Change the x86_64-specific dracut configuration of RHEL-8.5 and RHEL-9.0
EC2 and AMI images to not include `xen-netfront` driver and add `nvme`
driver, which was previously not included. Since the configuration is no
longer Xen-specific, rename the configuration file to `ec2.conf`.

Justification:
There is no reason to put `xen-netfront` to initramfs as EC2 images don't
boot from network root. In addition, add `nvme` driver to handle the case
when initramfs is getting forcefully rebuild on a Xen instance (and not able
to boot on Nitro after that).

Related to https://issues.redhat.com/browse/COMPOSER-1096.

Signed-off-by: Tomas Hozza <thozza@redhat.com>
2021-08-23 16:01:11 +02:00
Christian Kellner
20258bd45e distro/rhel90: use unified grub config
Feodra 34 and thus RHEL 9 switched to a unified grub configuration,
which means that the main grub config is always located in the same
location, /boot/grub2/grub.cfg.[1] osbuild has used this scheme for
hybrid boot on x64 but not on pure efi systems like aarch64. The
new osbuild option `uefi.unified` was introduced to select that new
unified grug cfg scheme also for those, pure efi, systems. Use that.

[1] https://fedoraproject.org/wiki/Changes/UnifyGrubConfig
2021-08-23 13:48:26 +02:00
Christian Kellner
22bff1df71 osbuild2/grub2: add unified option for uefi
The `uefi.unified` option indicates whether the `org.osbuild.grub2`
will use the unified grub configration scheme[1] used by Fedora 34
and thus RHEL 9.
NB: This requires osbuild version >= 32.

[1] https://fedoraproject.org/wiki/Changes/UnifyGrubConfig
2021-08-23 13:48:26 +02:00
Christian Kellner
fcace40710 osbuild2/grub2: add install option for uefi
The `uefi.install` option indicates whether the `org.osbuild.grub2`
stage will copy the efi binaries from the build root to the `/boot`
directory in the tree.

Co-Developed-by: Achilleas Koutsou <achilleas@koutsou.net>
Co-Developed-by: Antonio Murdaca <runcom@linux.com>
2021-08-23 13:48:26 +02:00
Achilleas Koutsou
321dcc56bf distro/rhel90: copy devices and mounts changes
Rebase brings RHEL 9.0 definition with old Mounts and Devices. Changes
applied to new distro pipelines and stage options.
2021-08-21 13:39:10 +02:00
Achilleas Koutsou
745443181e osbuild2: remove stage-specific device types
Devices unlike stage options, shouldn't be stage specific.
There is only one type of device so far, the loopback device, which
is already defined as a separate type.

The top level Devices type is simply an alias to a Device map.

The mkfs stages require a single device with a specific key ("device").
These stages accept only one device in their NewStage() function for
convenience and create the Stage struct with the required key.

The zipl.inst stage requires a device labeled 'disk' as well as the rest
of the devices that correspond to each partition. The disk device is
passed to the New stage function separately and added to the Stage
devices with the required key.

Signed-off-by: Achilleas Koutsou <achilleas@koutsou.net>
2021-08-21 13:39:10 +02:00
Achilleas Koutsou
c74d13daf8 osbuild2: remove stage-specific mount types
Mounts unlike stage options, shouldn't be stage specific. We have
filesystem specific mount types, differentiated by their type string.
Mounts can define their own additional options if necessary.

The top level Mounts type is simply an alias to a Mount array.

Signed-off-by: Achilleas Koutsou <achilleas@koutsou.net>
2021-08-21 13:39:10 +02:00
Gianluca Zuccarelli
613ad0b862 disk: refactor partition table size & start points 2021-08-21 02:54:38 +02:00
Gianluca Zuccarelli
b885b37333 docs: add rhel85 filesystem support release note 2021-08-21 02:54:38 +02:00
Gianluca Zuccarelli
280e1b6e3d distro: rhel85 declarative partition tables 2021-08-21 02:54:38 +02:00
Gianluca Zuccarelli
e21eee273c disk: move partition creation to disk package 2021-08-21 02:54:38 +02:00
Gianluca Zuccarelli
87c176503a distro: rhel85 streamline to single function 2021-08-21 02:54:38 +02:00
Gianluca Zuccarelli
49540ee91a rhel85: filsystem customization tests 2021-08-21 02:54:38 +02:00
Gianluca Zuccarelli
6c4da2b821 distro: rhel85 create partition helper functions 2021-08-21 02:54:38 +02:00
Gianluca Zuccarelli
346eef7477 distro: rhel85 validate /usr mountpoint size 2021-08-21 02:54:38 +02:00
Gianluca Zuccarelli
4527477079 test/cases: filesystem integration test 2021-08-21 02:54:38 +02:00
Gianluca Zuccarelli
ad39aab854 distro: allow valid rhel85 mountpoint subdirs 2021-08-21 02:54:38 +02:00
Gianluca Zuccarelli
6abe88f36d distro: update rhel8.5 partition table creation 2021-08-21 02:54:38 +02:00
Gianluca Zuccarelli
dad535d295 distro: add mountpoint allow list for rhel8.5 2021-08-21 02:54:38 +02:00
Diaa Sami
ba5f49c592
Return error when write_files exists in cloud-init (#1644)
* Return error when write_files exists in cloud-init

Since the script adds a `write_files` key in cloud-init user-data, it
should return error if this key already exist in the input file.

Co-authored-by: Ondřej Budai <obudai@redhat.com>
2021-08-20 22:24:38 +02:00
sanne
9fab5def90 dbjobqueue: Reduce error noise in rollback check
If the transaction is already closed don't log the rollback failure as
an error, it means it was successfully committed.
2021-08-20 15:42:57 +02:00
Jakub Rusz
810248fc52 ci: minor fixes for nightly testing
Updating rules for Installer and Regression testing and fixing failures
if certain variables are not set.
2021-08-20 13:21:45 +02:00
Alexander Todorov
42480f7b26 tests: Cleanup leftover 8.4 references 2021-08-19 12:21:52 +02:00
Jakub Rusz
a3ac31a483 ci/tests: scheduled cloud-cleaner for Azure
This introduces a script to run cloud-cleaner with a schedule. It's
currently working with Azure only and therefore needed a change to
cloud-cleaner code as well. Using azure-cli it gets a list of resources
from $AZURE_RESOURCE_GROUP and then sorts out only resources that
are older than $HOURS_BACK and are not storage accounts.
Then it processes the list further leaving only list with unique
TEST_ID to supply to the cloud-cleaner.
2021-08-19 09:04:28 +02:00
Jakub Rusz
d927bfbd30 tests: rename Azure resources in API test
Use TEST_ID for any resources created in Azure. Also create all
necessary vm network resources in advance to have predictable names
using TEST_ID as well.
2021-08-19 09:04:28 +02:00
Ondřej Budai
96d5f4e8f7 schutzbot: update images for RHEL 9
Previously:
We used images built from pre-mass-rebuild composes but installed packages
from post-mass-rebuild composes. This caused weird stuff like sshd crashing
when installing non-related packages via dnf.

Now:
Both the image and repositories are post-mass-rebuild ones. This should solve
these weird issues.

Signed-off-by: Ondřej Budai <ondrej@budai.cz>
2021-08-19 01:57:35 +02:00
Ondřej Budai
1e2ba4da64 upload/azure: use cheaper storage accounts
Previously, we used RAGRS which means that all our data was always replicated
to at least two regions for increased safety. This is cool but expensive, this PR
switches the API to use LRS that just uses one region.

Signed-off-by: Ondřej Budai <ondrej@budai.cz>
2021-08-17 17:51:23 +02:00
Ondřej Budai
7a298c838b tests: remove all disabling conditions for RHEL 9.0
RHEL 9.0 isn't yet in .gitlab-ci.yml so this actually doesn't change in test
runs but it should make enabling of the tests easier.

Signed-off-by: Ondřej Budai <ondrej@budai.cz>
2021-08-17 16:54:22 +02:00
Ondřej Budai
fa111f82a4 test: do not install podman-plugins on RHEL 9.0
They are not yet shipped in RHEL 9.0, this makes the tests subpackage
installable.

Signed-off-by: Ondřej Budai <ondrej@budai.cz>
2021-08-17 16:54:22 +02:00
Ondřej Budai
0336612160 test/ostree: add test case for RHEL 9.0
Signed-off-by: Ondřej Budai <ondrej@budai.cz>
2021-08-17 16:54:22 +02:00
Ondřej Budai
3f7e815a80 tests: define compose url also for RHEL 9.0
Signed-off-by: Ondřej Budai <ondrej@budai.cz>
2021-08-17 16:54:22 +02:00
Ondřej Budai
9ae81cbbeb test/libvirt: enable uefi test for RHEL 9.0
Signed-off-by: Ondřej Budai <ondrej@budai.cz>
2021-08-17 16:54:22 +02:00
Ondřej Budai
91dd6e3346 test/api: add test case for RHEL 9.0
Signed-off-by: Ondřej Budai <ondrej@budai.cz>
2021-08-17 16:54:22 +02:00
Ondřej Budai
1516c1987e test/image: fix pipeline exports for v2 manifests
Previously, we just assumed that all test manifests are of version 1, or we
should export the pipeline named assembler. However, this is no longer true
in RHEL 8.5 and 9 - they are only manifest v2 and they don't have a pipeline
named assembler.

This commit introduces a new way to guess the export name - if the manifest
is of version 1, we just export the assembler. In the case v2 manifest, the
last pipeline is exported.

Signed-off-by: Ondřej Budai <ondrej@budai.cz>
2021-08-17 15:53:08 +02:00
Brian C. Lane
097eb9f04f Makefile: Add scratch build target
Sometimes you want to build an rpm without the tests and without running
%check
2021-08-16 13:16:53 +02:00
Tomas Hozza
634dcc0f25 rhel85/90: regenerate aarch64 ami and ec2 image test cases
Signed-off-by: Tomas Hozza <thozza@redhat.com>
2021-08-13 08:24:37 +02:00
Tomas Hozza
a8ac012ebe rhel90: fix a typo in RHBZ number in a comment
Signed-off-by: Tomas Hozza <thozza@redhat.com>
2021-08-13 08:24:37 +02:00
Tomas Hozza
6edf4aad49 osbuild2: add prefix parameter to the fix-bls stage
The `fix-bls` stage supports a `prefix` argument, which was not
supported in composer. Specifying this argument is necessary in case the
`/boot` mountpoint is on a separate partition.

Add the `prefix` argument to the `fix-bls` stage. Amend unit tests.

The RHEL-8.5 and RHEL-9.0 `aarch64` `ec2` and `ami` images use partitioning
with `/boot` on a separate partition. Due to this, the pipeline must specify
a non-default prefix to the `fix-bls` stage.

Signed-off-by: Tomas Hozza <thozza@redhat.com>
2021-08-13 08:24:37 +02:00
Tomas Hozza
7ac1d68fb6 rhel85/90: allow specifying the boot partition for the grub2 stage
Specifying the boot partition filesystem UUID in grub2 stage is required
in case the `/boot` mountpoint is on a separate partition. This is the
case of RHEL-8.5 and RHEL-9.0 `ami` and `ec2` images.

Extend `disk.PartitionTable` with a new `BootPartition` method, which
returns a pointer to partition with FS mountpoint `/boot` if there is
such partition, or `nil` otherwise.

Extend the RHEL-8.5 and RHEL-9.0 code creating options structure for
grub2 osbuild stage to include the boot partition in case it has been
provided.

Signed-off-by: Tomas Hozza <thozza@redhat.com>
2021-08-13 08:24:37 +02:00
Tomas Hozza
a9c280a2fc rhel85/90: use random FS UUID for /boot partition on ec2 and ami
Signed-off-by: Tomas Hozza <thozza@redhat.com>
2021-08-13 08:24:37 +02:00
Tomas Hozza
4a83c0596f rhel85/90: don't use the same part UUID for /boot and / on ec2 images
Signed-off-by: Tomas Hozza <thozza@redhat.com>
2021-08-13 08:24:37 +02:00