Commit graph

3840 commits

Author SHA1 Message Date
dependabot[bot]
8ca8dd5616 build(deps): bump github.com/gophercloud/gophercloud
Bumps [github.com/gophercloud/gophercloud](https://github.com/gophercloud/gophercloud) from 0.22.0 to 0.24.0.
- [Release notes](https://github.com/gophercloud/gophercloud/releases)
- [Changelog](https://github.com/gophercloud/gophercloud/blob/master/CHANGELOG.md)
- [Commits](https://github.com/gophercloud/gophercloud/compare/v0.22.0...v0.24.0)

---
updated-dependencies:
- dependency-name: github.com/gophercloud/gophercloud
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-14 09:55:55 +02:00
Jakub Rusz
f21e5fd1c9 ci: do not download artifacts in finish stages
The jobs in finish stage are only meant to report the overall status of
the pipeline, they do not require to download the hundreds of artifacts
from the previous stages.
2022-04-13 10:34:58 +02:00
Gianluca Zuccarelli
2ad11acc2a cloudapi/test: add compose dependency error tests
Add depsolve job error dependency test cases for
regular composes and koji composes. The error furthest
up the chain should be returned in the details field
of the job error.
2022-04-13 10:31:53 +02:00
Gianluca Zuccarelli
e31fb36d65 cloudapi: add build job dependency checks
If an osbuild or koji-osbuild job has failed, add
a check to see if it is a result of the build jobs
dependencies and return the dependency failure job
error furthest up the chain of errors & add this
error to the details filed of the build job error.
2022-04-13 10:31:53 +02:00
Gianluca Zuccarelli
596464e8a2 cloudapi: fix koji build result
The incorrect result object was being used for
the kojibuild error objects.
2022-04-13 10:31:53 +02:00
Gianluca Zuccarelli
da94f2cbeb worker/server: build job dep errors
Add a helper function to query dependency
failures of osbuild & koji-osbuild jobs.
If a build job has a dependency error the
function will check for the job error of the
manifest job. If that also has a dependency
error the function will query the depsolve
job too for a job error.
2022-04-13 10:31:53 +02:00
Gianluca Zuccarelli
30d75d0e74 worker/clienterrors: depenency error check
Add a helper function to check for dependency
errors for job errors. This simply returns true
if a job error has a dependency error code and
false otherwise.
2022-04-13 10:31:53 +02:00
Gianluca Zuccarelli
b1969ba6a6 worker/clienterrors: omit details if empty
Omit the details field if it is null/empty.
2022-04-13 10:31:53 +02:00
dependabot[bot]
ecc30990c7 build(deps): bump github.com/aws/aws-sdk-go from 1.42.25 to 1.43.38
Bumps [github.com/aws/aws-sdk-go](https://github.com/aws/aws-sdk-go) from 1.42.25 to 1.43.38.
- [Release notes](https://github.com/aws/aws-sdk-go/releases)
- [Changelog](https://github.com/aws/aws-sdk-go/blob/main/CHANGELOG.md)
- [Commits](https://github.com/aws/aws-sdk-go/compare/v1.42.25...v1.43.38)

---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-13 09:17:55 +02:00
Jakub Rusz
0aad2fa43f mockbuild: use rpmrepo in mock templates
We're using rpmrepo snapshots as system repositories on the runners, so
let's use them also for mockbuild.
2022-04-12 13:13:50 +02:00
Jakub Rusz
65a777b286 Schutzfile: pin rpmrepo snapshots for fedora 2022-04-12 13:13:50 +02:00
Jakub Rusz
9c3e9ff616 ci: add team ssh keys in before_script
Add the keys in before_script to make also rpbuild runners accessible as
the deploy.sh script is not being ran there.
2022-04-12 13:13:50 +02:00
dependabot[bot]
0688d2180b build(deps): bump github.com/labstack/echo/v4 from 4.6.1 to 4.7.2
Bumps [github.com/labstack/echo/v4](https://github.com/labstack/echo) from 4.6.1 to 4.7.2.
- [Release notes](https://github.com/labstack/echo/releases)
- [Changelog](https://github.com/labstack/echo/blob/master/CHANGELOG.md)
- [Commits](https://github.com/labstack/echo/compare/v4.6.1...v4.7.2)

---
updated-dependencies:
- dependency-name: github.com/labstack/echo/v4
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Ondřej Budai <ondrej@budai.cz>
2022-04-12 10:01:15 +02:00
Ygal Blum
b5dcb40b05 Generic S3 test - retry creating the alias in case the service is not yet up 2022-04-12 09:39:21 +02:00
Christian Kellner
e673b12957 rhel85: specify a minimum root file system size
Specify a size for the root filesystem in the partition table,
which basically equates to a minimum size. In reality all image
types specify a larger image size and thus we enlarge the root
file system to more than the specified size for plain layouts.
Does not change any existing manifests.
This also prepares the enablement of auto-LVM conversion, since
in that case we need to have a size for the root file system
specified.
2022-04-11 15:27:15 +02:00
Alexander Todorov
4c97fae0e9 Properly skip Fedora distros
Co-authored-by: Jakub Rusz <55534579+jrusz@users.noreply.github.com>
2022-04-11 15:27:15 +02:00
Alexander Todorov
8556a844e8 Add tests for blueprints without explicit definition for /
- currently disabled on Fedora until PR #2461 lands

Related: RHBZ#2049500
2022-04-11 15:27:15 +02:00
dependabot[bot]
2c2668f493 build(deps): bump github.com/jackc/pgx/v4 from 4.13.0 to 4.15.0
Bumps [github.com/jackc/pgx/v4](https://github.com/jackc/pgx) from 4.13.0 to 4.15.0.
- [Release notes](https://github.com/jackc/pgx/releases)
- [Changelog](https://github.com/jackc/pgx/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jackc/pgx/compare/v4.13.0...v4.15.0)

---
updated-dependencies:
- dependency-name: github.com/jackc/pgx/v4
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-08 10:22:31 +02:00
Ondřej Budai
a3c207945f weldr: update our use of BurntSushi/toml
The old method is deprecated and failing the linter.

Signed-off-by: Ondřej Budai <ondrej@budai.cz>
2022-04-08 09:45:46 +02:00
dependabot[bot]
32f3d3d66e build(deps): bump github.com/BurntSushi/toml from 0.4.1 to 1.1.0
Bumps [github.com/BurntSushi/toml](https://github.com/BurntSushi/toml) from 0.4.1 to 1.1.0.
- [Release notes](https://github.com/BurntSushi/toml/releases)
- [Commits](https://github.com/BurntSushi/toml/compare/v0.4.1...v1.1.0)

---
updated-dependencies:
- dependency-name: github.com/BurntSushi/toml
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-08 09:45:46 +02:00
dependabot[bot]
c6070cdd09 build(deps): bump gopkg.in/ini.v1 from 1.63.0 to 1.66.4
Bumps [gopkg.in/ini.v1](https://github.com/go-ini/ini) from 1.63.0 to 1.66.4.
- [Release notes](https://github.com/go-ini/ini/releases)
- [Commits](https://github.com/go-ini/ini/compare/v1.63.0...v1.66.4)

---
updated-dependencies:
- dependency-name: gopkg.in/ini.v1
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-08 09:44:52 +02:00
dependabot[bot]
e6bbd6ba52 build(deps): bump github.com/Azure/azure-sdk-for-go
Bumps [github.com/Azure/azure-sdk-for-go](https://github.com/Azure/azure-sdk-for-go) from 57.4.0+incompatible to 63.1.0+incompatible.
- [Release notes](https://github.com/Azure/azure-sdk-for-go/releases)
- [Changelog](https://github.com/Azure/azure-sdk-for-go/blob/main/CHANGELOG.md)
- [Commits](https://github.com/Azure/azure-sdk-for-go/compare/v57.4.0...v63.1.0)

---
updated-dependencies:
- dependency-name: github.com/Azure/azure-sdk-for-go
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-08 08:30:22 +02:00
Thomas Lavocat
3ed86c3a86 lib: upgrade prometheus client to 1.12 2022-04-07 20:08:42 +02:00
dependabot[bot]
df0db98bf0 build(deps): bump github.com/jackc/pgtype from 1.8.1 to 1.10.0
Bumps [github.com/jackc/pgtype](https://github.com/jackc/pgtype) from 1.8.1 to 1.10.0.
- [Release notes](https://github.com/jackc/pgtype/releases)
- [Changelog](https://github.com/jackc/pgtype/blob/master/CHANGELOG.md)
- [Commits](https://github.com/jackc/pgtype/compare/v1.8.1...v1.10.0)

---
updated-dependencies:
- dependency-name: github.com/jackc/pgtype
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-07 20:03:13 +02:00
dependabot[bot]
98dc97e947 build(deps): bump github.com/google/go-cmp from 0.5.6 to 0.5.7
Bumps [github.com/google/go-cmp](https://github.com/google/go-cmp) from 0.5.6 to 0.5.7.
- [Release notes](https://github.com/google/go-cmp/releases)
- [Commits](https://github.com/google/go-cmp/compare/v0.5.6...v0.5.7)

---
updated-dependencies:
- dependency-name: github.com/google/go-cmp
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-07 20:02:51 +02:00
Ygal Blum
bee14bf392 OSBuild - add support for generic S3 services
jobimpl-osbuild
---------------
Add GenericS3Creds to struct
Add method to create AWS with Endpoint for Generic S3 (with its own credentials file)
Move uploading to S3 and result handling to a separate method (along with the special VMDK handling)
adjust the AWS S3 case to the new method
Implement a new case for uploading to a generic S3 service

awscloud
--------
Add wrapper methods for endpoint support
Set the endpoint to the AWS session
Set s3ForcePathStyle to true if endpoint was set

Target
------
Define a new target type for the GenericS3Target and Options
Handle unmarshaling of the target options and result for the Generic S3

Weldr
-----
Add support for only uploading to AWS S3
Define new structures for AWS S3 and Generic S3 (based on AWS S3)
Handle unmarshaling of the providers settings' upload settings

main
----
Add a section in the main config for the Generic S3 service for credentials
If provided pass the credentials file name to the osbuild job implementation

Upload Utility
--------------
Add upload-generic-s3 utility

Makefile
------
Do not fail if the bin directory already exists

Tests
-----
Add test cases for both AWS and a generic S3 server
Add a generic s3_test.sh file for both test cases and add it to the tests RPM spec
Adjust the libvirt test case script to support already created images
GitLabCI - Extend the libvirt test case to include the two new tests
2022-04-07 15:01:01 +02:00
Tomas Hozza
01880a76a2 RHEL(85+): move qemuStageOptions() from distros to osbuild2
De-duplicate the `qemuStageOptions()` implementation from many distro
implementations and move it to the `osbuild2` package as
`NewQEMUStageOptions()`.

Adjust all affected pipeline implementations.

The `NewQEMUStageOptions()` function takes an optional format-specific
options argument, instead of a dedicated format-specific options (the
previously used qcow2 compat version). This is a preparation to produce
VMDK images with a different than default subformat.

Add unit test for `NewQEMUStageOptions()`.
2022-04-07 13:48:54 +02:00
Tomas Hozza
998421d597 osbuild2: fix copy&paste error in a comment 2022-04-07 13:48:54 +02:00
Tomas Hozza
69e70dec22 osbuild2: support VMDK subformat in the QEMU stage
Support setting a specific VMDK subformat in the type format options.

The required osbuild version in the SPEC file is not bumped, since the
new functionality is currently not used by any image type.

Related to https://github.com/osbuild/osbuild/pull/999
2022-04-07 13:48:54 +02:00
Tomas Hozza
f5d70d6b58 osbuild2: add QEMU format options for vdi and vhdx
Although these format types are not used by any of the image definitions
at this moment, add them since they are supported by the osbuild stage.
2022-04-07 13:48:54 +02:00
Tomas Hozza
8697713ce8 osbuild2: rename Qcow2Options -> QCOW2Options
Make the format type options structure naming consistent.
2022-04-07 13:48:54 +02:00
Tomas Hozza
2521c18cf4 osbuild2: make QEMUFormatOptions validation an interface method
Move the validation of each structure implementing the
`QEMUFormatOptions` interface to the interface itself and to
the structures implementing it.
2022-04-07 13:48:54 +02:00
Tomas Hozza
0e512e97d2 osbuild2: use aliased type for QEMU format, instead of string
Define a new aliased type `QEMUFormat` for the format type used by the
osbuild2 QEMU stage and define constants for all allowed values.

Use QEMU format type constants in all relevant places, instead of string
literals. Not using string literals minimizes the room for making a
typo.
2022-04-07 13:48:54 +02:00
Tomas Hozza
e30fa53c50 CI: rotate the used RHSM activation key 2022-04-07 11:44:52 +02:00
Christian Kellner
aaee939f9b distro/rhel86: enable auto-registration for azure
We want to ensure that cloud images connect to Red Hat[1] independently
of how the content was acquired (PAYG, BYOS, or marketplace).
This auto-registration feature is already enabled for AWS and this
patch enables it for Azure with the same recommended settings:

Services:
  rhsmcertd: Enabled (already done, so not changed in the patch)

/etc/rhsm/rhsm.conf:
  auto_registration: enabled
  auto_registration_interval: 60 (the default, so not explicitly set)
  manage_repos: false

The latter value `manage_repos` is left enabled (the default) in case
the user explicitly requested to have the system subscribed, i.e. the
`RHSMConfigWithSubscription` code path.

Regenerate the relevant test manifests and image information.

[1] https://cloud.redhat.com
[2] https://docs.google.com/document/d/1VeZFJxNUlyZMQJh6s3NA3RLvadqATsGxVet6uuP87_4
2022-04-06 22:40:01 +02:00
Gianluca Zuccarelli
ab98c66b9f worker/server: fix manifest-id job status
The manifest by id job status type safe function
was failing due to the jobType check which was checking
for the wrong string.
2022-04-06 21:34:02 +01:00
Gianluca Zuccarelli
b75cf30a05 worker/server: remove duplicate function
The `ManifestJobStatus` and `ManifestByIdJobStatus` both
had identical functionality. The `ManifestByIdJobStatus`
is not being referenced anywhere in the codebase and so
this function has been removed.
2022-04-06 21:34:02 +01:00
Gianluca Zuccarelli
14b006d480 worker/clienterrors: add empty packagespec error
Add an error case for an empty package spec returned
by a depsolve job and mark this with a `4xx` status.
2022-04-06 21:34:02 +01:00
Gianluca Zuccarelli
5dffb9f59c cmd/worker: add empty manifest check
Implement an error case for empty manifests in the osbuild jobs.
This is already in place in the koji-osbuild job so this change
introduces the same checks in case a job receives an empty manifest
or a job has no manifest at all.
2022-04-06 21:34:02 +01:00
Jakub Rusz
a999b7b04c test/ostree-ng: remove user customization from upgrade BP
A user does not need to be specified in upgrade blueprint in order for
it to be present after the upgrade. Related rhbz#2060575
2022-04-06 16:34:31 +02:00
schutzbot
97912b43f4 Post release version bump
[skip ci]
2022-04-06 13:23:33 +00:00
Jakub Rusz
7666049210 ci: re-enabled Installer test on centos-stream-9
Anaconda with the fix released in the centos-stream-9 repos. Also fixing
ostree runner matrix.
2022-04-06 12:53:35 +02:00
dependabot[bot]
91663d5534 build(deps): bump github.com/Azure/go-autorest/autorest
Bumps [github.com/Azure/go-autorest/autorest](https://github.com/Azure/go-autorest) from 0.11.21 to 0.11.25.
- [Release notes](https://github.com/Azure/go-autorest/releases)
- [Changelog](https://github.com/Azure/go-autorest/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Azure/go-autorest/compare/autorest/v0.11.21...autorest/v0.11.25)

---
updated-dependencies:
- dependency-name: github.com/Azure/go-autorest/autorest
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-04-06 12:28:30 +02:00
Achilleas Koutsou
23d4281349 rhel84: panic if kernel not defined in installer 2022-04-06 12:09:09 +02:00
Achilleas Koutsou
a76f7a64dc distro: rename tarInstaller vars to imageInstaller
The image type is only ever known (externally) as image-installer.
Renaming the internal variables and functions to reflect the name makes
the code easier to navigate.
2022-04-06 12:09:09 +02:00
Achilleas Koutsou
8316cf7ef0 rhel85: enable anaconda users module in installers
The users anaconda module enables users to create user accounts at
install time if one is not already created in the payload.  This is
required for the cloud API (Image Builder service) for the image
installer where user customizations are not supported.  Without it, user
creation isn't possible on the installed system.

The module also enables user creation at install time through the
kickstart file for both the image-installer and the edge-installer
(Anaconda only).
Therefore, for the image-installer, the users and groups are no longer
created as part of the payload.

This commit adapts the changes from the following commits (originally
made in the RHEL 8.6 and RHEL 9.0 distros) to the rest of the RHEL
distro definitions:
ebc3330cbd
5825294dad
2022-04-06 12:09:09 +02:00
Achilleas Koutsou
b0f7ff7c31 distro/rhel85,rhel90beta: change osPipeline() args
Pass in the image type and remove the three args (enabledServices,
disabledServices, and defaultTarget) that can be obtained from it.
2022-04-06 12:09:09 +02:00
Achilleas Koutsou
2aacd036e0 osbuild2: remove 'name' from group stage options
The name field does not exist in the osbuild schema.  This has no effect
on the current manifests.
2022-04-06 12:09:09 +02:00
Achilleas Koutsou
7236212d63 distro: deduplicate anacondaStageOptions() in RHEL pipelines
Use single NewAnacondaStageOptions() from osbuild2 instead of
implementing in each distro.

Followup from 974b0a434b, copied to the
rest of the RHEL distro definitions.
2022-04-06 12:09:09 +02:00
Achilleas Koutsou
3d53ca5d8d distro: deduplicate *kickstartStageOptions()
Use single NewKickstartStageOptions() and replace image-type-specific
implementation from each distro.
- Followup from cb186df208, copied to the
  rest of the RHEL distro definitions.

NB: The change was not made in the Fedora distro definitions as they are
    currently being rewritten.
2022-04-06 12:09:09 +02:00