-
Notifications
You must be signed in to change notification settings - Fork 107
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RHEL 8.5: main image types #1536
RHEL 8.5: main image types #1536
Conversation
e15c6f5
to
d49d5fc
Compare
Depsolve error |
5db518e
to
155ce00
Compare
faedb5c
to
cfd9016
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor change requested.
However Base tests still failing with:
DNF error occured: MarkingErrors: Error occurred when marking packages for installation: Problems in request:\nmissing packages: nss
It's regression.sh which fails.
Yeah, sorry. Wasn't ignoring your earlier mention, I just wanted to get everything else in before trying to figure out the source of that failure. Thanks for the pointer to regression.sh. I see it now. Since 8.5 image types are heavily rewritten from the older ones, Martin's patch to force-include excluded packages isn't included. |
687c6a9
to
445b573
Compare
Marking this as ready for review now. Still could use some test manifests for s390x and ppc64le but I want to mark it as ready and ask for reviews. |
445b573
to
c35d354
Compare
It should be possible to install packages that have dependencies in the excluded list now. I'm going to extend the regression test to check for this scenario as well. |
c7c9f16
to
106cfbf
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work. I added a few cosmetic comments. In addition, I got two ideas during the review:
- I feel like we should define the commonly used package set names as constants and use those in the code, instead of string literals.
- I wonder whether most of the functions in the
internal/distro/rhel85/stage_options.go
could be reused by other distro definitions. Some of the functions would have to take an additional argument or two, but they look like something we would want to use elsewhere as well. So maybe we could move them to theinternal/osbuild2
package?
} | ||
} | ||
|
||
func findBootPartition(pt *disk.PartitionTable) uint { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn't this make more sense as a disk.PartitionTable
method in the internal/disk
package? I mean in case this is something we would need for other distro definitions as well...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agreed. It's a generally useful utility. Moving.
internal/osbuild2/qemu_stage_test.go
Outdated
"github.com/stretchr/testify/assert" | ||
) | ||
|
||
func TestNewQemukStage(t *testing.T) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is an extra "k" in TestNewQemukStage
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
106cfbf
to
01a2b51
Compare
That's a good idea. In my head the initial design was that package set names should have no special meaning. The idea was that the distro uses arbitrary strings to refer to package sets, returns them for depsolving from the
The functions in the I'll open an issue for it as a reminder. |
6607a06
to
ccd2257
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
First things first - this is pure awesomeness!
Second things second - if typos are the only issues of this PR, let's merge it and fix them in a follow-up. It just felt wrong not to point them out.
Let's move to more serious stuff though: I noticed that integration and API tests are not enabled for RHEL 8.5 by this PR. We want to make sure that we always merge fully tested PRs. I would like to ask what's the plan with them? As always, I'm more than happy to help with enabling them. :)
Great work again, I'm looking forward to porting all of these to RHEL 9.0. :-)
|
||
// mkfsStages generates a list of org.osbuild.mkfs.* stages based on a | ||
// partition table description for a single device node | ||
func mkfsStages(pt *disk.PartitionTable, device *osbuild.Device) []*osbuild2.Stage { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if this is something that can be shared across distributions and can live in internal/disk
.
The same applies to all methods that return stages/input/devices for partitioning stuff.
(if we decide to go this way, this is surely something for a follow-up)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree. I think we should make a push for this at some point along with #1550.
# Get OS data. | ||
source /etc/os-release | ||
|
||
# Provision the software under tet. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tet => test
This is definitely not your fault, we have this typo everywhere. :D
# Provision the software under tet. | ||
/usr/libexec/osbuild-composer-test/provision.sh | ||
|
||
if [[ "${ID}-${VERSION_ID}" != "rhel-8.5" ]]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be great to have this future-proof and run this on rhel >= 8.5. Please, do not solve it in this PR, this is just a reminder for us that we should think about this.
description = "A base system with redhat-lsb-core" | ||
version = "0.0.1" | ||
|
||
# The nss package is excluded in the RHEL8.4 image type and is required by the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
RHEL 8.5?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed. Thanks!
internal/distro/rhel85/distro.go
Outdated
@@ -213,7 +213,10 @@ func (t *imageType) PackageSets(bp blueprint.Blueprint) map[string]rpmmd.Package | |||
if timezone != nil { | |||
bpPackages = append(bpPackages, "chrony") | |||
} | |||
mergedSets["packages"] = mergedSets["packages"].Append(rpmmd.PackageSet{Include: bpPackages}) | |||
|
|||
// repsolve bp packages separately |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
resolve
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed (actually, wanted to say 'depsolve'). Thanks!
it's actually vpc, not vhd Signed-off-by: Ondřej Budai <[email protected]>
Previously, the first boot stage was added twice if the subscription customization was enabled. This doesn't work because the first boot stage cannot be specified twice in one pipeline. Also, it didn't make much sense because it just duplicated the effort so I just removed one of the two stages. Signed-off-by: Ondřej Budai <[email protected]>
Signed-off-by: Ondřej Budai <[email protected]>
Nightly composes are more stable because they contain only builds attached to advisories whereas development composes contain latest brew builds. Use nightlies because they should be stabler. Signed-off-by: Ondřej Budai <[email protected]>
Originally, a copy of an architecture instance was always created when it was added to a distro definition using the `addArches()` method. However in reality, only a subset of structure members were copied, which could create unexpected behavior and issues. This behavior is identical to the behavior when image types are added to an architecture. However the situation with image types differs in one aspect, specifically that a single image type definition is usually reused by multiple architecture definitions, while an architecture definition is always used only by a single distribution definition. Due to the fact that the image type contains a reference to the architecture to which it has been added, the creation of a copy can not be reasonably avoided. On the other hand, adding a copy of an architecture to a distribution definition is not necessary. Downside of creating copies of the architecture is that the image types associated with it referred always to the original architecture definition instance and not to the copy. So while references in the direction of Distro -> Arch -> Image Type were correct and working, the other direction was broken. Image Type -> (original) Arch -> (nil) Distro. Modify `distribution.AddArches()` method to directly add the passed architecture instances to the distribution definition, instead of adding their copies. Signed-off-by: Tomas Hozza <[email protected]>
Refactor data structures used for test cases in the `TestFilenameFromType()` to have more descriptive names. Signed-off-by: Tomas Hozza <[email protected]>
EDGE image types are defined under a different name for RHEL-8.5, specifically they don't contain the "rhel-" prefix any more. To ensure backward compatibility, add image type aliases for all EDGE image types with the "rhel-" prefix. Image type aliases are used only when getting a specific imageType instance by its name. When listing all available image types for an architecture, only the current image type names are returned, without any aliases. This prevents the image types from being exposed multiple times under different names via Weldr API. Extend the distro unit tests to test image type aliases. Signed-off-by: Tomas Hozza <[email protected]>
osbuild has recently got support for specifying mounts as an array. This commit takes advantage of it and uses this new format. This allows us to specify the order of mounts which is important because we cannot mount /boot/efi before / is mounted. Signed-off-by: Ondřej Budai <[email protected]>
Previously, /boot/efi mount was specified before /. This obviously doesn't work because we need to mount / firstly. This commit adds explicit ordering of the mounts. Signed-off-by: Ondřej Budai <[email protected]>
Use the package set key constants defined in distro in the pipeline definitions as well.
Blueprint packages are now defined and passed into Manifest() separately. The main osPipelines() already has an argument for explicitly passing the blueprint packages. Added the same for the ostree pipelines.
Since partitions without a filesystem are skipped, we need to dynamically append to create the mounts array instead of pre-allocating to the number of partitions.
When not flushed, the line often doesn't get printed until after the job is done. Printing it before the job is useful for knowing the progress of a multi-job run.
The specific combination isn't broken in RHEL 8.5. The condition check was added accidentally when copying the tests from RHEL 8.4.
Instead of inspecting the tarball directly, extract it and use ostree to verify the ref and commit ID. Adds some data to the CI artifacts directory: - Build manifest - Tarball file list for s3 edge commit with s3 upload - Build metadata
If there's no kernel in the main package set, the standard/default kernel will be added while depsolving. This causes issues when an alternative kernel is selected in the blueprint. Both kernels will be installed (one from the blueprint and one from the main OS set) which causes issues with ostree image types.
Requires support for new features not yet released in RHEL 8.5
The edge-installer build root requires the installer build package set.
f76740c
to
57de030
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AWESOME! Thanks everyone for this!
This pull request includes:
Draft PR to get CI running base tests on RHEL 8.5. Some failures are expected:- AMI not implemented. I intend to add the base image after #1525 is merged.- Still generating test manifests for all non-x86_64 architectures.TODO:
Changes to the AMI image type and AMI variants listed in COMPOSER-840 will be added in a later PR.