Commit graph

757 commits

Author SHA1 Message Date
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
Juan Abia
eed20916b0 test/cases: tag aws s3 resources
all resources on aws originated from a test should be tagged with
"gitlab-ci-test". this commit ensures s3 resources get tagged.
2021-11-26 10:00:42 +01:00
Tomas Hozza
8420f34b7a RHEL-9.0: install and enable TuneD by default on all EC2 images
Add TuneD package to the base package set for all EC2 image types,
including the `ami` image type. In addition to installing the package,
also enable the service by default. TuneD will by default auto-detect
the environment in which the image is running and set the most
appropriate TuneD profile, with exception of the `ec2-sap` image, which
explicitly sets a specific TuneD profile.

This change affects the `ami`, `ec2`, and `ec2-ha` image types on all
supported architectures.

Regenerate affected image test cases.

Related to RHELPLAN-102615
Fix #1972

Signed-off-by: Tomas Hozza <thozza@redhat.com>
2021-11-24 08:51:52 +01:00
Antonio Murdaca
c37b688dd2 test/rhel86-manifest: re-generate
Signed-off-by: Antonio Murdaca <runcom@linux.com>
2021-11-23 18:23:45 +01:00
Achilleas Koutsou
841dd233c7 test/data: update image-installer test manifest 2021-11-20 14:31:44 +01:00
sanne
58424b39bc test: Adapt api test metrics to namespacing 2021-11-19 22:48:25 +01:00
Tomas Hozza
c5a4946135 Test all manifests with depsolved package sets
Generated image test case manifests for all supported distros, arches and
image-types are being tested as part of distro unit tests. However due
to time constrains, the unit test does not depsolve the image's default
package sets and thus does not check if they changed in the internal
osbuild-composer's representation, compared to the generated image test
case.

Extend the `TestDistro_Manifest()` function used by the unit test to
allow depsolving image's package sets.

Introduce a new test case binary `osbuild-composer-manifest-tests`
allowing to check the manifests generated by composer for all supported
combinations of images against generated manifests, including depsolving
image's default package sets.

Introduce a new CI test case `manifest_tests.sh` executing the
`osbuild-composer-manifest-tests` binary and testing all existing image
test cases. Run it in CI on RHEL-9 runner.

Modify SPEC file to ship the newly added test case.

Signed-off-by: Tomas Hozza <thozza@redhat.com>
2021-11-19 19:50:25 +01:00
Ondřej Budai
c3a8fc19a2 templates: bump max postgres connections to 10
By default, pgxpool.Pool has 4 connections (or number of cpus if higher).
Currently, we have 3 replicas, that means max 3*4=12 DB connections.

The dequeue operation is actually blocking - when a worker is waiting for
a job, one connection is blocked. My theory is that with 16 workers, we just
don't have enough connections that causes all sorts of weird slowdowns.

This commit bumps the number of connection from one replica to 10, therefore
we should be at 30 connections in total.

Signed-off-by: Ondřej Budai <ondrej@budai.cz>
2021-11-19 13:17:10 +01:00
yih
0b4261b4da test mandate installation device
Signed-off-by: Antonio Murdaca <runcom@linux.com>
2021-11-18 18:10:09 +01:00
Antonio Murdaca
26b96483a3 edge-simplified-installer: use coreos-installer-dracut
Signed-off-by: Antonio Murdaca <runcom@linux.com>
2021-11-18 18:07:52 +01:00
sanne
028eca1b26 cloudapi/v2: Use manifest-id-only job
job dependencies:
depsolve -> manifest -> osbuild

This allows the compose handler to return the osbuild job id
immediately.
2021-11-18 10:26:17 +01:00
sanne
ea2812f48f test: Switch api tests to v2 2021-11-18 10:26:17 +01:00
Martin Sehnoutka
7c4172e8e3 test: reenable regression test for satellite
The CDN repositories require client side SSL certificates, it would have
to be specified in httpd configuration which is technically possible but
in practise it is more troubles than benefits.

