-
Notifications
You must be signed in to change notification settings - Fork 29
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
add and remove image features #318
add and remove image features #318
Conversation
The cgroup v2 feature was used to conditionally compile systemd and select the default cgroup hierarchy - either "hybrid" or "unified" - at build time. Packages no longer have access to conditional compilation assisted by the build tool, so this feature flag is obsolete. Instead, the cgroup hierarchy can be selected through kernel command line parameters in the variant definition. Signed-off-by: Ben Cressey <[email protected]>
8a09cc0
to
44181fd
Compare
Promote "in-place-updates" and "host-containers" to feature flags, and enable them by default for backwards compatibility. The in-place update feature requires two sets of partitions, which wastes disk space if the variant will only ever run on nodes that are replaced rather than updated in-place. The host containers feature supports execution of containers at fixed points during the host's lifecycle: during boot, and as background services once the host is fully configured. This may not be desirable for variants looking for stronger guarantees that only the software included in the immutable root filesystem will ever run. Expose these as feature flags so that variants can opt-out. Signed-off-by: Ben Cressey <[email protected]>
`buildsys` no longer sets this feature flag for any build, so do not look for it during bcond generation or apply it to the metadata RPM. Signed-off-by: Ben Cressey <[email protected]>
Add the "in-place-updates" and "host-containers" features to the metadata spec so that packages can arrange to be installed based on whether they are enabled or disabled. Disabling in-place update support implies removing the second set of partitions that will never be used. Adjust the partition sizing logic to double the size of the first set of partitions when the second set is omitted. Overhaul the "get_partition_sizes" logic in partyplanner to avoid making assumptions about the partition layout of input images, such as how many there will be, and instead to just record details about each partition. Signed-off-by: Ben Cressey <[email protected]>
44181fd
to
828198d
Compare
pp_offset["BOOT-${bank}"]="${offset}" | ||
pp_size["BOOT-${bank}"]="${boot_mib}" | ||
((offset += boot_mib)) | ||
pp_offset["BOOT-${bank}"]="${offset}" |
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.
This spacing seem suspicious, are they spaces or tabs?
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.
This spacing seem suspicious, are they spaces or tabs?
There are no tabs in this file. It's just following the two space indentation convention of the rest of the file.
Issue number:
N/A
Description of changes:
Remove support for the
unified-cgroup-hierarchy
image feature, which is effectively no longer implemented.Add support for two new features that are enabled by default:
in-place-updates
, which affects the partition layouthost-containers
, which only affects what software might be installedThese features can be targeted by RPM boolean dependencies in package specs to arrange for software to be installed only if the feature is enabled for a given variant.
Most of the non-boilerplate work was in
partyplanner
.get_partition_sizes
needed better handling for theRESERVED
partitions (rather than assuming there would always be two), andset_partition_sizes
needed a new mode for laying out partitions.Testing done:
Built
aws-dev
with both new features disabled, andaws-k8s-1.24
with both enabled.aws-dev
partition layout:aws-k8s-1.24
partition layout:cargo make repack-variant
worked for both.Terms of contribution:
By submitting this pull request, I agree that this contribution is dual-licensed under the terms of both the Apache License, version 2.0, and the MIT license.