Commit graph

695 commits

Author SHA1 Message Date
sanne
08f668200a .gitlabci.yml: Add fedora-35 testing
Enable F34 testing on AWS as there is nothing blocking it. F34 is not
yet supported on `rhos-01` as there is no runner definition.

Remove F33 repositories for testing and add repo definitions for F34 and
F35.

Signed-off-by: Tomas Hozza <thozza@redhat.com>
2022-02-03 14:51:07 +01:00
Sanne Raymaekers
1a6f6fdc4b test: Drop ANSIBLE_STDOUT_CALLBACK
There's conflicting ansible versions in the 86 nightlies and epel. There
should be a correct combination of plugins which fixes the callback on
86. But let's drop it to unblock for now.
2022-02-03 00:24:59 +01:00
Achilleas Koutsou
93c0485531 tools/provision: remove json_query usage from ansible playbooks
`json_query` requires python3-jmespath which, while available in the
repos, it can sometimes cause issues when the ansible interpreter is
different from the system interpreter.
The `json_query` is only used in a handful of locations that can easily
be served by `jq`, which we use in other places already.
2022-02-03 00:24:59 +01:00
sanne
fe00e1efd3 containers/osbuild-composer: Allow dnf-json to accept http connections
Revert 83e16afda4: With dnf-json running
in a container it's easy to run it standalone.
2022-02-02 11:15:46 +01:00
Tom Gundersen
11e2ae4528 cloudapi/v2: add koji-specific tests
These are based on the existing tests for the koji API, making sure the coverage is the same.
2022-02-01 20:28:40 +00:00
Achilleas Koutsou
22b923dee3 test: regenerate RHEL 9.0 installer test manifest 2022-02-01 19:27:47 +01:00
Christian Kellner
669d3e0734 distro/rhel86: fix ec2 boot partition for arm64
It should be `1048576` (exactly 512 MiB), like it is for all other
distributions. It somehow got mingled in when the distribution was
forked off from 8.5/9.0 beta (1048676 to 1048576 strongly suggests
a sed command was involved, so we blame that).
2022-01-31 11:46:09 +01:00
Juan Abia
653cc76408 test/vmware: add test tag to vmware objects
add tag "gitlab-ci-test" to the created vm inside the test, so it can be
cleaned later.
2022-01-31 09:26:51 +01:00
Christian Kellner
c5feb93279 distro/rhel90: no uuids in dos partition table
The unification of the partition table also introduced uuids and
types in uuid form for partition tables in dos layout, sill used
on PPC64LE and s390x. The org.osbuild.sfdisk stage did work with
that but produced a `/boot` partition with the wrong type, which
grub2 refused to read from and thus prevented boot. Fix this by
removing uuids from the dos partition tables.

Reported-by: Jakub Rusz <jrusz@redhat.com>
2022-01-28 12:16:39 +01:00
sanne
1dbbc37cac ostree: Use stable installer image for PRs 2022-01-27 14:07:23 +01:00
Ondřej Budai
32651a610e test/koji: remove the koji-cli patch
The fix is already in Koji 1.27.1 which should be available in all downstreams
we are testing against.

See https://src.fedoraproject.org/rpms/koji

Signed-off-by: Ondřej Budai <ondrej@budai.cz>
2022-01-26 14:44:27 +01:00
Alexander Todorov
864a1a2330 tests: Don't execute koji.sh inside nightly CI pipelines 2022-01-26 11:39:43 +01:00
Alexander Todorov
1bd852ceef tests: Add missing /var/log/audit to explicit checks
- the /var/log/audit mountpoint has been added previously to the
  blueprint but wasn't explicitly checked
- reordered the list of mountpoints to match the blueprint
  (alphabetically)
- added logging of successfull results we that QE can see what has been
  tested in the logs and use it for verification purposes.

Related: rhbz#2002727, rhbz#2001891
2022-01-25 11:59:20 +01:00
Jakub Rusz
1c2c97c900 tests/api: Make cleanup best effort
We should not fail on missing variables or errors during cleanup. The
test can fail in any stage and the cleanup should be run full each time.
2022-01-19 19:56:28 +01:00
Jakub Rusz
98f5623914 test/cases: properly kill journal for installers.sh
CI gets stuck if we don't kill the journal watcher on exit.
See bc1a7dc30c for more info.
2022-01-19 09:59:09 +01:00
Tomas Hozza
ec6099f7f6 RHEL-86: port over the RHEL-90 pipeline refactoring
Port all of the pipeline refactoring done to RHEL-90 to RHEL-86. Both
distros now use the same approach.