It is similar case for the RH internal repositories, there is a new
issue every time we enable the test with them.

Stop wasting dev&qe time and disable the test for anything but rpmrepo
snapshots. It is better to have it running at least for few distros than
to have it disabled globally.

Also display logs for the HTTP proxy to see if there were any errors.
2021-11-16 23:04:47 +01:00
Tomas Hozza
dd0f01edf5 Use RHUI-4 for RHEL-9 EC2 image test cases
Use newly added RHUI-4 repo snapshots for all RHEL-9 EC2* image test
cases. This includes RHEL-9.0 and RHEL-9.0-Beta images. The removal
of installed repos on EC2-HA and EC2-SAP images is expected, as RHUI
client RPMs for these variants are empty for 9.0 Beta. This should
change for GA once there are updated RHUI clients RPMs available.

Signed-off-by: Tomas Hozza <thozza@redhat.com>
2021-11-16 21:01:27 +01:00
Jakub Rusz
0508a7ad1b tests: run ostree.sh tests on fedora and centos
When tools/define-compose-url.sh was sourced the tests were skipped if
they were not running on rhel. Also change the BOOT_LOCATION for
centos-8.
2021-11-16 10:46:50 +01:00
Xiaofeng Wang
85df63ce52 test: Use YAML as Ansible output format 2021-11-12 14:43:55 +01:00
Juan Abia
4c4e26d996 test/cases: use the same naming pattern on every test
make api.sh and was.sh use the same naming pattern, TEST_ID.
2021-11-11 15:42:32 +01:00
Xiaofeng Wang
ab3712fd92 test: Update ostree test scripts to support different ostree refs 2021-11-11 12:11:01 +01:00
Achilleas Koutsou
89f0613f3d test/cases: rm ostree-ng-og.sh
Obsolete test script
2021-11-10 14:54:31 +01:00
Achilleas Koutsou
e02911bc45 test/data: update manifests for edge-container images 2021-11-10 14:54:31 +01:00
Achilleas Koutsou
2cd3c71370 test/data: update RHEL 9.0 and beta manifests
Distro name is now `rhel-90` (was `rhel-90-ga`)
Beta distro name is `rhel-90-beta` (was `rhel-90`)
2021-11-10 14:54:31 +01:00
Achilleas Koutsou
90219720d4 test/ostree-simplified: variable string fixes
- All variants use the same image type names
- OSTREE_REF differs for each case
- Use OS_VARIANT in virt-install command
2021-11-10 14:54:31 +01:00
Achilleas Koutsou
affe02ceed test/api: ssh key fixes for RHEL 9.0
RHEL 9.0 AWS API test is failing with

  Host key verification failed.

This is probably due to a recent change in openssh deprecating rsa host
keys (or likely rsa keys in general).
- turn off StrictHostKeyChecking when checking groups
- use 'ed25519' type for user ssh keys

Signed-off-by: Achilleas Koutsou <achilleas@koutsou.net>
2021-11-10 14:54:31 +01:00
Achilleas Koutsou
8ef0cfe618 test/cases: support weldr-client output structure
Using get_build_info() function in all scripts where both composer-cli
and weldr-client need to be supported for consistency.
2021-11-10 14:54:31 +01:00
Achilleas Koutsou
2f30823b41 test/ostree: install python3 instead of specific version
Better cross-distro compatibility

Same as bdc428fbb7 but for all the tests.

Signed-off-by: Achilleas Koutsou <achilleas@koutsou.net>
2021-11-10 14:54:31 +01:00
Achilleas Koutsou
a025601b85 test/cases: add RHEL 9.0 and CentOS 9 cases to test scripts 2021-11-10 14:54:31 +01:00
Achilleas Koutsou
7e9f1f554e test: update test manifests for rhel-90-ga
Changes from previous (RHEL 9.0 Beta):
- Edge container: Switched to nginx from apache. Change in pipeline and
  package sets.
