Skip to content

Switch download only - #2342

Open
Johan-Liebert1 wants to merge 6 commits into
bootc-dev:mainfrom
Johan-Liebert1:switch-download-only
Open

Switch download only#2342
Johan-Liebert1 wants to merge 6 commits into
bootc-dev:mainfrom
Johan-Liebert1:switch-download-only

Conversation

@Johan-Liebert1

Copy link
Copy Markdown
Collaborator

switch: Add download_only and from_download options

Similar to what we have for the update operation


cfs/switch: Handle download only

Handle download_only and from_downloaded to only download and stage
the image but not finalize, and finalize from an already staged only
downloded deployment respectively


ostree/switch: Handle download only

Similar to ostree update, handle download only for bootc switch


cli/switch: Make target optional

If we have --from-downloaded then make target optional


Closes: #2137

Similar to what we have for the update operation

Signed-off-by: Pragyan Poudyal <pragyanpoudyal41999@gmail.com>
@Johan-Liebert1 Johan-Liebert1 added the ci/tier-1 Run CI for tier-1 OS (centos-10) only label Jul 27, 2026
@github-actions github-actions Bot added the area/documentation Updates to the documentation label Jul 27, 2026
Handle `download_only` and `from_downloaded` to only download and stage
the image but not finalize, and finalize from an already staged only
downloded deployment respectively

Signed-off-by: Pragyan Poudyal <pragyanpoudyal41999@gmail.com>
Similar to ostree update, handle download only for bootc switch

Signed-off-by: Pragyan Poudyal <pragyanpoudyal41999@gmail.com>
If we have `--from-downloaded` then make `target` optional

Signed-off-by: Pragyan Poudyal <pragyanpoudyal41999@gmail.com>
Mostly AI generated

Signed-off-by: Pragyan Poudyal <pragyanpoudyal41999@gmail.com>
DownloadOnlyOpts is flattened into both UpgradeOpts and SwitchOpts, but
its conflicts_with_all referenced "check", which only exists in
UpgradeOpts. clap_complete panics when generating zsh completions if a
conflict references an arg unknown to the command.

Move the "check" conflicts to UpgradeOpts -> check and keep only the
valid conflicts in DownloadOnlyOpts.

Signed-off-by: Pragyan Poudyal <pragyanpoudyal41999@gmail.com>
};

if opts.download_opts.from_downloaded {
return apply_upgrade_from_downloaded(storage, booted_cfs, &host, &do_upgrade_opts).await;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we care that staged deployments don't have any provenance whether they came from upgrade or switch? As-is one could do bootc upgrade --download-only && bootc switch --from-downloaded to apply an upgrade. There's no way to distinguish between an "upgrade-staged" vs "switch-staged" deployment.

I worry that a typical user that doesn't understand or care about all of the implementation details is not going to realize that upgrades and switches can be used interchangeably in this way and might be surprised if they think that upgrades and switches use distinct staged deployments.

Then again I guess the ostree backend already does it this way too, so it's at least consistent.

Maybe something we address in a followup.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/documentation Updates to the documentation ci/tier-1 Run CI for tier-1 OS (centos-10) only

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support --download-only for bootc switch

2 participants