Regenerate all RHEL-8.6 and CentOS 8 image test cases.

[1] https://git.centos.org/centos/kickstarts/tree/master

Signed-off-by: Tomas Hozza <thozza@redhat.com>
2022-01-11 17:08:19 +01:00
Tomas Hozza
960aad0b0a RHEL-86: apply subscriptions and RHSM configuration only on RHEL
RHSM configuration is now applied conditionally only on RHEL. The same
applies to the customization to subscribe the system on first boot.

The reason is that the CentOS `@core` package group does not contain
`subscription-manager`. Thus it is not installed on CentOS Stream by
default and also CentOS 8 image definitions don't apply any changes
to the RHSM configuration [1].

In addition, make sure to not install any subscription-manager
packages on CentOS Stream images.

Regenerate all CentOS 8 image test cases.

[1] https://git.centos.org/centos/kickstarts/tree/master

Signed-off-by: Tomas Hozza <thozza@redhat.com>
2022-01-11 17:08:19 +01:00
Tomas Hozza
43ea54f8de RHEL-90: replace ec2X86_64BaseTreePipeline by osPipeline
Move the x86_64 specific configuration from `ec2X86_64BaseTreePipeline`
to x86_64-specific image configurations for EC2 / AMI images. As a
result, remove the `ec2X86_64BaseTreePipeline` entirely and replace it
with `osPipeline`.

Regenerate image test cases. While there are changed in the manifests,
the actual image configuration didn't change at all and thus the
`image-info` report was not changed.

Signed-off-by: Tomas Hozza <thozza@redhat.com>
2022-01-11 17:08:19 +01:00
Tomas Hozza
8130c892f0 RHEL-90: move RHSM configuration to ImageConfig structure
Move the RHSM configuration settings to `ImageConfig` structure and use
when handling subscriptions in `osPipeline`, `ec2BaseTreePipeline` and
`ostreeTreePipeline` functions.

Regenerate image test cases. While there are changed in the manifests,
the actual image configuration didn't change at all and thus the
`image-info` report was not changed.

Signed-off-by: Tomas Hozza <thozza@redhat.com>
2022-01-11 17:08:19 +01:00
Tomas Hozza
b200fa8fcd RHEL-90: introduce default image config data structure
Introduce a new data structure `ImageConfig` holding the default OS
configuration applied when building an image. The structure can be used
to hold the default image configuration on the distribution level with
possible overrides defined on the image-type level.

As a starting point, move hard-coded default values and configuration
common for `osPipeline`, `ec2BaseTreePipeline` and `ostreeTreePipeline`
to the distribution and image-type default image configuration. This is
preparing the ground for merging all of these three pipeline functions
into `osPipeline`, which will produce the appropriate OS pipeline based
on the image-type configuration and the fact if it is rpmOstree or not.

Regenerate affected EC2 and AMI manifests. There is however no change in
the resulting image configuration and image-info report.

Signed-off-by: Tomas Hozza <thozza@redhat.com>
2022-01-11 17:08:19 +01:00
Jakub Rusz
564148b743 test/cases: Add test to verify osbuild-composer works after upgrade
This test provisions a RHEL-8.6 VM locally, installs osbuild-composer on
it, upgrades the system to RHEL-9.0 and verifies osbuild-composer still
works by building a simple qcow image.
2022-01-06 21:30:46 +01:00
Juan Abia
211dd88ccb test/cases: divide regression test
split regression-composer-works-behind-satellite in two different tests.
As they test independent funcionalities.
2022-01-06 09:45:38 +01:00
Tomas Hozza
a5319e78d4 (re)generate image test cases for image-installer on all distros
The existing test cases for `image-installer` image type were not
regenerated as part of PR #2135 which introduced 'image_type_tags'
because regenerating them using `generate-all-test-cases` failed on them
due to trying to analyze them using 'image-info'. These test cases were
most probably originally generated manually with --keep-image-info
option passed to `generate-test-cases`. And I missed that their
regeneration failed at that time.

Add the `image-installer` image type to all distros in
`distro-arch-imagetype-map.json` and (re)generate the test cases for it.

The image test case for CentOS Stream 9 is not generated, because there
are no repos defined yet for the distro. This is part of the CentOS 9
PR #2142.

