Commit graph

3495 commits

Author SHA1 Message Date
Achilleas Koutsou
cae6a8d2b1 distro/rhel86: add lldpad to anaconda packages
Required by dracut modules.
2022-02-24 16:30:04 +01:00
Achilleas Koutsou
1762336891 distro/rhel86+90: add imageInstaller to aarch64 2022-02-24 16:30:04 +01:00
Achilleas Koutsou
07705aea7a distro/rhel90: split out arch-specific packages for anaconda 2022-02-24 16:30:04 +01:00
Achilleas Koutsou
82bec696b2 distro/rhel86+90: pipeline function rename 2022-02-24 16:30:04 +01:00
Achilleas Koutsou
9a8271a524 distro/rhel86+90: variable rename
Reflect the external name of the image type for clarity.
2022-02-24 16:30:04 +01:00
Gianluca Zuccarelli
62c44e86f9 disk: ensure minimum size for filesystems
This commit fixes #2347 by ensuring that a minimum
size of 1GB is set for all file systems. The only
exception to this is the `/usr` which is set to 2GB,
since this was the only mountpoint that was previously
being checked.
2022-02-24 11:00:35 +01:00
Gianluca Zuccarelli
ab306943d4 tests: check mountpoints with matching suffixes
Filesystem mountpoints with matching suffixes, i.e.
`/tmp` and `/var/tmp` was causing image builds to
fail. Since this was fixed with #2141 the integration
tests have been updated to check for this.
2022-02-24 11:00:35 +01:00
Gianluca Zuccarelli
4d83ae9878 distro/rhel86,rhel90: add /tmp mountpoint
The `/tmp` mountpoint was mistakenly left out
of the allowlist for previous distros. This
commit enables the ability to create the
`/tmp` filesystem for the rhel86 & rhel90
distros.
2022-02-24 11:00:35 +01:00
Sanne Raymaekers
b05723a37e templates/composer: Verify against mass sso and rh sso 2022-02-24 09:48:12 +01:00
Achilleas Koutsou
91d9417f5a distro/rhel90: use new unified grub2 stage options
With the new grub2 stage options we have the following changes to the
grub2 stage:
- Set the WriteCmdLine flag to false to not write kernel command line
  options to grubenv.
- Don't set the kernel command line options in the stage options.

The kernel command line options are now only specified in the Kernel
command line stage (org.osbuild.kernel-cmdline) so we add all options
there:
- Image type options
- Blueprint options
- Partition-table-specific options

Updated manifests and image info.

Co-Authored-By: Christian Kellner <christian@kellner.me>
2022-02-23 22:42:59 +01:00
Achilleas Koutsou
83ce9aa4ef grub2: new grub2 stage options constructor for Unified configs
New constructor for unified grub2 setups [0].  Having this separate
constructor lets us have different logic for unified and non-unified
cases and also have fewer function parameters.

[0] https://fedoraproject.org/wiki/Changes/UnifyGrubConfig

Co-Authored-By: Christian Kellner <christian@kellner.me>
2022-02-23 22:42:59 +01:00
Achilleas Koutsou
a7c702c4ae osbuild2: remove redundant option set condition
The Legacy stage option is always set to the value from the function
argument unconditionally.  This condition is useless.

Co-Authored-By: Christian Kellner <christian@kellner.me>
2022-02-23 22:42:59 +01:00
Sanne Raymaekers
e9daacd1dd internal/cloudapi: Allow bp.Customizations being nil
Customizations being nil isn't the same as an empty object. The
edge-installer types require customizations equalling nil.

