Commit graph

3509 commits

Author SHA1 Message Date
Achilleas Koutsou
7f17757122 test: update manifests and image info
Signed-off-by: Antonio Murdaca <runcom@linux.com>
2022-02-24 17:07:34 +01:00
Antonio Murdaca
522ef73f4c internal/{8,9}: add clevis deps to simplified installer
Signed-off-by: Antonio Murdaca <runcom@linux.com>
2022-02-24 17:07:34 +01:00
yih
8d5490e209 test: add test case for fdo
Add a new test case that tests secure device onboarding for the
Edge simplified installer.
2022-02-24 17:07:34 +01:00
Antonio Murdaca
74540bcee7 distro/rhel90: add fido dracut module and enable customizing onboarding
FDO secure device onboarding support for RHEL90.

Co-Authored-By: Christian Kellner <christian@kellner.me>
2022-02-24 17:07:34 +01:00
Antonio Murdaca
e2bd3506e2 distro/rhel86: add fido dracut module and enable customizing onboarding
This patch also introduces customizations to fully enable onboarding
options for FDO.

Co-Authored-By: Christian Kellner <christian@kellner.me>
2022-02-24 17:07:34 +01:00
Christian Kellner
892cfb67cc osbuild2: add new FDOStage for org.osbuild.fdo
The stage takes no options but a single file input that contains the
root certs.
Add the stage with a helper constructor that will generate the needed
reference based on the actual certificate data.
Add corresponding tests.
2022-02-24 17:07:34 +01:00
Christian Kellner
6d383ec89a osbuild2: add org.osbuild.inline source
Add support for the `org.osbuild.inline` source via a new `InlineSource`
and the corresponding `InlineSourceItem`. A utility function `AddItem`
can be used to conveniently add items based on data (as strings).
2022-02-24 17:07:34 +01:00
Achilleas Koutsou
efbef95bf1 test: change condition for greenboot checks in ansible playbooks
Both CentOS versions are now part of the same condition.
2022-02-24 17:07:34 +01:00
Achilleas Koutsou
4ff0916caa test: update CS8 manifests and image info 2022-02-24 17:07:34 +01:00
Achilleas Koutsou
f71b4f69a8 distro/rhel86: remove greenboot condition for CS8
greenboot-default-health-checks is available in CS8 as well now.
2022-02-24 17:07:34 +01:00
Achilleas Koutsou
eda78a9a99 Update CentOS Stream 8 repositories 2022-02-24 17:07:34 +01:00
Achilleas Koutsou
fa209fe747 test: generate aarch64 image installer manifests
Added to imagetype map for test case generators and generate new
manifests.
2022-02-24 16:30:04 +01:00
Achilleas Koutsou
be0a45fe83 distro/rhel86: sort -u anaconda package set 2022-02-24 16:30:04 +01:00
Achilleas Koutsou
c4d6fcbe5b distro/rhel90: add lldpad and fcoe-utils to anaconda packages
Required by dracut modules.
2022-02-24 16:30:04 +01:00
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