- All bootable x86_64: Packages for hybrid boot added (efibootmgr).
- Edge commit and edge container no longer require explicitly enabling
  greenboot services.
2021-11-10 14:54:31 +01:00
Achilleas Koutsou
c8465e3161 test/data: copy rhel-90 test manifests to -ga and -beta
All three "distros" share the same code for now. Adding manifests to
track changes before updating the RHEL 9.0 GA definitions.

Signed-off-by: Achilleas Koutsou <achilleas@koutsou.net>
2021-11-10 14:54:31 +01:00
Achilleas Koutsou
bbf825ef12 test: add repositories for rhel-90-beta and -ga
- Updated repos to use latest nightly (20211105)
- Added rt repository
- Both -ga and -beta are identical
- rhel-90.json repo file is a symlink to rhel-90-beta.json

Signed-off-by: Achilleas Koutsou <achilleas@koutsou.net>
2021-11-10 14:54:31 +01:00
Tom Gundersen
f44acd0974 Revert "Revert "cloudapi/v1: Move depsolving to workers""
Workers now depsolve in parallel to image builds, so we can
again move depsolivng to the workers. This will help us deal
with increases in traffic as we currently only have one
depsolve handler per pod. It would also avoid any issues with
composer running out of disk space due to dnf metadata caches.

This reverts commit c65b1e9b26.
2021-10-26 13:58:22 +01:00
Ondřej Budai
83a35fb9b8 ci: remove 8.5 nightly testing
It no longer makes sense because:

- we don't make any changes to 8.5
- we don't regenerate test manifests for 8.5
- osbuild-composer for 8.5 is in the rhel-8.5.0 branch

Also, the latest-8.5.0 symlink was removed, which broke the CI.

Signed-off-by: Ondřej Budai <ondrej@budai.cz>
2021-10-26 09:30:21 +01:00
Achilleas Koutsou
aea77ed3de test: timestamp messages in test scripts
The commonly used 'greenprint' function now adds a date + timestamp to
each message for debugging and tracking the duration of segments of each
scripts.
2021-10-24 16:13:53 +01:00
Achilleas Koutsou
62a9aadfe4 test/api: SSH_USER=ec2-user for centos on AWS 2021-10-21 15:16:04 +01:00
Achilleas Koutsou
63fd590fc2 test/cases: add centos-8 as support to test scripts
Add centos-8 as a supported distro in ostree test scripts.

Signed-off-by: Achilleas Koutsou <achilleas@koutsou.net>
2021-10-21 15:16:04 +01:00
Achilleas Koutsou
a180c06fc4 test/ansible: install greenboot-failing-unit from public source
Use --cache-only to skip trying to update the cache.

Signed-off-by: Achilleas Koutsou <achilleas@koutsou.net>
2021-10-21 15:16:04 +01:00
Achilleas Koutsou
0cb95ee9b6 test/data: regenerate manifests for CentOS 8
Signed-off-by: Achilleas Koutsou <achilleas@koutsou.net>
2021-10-21 15:16:04 +01:00
Achilleas Koutsou
c7df2f1bc7 test/data/repositories: update cs8 rpmrepo snapshot
Signed-off-by: Achilleas Koutsou <achilleas@koutsou.net>
2021-10-21 15:16:04 +01:00
Achilleas Koutsou
e4f42066bb test: add RHEL 8.6 image installer test manifest
Installer test manifests don't contain image info but are useful for
detecting changes to the manifest.

Signed-off-by: Achilleas Koutsou <achilleas@koutsou.net>
2021-10-21 15:16:04 +01:00
Ondřej Budai
ece191f73e ostree: change the URL for OC client temporarily
mirror.openshift.com is temporarily down.

Revert this commit when the server is working as usual.

Signed-off-by: Ondřej Budai <ondrej@budai.cz>
2021-10-21 07:28:46 +02:00