This partially reverts bb486bcccb.
2022-02-23 11:24:27 +00:00
Xiaofeng Wang
05cbbf0cc5 test: Skip rollback test only on UEFI VM of ostree-rebase.sh 2022-02-23 11:08:24 +01:00
Xiaofeng Wang
45ee6c297f test: Remove ANSIBLE_STDOUT_CALLBACK=yaml in ostree-rebase.sh 2022-02-23 11:08:24 +01:00
Xiaofeng Wang
bc9d1431bc test: Add OSTree rebase test for OSTree parent ref support
To run ostree-rebase.sh, like RHEL 8.6 and RHEL 9, the CS8 VM
needs "large" flavor for more CPU and memory resource.
2022-02-23 11:08:24 +01:00
Achilleas Koutsou
129536dad0 distro/rhel86,rhel90: don't write keys for ostree commits in user stage
Writing the key to the user home directory has no effect for ostree
commits.  Instead we write them using a fist-boot service.
In certain situations (e.g., when building an upgrade commit against an
existing parent), the user's home directory might not exist during the
build and the user key creation fails in the users stage, so let's
remove it entirely to avoid the issue.
2022-02-23 11:08:24 +01:00
Achilleas Koutsou
be382ecef8 test/ostree: update ostree compose request to match new requirements
Specifying a parent commit ID without a URL isn't allowed now.  The
upgrade commit is built without a parent.  The OS upgrade should still
work without it.
Getting the ID of the first commit is not necessary now.
2022-02-23 11:08:24 +01:00
Achilleas Koutsou
459a07d101 cloudapi/v2: update tests to match new ostree parameter rules
- Create test servers that serve a commit ref for ostree compose
  requests.
- Adapt test cases t new rules.
2022-02-23 11:08:24 +01:00
Achilleas Koutsou
3839a7d0dc cloudapi/v2: catch ParameterComboError from ostree param validation 2022-02-23 11:08:24 +01:00
Achilleas Koutsou
9e0af86775 ostree: rename errors and introduce ParameterComboError
Shorter and clearer error types.
- InvalidParameterError is now RefError.  It is returned when a ref (the
  new ref or the parent ref) is invalid.
- The ResolveRefError is not renamed.  It is returned when a ref can't
  be resolved (e.g., ref not found at URL).

New error type ParameterComboError.  It is returned when a parent ref is
specified but no URL, which is an invalid parameter combination.
2022-02-23 11:08:24 +01:00
Achilleas Koutsou
36d8cd1dd2 ostree: move test server to separate package
Make it reusable for other packages
2022-02-23 11:08:24 +01:00
Achilleas Koutsou
ef513329a1 weldr: update tests to match new ostree parameter rules
- Create test servers that serve a commit ref for ostree compose
  requests.
- Adapt test cases to new rules.
2022-02-23 11:08:24 +01:00
Achilleas Koutsou
6e42ff7b44 weldr: reformat Compose test cases
Easier to read and modify if the structs are broken up.
2022-02-23 11:08:24 +01:00
Achilleas Koutsou
135cd684fc ostree: new ostree parameter rules
All parameters can now be specified at the same time.
See https://github.com/osbuild/osbuild-composer/issues/2131 for a
description of how the parameters are meant to interact.

In brief, the only invalid parameter combination is specifying a Parent
without a URL.
All other error conditions are for malformed URLs, invalid characters in
a ref, or error responses from the server.
2022-02-23 11:08:24 +01:00
Achilleas Koutsou
134a84ac23 cloudapi/v2: test ostree url + parent error conditions
Supplying both a URL and a parent ID (regardless of ref) is currently an
error, just like in the existing Weldr API.
2022-02-23 11:08:24 +01:00
Achilleas Koutsou
bfaf0c073b cloudapi/v2: support specifying parent ref for ostree requests 2022-02-23 11:08:24 +01:00
Achilleas Koutsou
24b70837c1 cloudapi/v2: validate ostree params using common validation function
Use the ostree package error types to keep the existing distinction
between Ref- and URL-related errors.
Introduce a new error condition for a general InvalidOSTreeParams
failure.
2022-02-23 11:08:24 +01:00
Achilleas Koutsou
c68850fa26 ostree: return cusotm errors from validation functions
Errors implement the error interface, so we can return them as generic
errors. Callers can test the type only if they want to determine the
failure type.