Signed-off-by: Tomas Hozza <thozza@redhat.com>
2021-12-21 09:59:17 +01:00
Juan Abia
786fc2719d test: make test more resilient
During manual cleanup of unused resources, the storage account can get
removed. The current storage account is not possible to remove
mannually, but adding this check to make it more resielient in future
scenarios.
2021-12-17 16:05:35 +01:00
Tomas Hozza
33c7da9dc3 tools: use image_type_tags in repos used for image test cases
Use image_type_tags in repo definitions used for generating image test
cases. Enhance the `generate-test-cases` script to take the
image_type_tags into account when creating a compose request for a
specific image test case.

The motivation for the change is to keep the list of repositories in the
compose request of a image test case as small as possible. Previously,
all of the defined repositories were part of each image test cases for a
specific architecture, even those that were not needed.

Regenerate affected image test cases.

Signed-off-by: Tomas Hozza <thozza@redhat.com>
2021-12-16 18:07:50 +01:00
sanne
60d4f5a751 composer: Disable artifacts for the service
When backed by a DB, composer has no need of a queue directory.

This also addresses "Error moving artifacts for job" logging noise.

Signed-off-by: sanne <sanne.raymaekers@gmail.com>
2021-12-16 17:04:08 +00:00
Thomas Lavocat
8d67b90a2e Tests: trim dependencies for test generation 2021-12-16 10:21:25 +01:00
sanne
3686e31e49 test/api: Integration test for 3rd-party repositories 2021-12-15 20:12:49 +01:00
Thomas Lavocat
53cb1b952e Tests: generation works with dnf-json.socket down
Test that the test cases generation will properly start the
dnf-json.socket when needed.
2021-12-15 09:41:32 +01:00
sanne
83e16afda4 dnf-json: Can be started without systemd
Instead of starting the socket in the entrypoint, make dnf-json able to
bind on the unixsocket by itself.
2021-12-15 09:41:32 +01:00
Juan Abia
9debf97f37 test/cases: tag gcp resources
gcp test images are not tagged. Now we create the "gitlab-ci-test"
labbel so it's easier to remove them later.
2021-12-14 12:20:31 +01:00
Tomas Hozza
d115baec03 Regenerate image test cases
Signed-off-by: Tomas Hozza <thozza@redhat.com>
2021-12-13 12:33:16 +01:00
Ondřej Budai
df5074f509 test/regression: fix journalctl for workers
Our workers are not named osbuild-worker but usually something like
osbuild-worker@1. Let's steal the code that determines the unit name
from other tests.

Signed-off-by: Ondřej Budai <ondrej@budai.cz>
2021-12-09 12:02:24 +01:00
Ondřej Budai
1ac1409753 test/regression: remove the composes after the build is done
Otherwise, we are leaking disk space.

Signed-off-by: Ondřej Budai <ondrej@budai.cz>
2021-12-09 12:02:24 +01:00
Ondřej Budai
47551ffc67 test/regression: fix if formatting
Signed-off-by: Ondřej Budai <ondrej@budai.cz>
2021-12-09 12:02:24 +01:00
Jakub Rusz
4455fba187 tests/ostree-ng: add sudo to skopeo copy
Permissions have changed since a new version of weldr-client.
2021-12-08 12:12:53 +01:00
Ondřej Budai
969e4296f0 test/koji: patch koji 1.27 that accidentally removed --keytab
See https://pagure.io/koji/pull-request/3172

Signed-off-by: Ondřej Budai <ondrej@budai.cz>
2021-12-08 12:12:53 +01:00
Jakub Rusz
5eb8709a18 tests: add sudo to get_metadata function
With new weldr-client package the metadata tar archive created has
permissions set to 600 instead of 644 which causes permission failures
when interacting with it. Adding sudo to resolve that.
2021-12-08 12:12:53 +01:00
Tomas Hozza
523bcdd98e generate-all-test-cases: add --build-rpms option
Add `--build-rpms` option which will make the script build osbuild-composer
RPMs on the remote runner from the sources which were copied over. These
RPMs are then installed on the system, before any image test cases are
generated.

Signed-off-by: Tomas Hozza <thozza@redhat.com>
2021-12-07 09:19:41 +01:00
Achilleas Koutsou
db6aefc600 test/data/repositories: switch to latest rpmrepo for RHEL 9.0
Signed-off-by: Achilleas Koutsou <achilleas@koutsou.net>
2021-12-03 16:49:09 +00:00
Achilleas Koutsou
ba320c9ea0 test/api: update database query for getting job result
- Filter on manifest-id-only type jobs
- Save entire result

