enable host containers and in-place updates to be optional #23
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue number:
Related: bottlerocket-os/twoliter#318
Description of changes:
The
signpost
half of this change allows it to work correctly if only one partition bank is available, which will be true for variants that set thein-place-updates = false
feature flag.signpost
has limited utility in this mode, but it's still required to mark the boot as successful and to set the "has boot ever succeeded" flag to ensure we only try to assign theBOTTLEROCKET-DATA
partition label once.The
os
half of this change is to make it so software related to host containers or in-place updates is only installed if those features are enabled (which they will be by default). This can be done in two ways:These are more or less equivalent, but I went with the "negative" form to avoid requiring a lockstep Twoliter upgrade here and in downstream repos. Otherwise packages built with this change would not install correctly on variants built with an older Twoliter, because the new image feature flags wouldn't be set.
Testing done:
Built an
aws-dev
variant without in-place upgrades or host-containers enabled. Built an unmodifiedaws-k8s-1.30
variant.For the
aws-dev
variant, I confirmed that the software wasn't installed and thatsignpost
worked as expected.For the
aws-k8s-1.30
variant, I upgraded and downgraded across versions and confirmed that worked as expected.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.