The error types that can be returned from each function are documented
in the docstring.
2022-02-23 11:08:24 +01:00
Achilleas Koutsou
30e127d1b6 ostree: custom errors for ostree parameter validation 2022-02-23 11:08:24 +01:00
Achilleas Koutsou
7f69d56fc9 ostree: simplify VerifyRef() function
Return value of condition immediately
2022-02-23 11:08:24 +01:00
Achilleas Koutsou
923850ff1b cloudapi/v2: test ostree params and error conditions 2022-02-23 11:08:24 +01:00
Achilleas Koutsou
f885de4c68 distro: remove OSTreeImageOptions type and use ostree.RequestParams 2022-02-23 11:08:24 +01:00
Achilleas Koutsou
102c322ec9 ostree: simplify ResolveParams arguments
No need to pass the entire image type. We just need the default ref.
This removes the distro package dependency from the ostree package,
which we will need so distro can use the ostree types and functions.
2022-02-23 11:08:24 +01:00
Achilleas Koutsou
b92754b135 ostree: rename request parameters type
It's in the ostree package, so it doesn't need to have OSTree in the
name.
2022-02-23 11:08:24 +01:00
Achilleas Koutsou
db345d75dd ostree: include ref in error message when invalid 2022-02-23 11:08:24 +01:00
Achilleas Koutsou
417d913439 weldr: use new ResolveOSTreeParams function 2022-02-23 11:08:24 +01:00
Achilleas Koutsou
c60c54aa43 ostree: ostree parameter validation and resolve function
Validates the ostree parameters and resolves the parent ID.
2022-02-23 11:08:24 +01:00
Achilleas Koutsou
4d31c8e69d weldr: change all OSTree related error IDs to OSTreeOptionsError
These will all be reported from the same validation function.
2022-02-23 11:08:24 +01:00
Achilleas Koutsou
26468315ab weldr: expand ostree parameter test cases
Adding three more combinations that weren't covered by previous tests:
- Supplying ref, parent, and URL: should result in an error
- Supplying ref and parent: OK
- Supplying parent, and URL: same as first case (ref gets default value
  from image type)

Added default OSTreeRef() to test image type to cover the cases where
the ref isn't specified but affects the validation.

Separated and commented the test cases.
2022-02-23 11:08:24 +01:00
Achilleas Koutsou
01b2b15ebc weldr: reuse api for all test cases in TestCompose 2022-02-23 11:08:24 +01:00
Alexander Todorov
646fbe93c7 Revert "tests: Conditionally enable osbuild-dnf-json-tests"
Current version is 45.

This reverts commit 966692be11.
2022-02-22 21:57:30 +01:00
He Yi
f24e3d93e3 Update team_ssh_keys.txt 2022-02-22 21:55:56 +01:00
He Yi
866d2aabe7 Update team_ssh_keys.txt 2022-02-22 21:55:56 +01:00
Gianluca Zuccarelli
8e8d99336f templates/worker: fix depsolve error rate
The depsolve error rate had the incorrect query
and was returning the error rate for the build
jobs. This has now been fixed.
2022-02-22 19:55:14 +00:00
Ondřej Budai
2263b821a7 worker/osbuild-koji: fix double-reporting of osbuild-koji job status
This was causing:

Feb 21 06:08:06 ip-10-30-18-43.us-east-1.aws.redhat.com osbuild-worker[20798]: time="2022-02-21T06:08:06Z" level=warning msg="Error reporting job result: error setting job status: 404 — Token not found (IMAGE-BUILDER-WORKER-5)"

Signed-off-by: Ondřej Budai <ondrej@budai.cz>
2022-02-22 19:27:17 +00:00
Ondřej Budai
0fa7c96549 Revert "mockbuild: temporarily pin RHEL 9 compose to an older one"
This reverts commit 10c0891fe0.
2022-02-22 19:26:42 +00:00
Xiaofeng Wang
8051ddced5 test: Remove "ansible-galaxy collection install"
Since "ANSIBLE_STDOUT_CALLBACK=yaml" has been removed from all
ostree test script, "ansible-galaxy collection install" should be
removed as well
2022-02-22 19:25:48 +00:00
Sanne Raymaekers
7133dc7943 Schutzfile: Pin centos-9's osbuild commit 2022-02-22 19:24:12 +00:00
Christian Kellner
34924c7af4 distro: use new GenImageKernelOptions in ostreeDeployPipeline
The new `GenImageKernelOptions` will retrun all needed kernel options
that are derived from the partition table. The only case - for now -
is if the partition table contains a LUKS decice, where the uuid of it
needs to be passed to the on the kernel command line so that it will
get unlocked.

Co-Authored-By: Achilleas Koutsou <achilleas@koutsou.net>
2022-02-22 19:23:41 +00:00