- Change the alias example at the top of the file to use RHEL 9 -> 9.4
instead of 8 -> 8.10 which is no longer true for the test.
- Fix some comment typos.
- Clean trailing whitespaces.
The test relies on the existence of the /etc/dnf/vars/releasever file
and the value it specifies. In SAP images, this file specifies the
locked release version for the system and it is written by the image
definition itself. This makes it a good candidate for ensuring we are
using the correct distro version when building the image.
However, RHEL 8.10 SAP images don't lock the distro version because 8.10
is the last minor version in the RHEL 8 cycle.
Let's override the alias for RHEL 8 to point to 8.8, which is a version
that should contain a releasever. The exact value we use isn't
important. What we are testing here is the mechanism for resolving
aliases.
for these 2 scripts we make cleanup() defined in the outer scope and
make sure that it executes on EXIT rather than RETURN which makes it
possible to stick the journalctl killing functionality inside of the
same function.
in many files there was a secondary call to `trap` for the sole purpose
of killing jornalctl (watching worker logs) so that GitLab CI doesn't
hang.
The issue with this is that sometimes the cleared the trap which invokes
the cleanup() function without reinstating it again (not everywhere).
Instead of doing this back-and-forth just make sure we don't leave any
journalctl processes dangling in the background!
NOTES:
- for some scripts, mainly ostree- ones there was no cleanup trap
present, but instead `trap` was configured inside the build_image() function.
The trouble is that this function is executed multiple times and
$WORKER_JOURNAL_PID changes value between these multiple executions.
That's why these scripts introduce the cleanup_on_exit() function where
we make sure to kill any possible dangling journalctl processes.
- The name `cleanup_on_exit()` is chosed because these same scripts
often have a helper function named clean_up() which is sometimes used to remove
virtual machines and other artifacts between calls of build_image().
The osbuild version should correspond to the version in the Schutzfile
for the old worker.
Furthermore the commits should be pulled from the rhel-9-cdn
repositories.
Nightly pipelines test against older osbuild-composer versions so we
need to still modify the kickstart file until the feature reaches the
nightly composes.
Use the new installer customizations to build and boot an unattended
installation and add the users to the sudoers with NOPASSWD enabled.
This is added both to he base installer test (installers.sh) and the
ostree test (ostree-ng.sh). For the ostree test, we keep the mkksiso
step to retain the remote configuration change. The modksiso() function
is changed to explicitly read the osbuild.ks file since we don't want to
modify the osbuild-base.ks file and we want to ensure that the kernel
command line argument points to the osbuild.ks file.
killing the worker journal via EXIT signal prevents the cleanup()
function from executing!
NOTE: this is a problem in other scripts as well and needs to be
refactored there too!
The RHEL nightly composes still contain old osbuild-composer version,
which does not have an explicit dependency on osbuild-depsolve-dnf
package.
As a result, running the latest upstream base_tests.sh on RHEL nightly
composes fails due to osbuild-depsolve-dnf not being installed.
Workaround this in the test case by explicitly installing the
osbuild-depsolve-dnf package in case the osbuild-composer version is
lower than the one which has an explicit dependency on
osbuild-depsolve-dnf.
Signed-off-by: Tomáš Hozza <thozza@redhat.com>
The image type supports uploading to both s3 and container registries.
Right now we only care about getting it in Koji, so let's just add it to
the s3 upload section.
The container registry test also embeds containers in the image, which
the iot-bootable-container doesn't support (yet).
Specify the resource pool when importing the VMDK to the VCenter.
This should prevent the following error:
govc: default resource pool resolves to multiple instances, please specify
Signed-off-by: Tomáš Hozza <thozza@redhat.com>
The test would loop for the job timeout limit waiting for composer
container, in case the composer API does not come up for whatever
reason. Modify the test case to wait only for 12x 10s before failing.
In case the composer API does not come up, print the logs from the
composer container and exit with non-zero code.
Signed-off-by: Tomáš Hozza <thozza@redhat.com>
Add test case for verifying that distros and repo configurations work
with and without the dot-notation in the on-prem scenario. Run the test
case on the latest RHEL 8 and 9 versions in development and verify the
default distro aliases behavior on them.
Signed-off-by: Tomáš Hozza <thozza@redhat.com>
Extend the `api.sh` to allow testing compose requests with distro name
which does not use dot-notation (specifically when the dot is removed
from the distro name as it used to be in the past). In addition to that,
allow also testing the distro alias using distro name without the minor
version in compose requests.
Enable these two new test variants in the CI.
Signed-off-by: Tomáš Hozza <thozza@redhat.com>
Update RHEL 8.9 and 9.3 repo definitions to use the CDN repos, since
these are already GA.
Add SAP repositories to all RHEL repo configs, to be able to build the
SAP image for testing purposes.
Fix minor issues found in repos (e.g. 8.8 RT repo pointing to 8.7,
etc.).
Signed-off-by: Tomáš Hozza <thozza@redhat.com>
Using the DISTRO_CODE with dot to separate major and minor version is
breaking cloud-image-val testing. Specifically, the tool is using
regular expression to search for an uploaded image, but the expression
is not expecting any dot in the version.
This will be fixed in [1], but merging it will take some time due to CIV
CI being currently broken. Due to this, workaround the problem for now
by making sure that the TEST_ID, which is used to construct the
IMAGE_NAME, does not contain any dot in the DISTRO_CODE.
[1] https://github.com/osbuild/cloud-image-val/pull/290
Signed-off-by: Tomáš Hozza <thozza@redhat.com>
Where applicable, modify all repo config filenames to use a dot
to separate the release major and minor version. Modify test cases
to not remove dot from the distro version any more.
Existing tests will be extended (or new tests added) to explicitly test
backward compatibility and ensure that using old distro names without a
dot still works.
Signed-off-by: Tomáš Hozza <thozza@redhat.com>
While I was the one to push for TEST_MODULE_HOTFIXES to be passed as an
argument to `api.sh`, when it was implemented, this is turning our to be
impractical. I would like to extend `api.sh` to test distro names with
and without the dot to separate major and minor version and also to test
the ability to specify distro name explicitly (e.g. a distro alias).
Passing all of these new options and their combinations would make the
CLI go wild.
Signed-off-by: Tomáš Hozza <thozza@redhat.com>
Update the osbuild/images to the version which introduces "dot notation"
for distro release versions.
- Replace all uses of distroregistry by distrofactory.
- Delete local version of reporegistry and use the one from the
osbuild/images.
- Weldr: unify `createWeldrAPI()` and `createWeldrAPI2()` into a single
`createTestWeldrAPI()` function`.
- store/fixture: rework fixtures to allow overriding the host distro
name and host architecture name. A cleanup function to restore the
host distro and arch names is always part of the fixture struct.
- Delete `distro_mock` package, since it is no longer used.
- Bump the required version of osbuild to 98, because the OSCAP
customization is using the 'compress_results' stage option, which is
not available in older versions of osbuild.
Signed-off-by: Tomáš Hozza <thozza@redhat.com>