Co-authored-by: Sanne Raymaekers <sanne.raymaekers@gmail.com>
2021-12-03 16:49:09 +00:00
Achilleas Koutsou
3ee31c23be test/api: image type as argument
Script is run with the image type to build as the argument.
The target / cloud service is selected based on the image type
specified. This is how the API actually works now: Only an image type
can be specified.

The script now supports all the blobby image types for testing:
- edge-commit
- edge-container
- edge-installer
- image-installer
- guest-image (qcow2)
- vsphere (vmdk)

These are image types that are uploaded to S3 and provided to the user
as an object to download rather than a VM image on a cloud provider.

To verify the cloud api compose request options for the qcow2 and vmdk
image types, download the object and inspect it using image-info.

Checks if postgresql is installed and that user1 and user2 exist in the
passwd file.

Signed-off-by: Achilleas Koutsou <achilleas@koutsou.net>
2021-12-03 16:49:09 +00:00
Achilleas Koutsou
24b83738f4 test/data/repositories: switch to nightly compose for RHEL 9.0
Temporarily switch to the nightly devel composes for RHEL 9.0.
We're testing new packages and changes right now (like coreos-installer)
and it takes time to make new snapshots every time.

Signed-off-by: Achilleas Koutsou <achilleas@koutsou.net>
2021-12-02 12:12:05 +01:00
Achilleas Koutsou
4035b0d859 test/data: update RHEL 9.0 test repositories 2021-12-02 12:12:05 +01:00
sanne
ee8e551c5f test: Fixes for 8.5-ga 2021-12-02 10:41:04 +01:00
Tomas Hozza
bab13f3c90 RHEL-9.0: replace the @core package group with a static list of packages
Don't use the `@core` package group in image definitions, because it is
not intended as the minimal package set for virtual / cloud images. In
addition, its content is changing without us knowing, which has
consequences such as the recent discovery of the fact that TuneD is no
longer installed by default on RHEL images, while it definitely should be.

Replace the `@core` package group with the `coreOsCommonPackageSet`
package set. The content of it is based on the latest `@core` group
definition with a few modifications, so that image package sets
never end up having the same package listed in the `Include` and `Exclude`
package set at the same time. All additions have been accompanied with a
comment and all removals have been kept commented out with a comment.

The fact that the change does not have any effect on image package sets
was verified by regenerating all RHEL-9.0 image test cases. There is
however one change in the VMDK image. Specifically the
`python3-libselinux` package have been added. The reason is that the
latest `@core` group definition was used when defining the content of
`coreOsCommonPackageSet`, however the `@core` group definition in the
RPMRepo snapshot used for the image test case didn't include the package
yet.

Signed-off-by: Tomas Hozza <thozza@redhat.com>
2021-12-01 19:45:36 +01:00
Tomas Hozza
9e757fbf11 RHEL-9.0: install tuned by default on all images using @core group
The `@core` package group used to include TuneD package by default on
RHEL-8. It has been removed from the group in Fedora as part of [1] and
inherited into RHEL-9. As a result, TuneD is no longer installed by
default on RHEL images.

After a discussion on rhel-devel there seems to be an agreement, that
TuneD should be installed by default on all RHEL virtual images. At
least we should keep the consistency in this regard with RHEL-8.

Regenerate all RHEL-9.0 image test cases.

Related to https://bugzilla.redhat.com/show_bug.cgi?id=2026709

[1] https://pagure.io/fork/adelton/fedora-comps/c/a5d4f1b6c9fcbe20cb0c38eac5048d7d45d1dd17

Signed-off-by: Tomas Hozza <thozza@redhat.com>
2021-12-01 19:45:36 +01:00
Alexander Todorov
fbf220707a tests: Small updates to docs 2021-12-01 10:12:04 +01:00
Jakub Rusz
c38ebb1643 tests/regression: skip satellite regression test on subscribed RHEl
This test does not bring any value when running on subscribed RHEL
machines.
2021-11-26 12:20:54 +01:00
Jakub Rusz
35f8707d59 tests: re-enable satellite regression test on nightlies
Test now also works with nightly repositories. Re-enabling so that we
can run it during nightly compose testing.
2021-11-26 12:20:54 +01:00