Repository navigation
switch: Add --target-imgref to Support a separate update image reference - #2603
Open
HarshwardhanPatil07 wants to merge 8 commits into
Open
HarshwardhanPatil07 wants to merge 8 commits into
HarshwardhanPatil07 wants to merge 8 commits into
Conversation
HarshwardhanPatil07
force-pushed
the
fix/switch-target-imgref
branch
2 times, most recently
from
October 30, 2026 09:41
75ea0d9 to
8055a2f
Compare
HarshwardhanPatil07
requested review from
Johan-Liebert1,
cgwalters and
jmarrero
October 30, 2026 09:41
cgwalters
reviewed
Oct 30, 2026
There was a problem hiding this comment.
🟡 Changes recommended
Unresolved issues can misidentify image sources, lose or strand pending origin changes, and break addon activation, unified-store updates, or soft-reboot behavior.
9 open issues
Prevent addon mutations from bypassing pending origin activation · New Keep status and recovery usable with stale origin transactions · New Normalize legacy manifest hashes before comparing image identity · New Allow auto soft reboot to leave origin changes staged · New Preserve pending origin changes until replacement succeeds · New Defer soft-reboot restrictions until the activation target is known · New Disambiguate registry host-and-port references from transport syntax · New Preserve origin-only no-op when target image reference is absent · New Preserve unified-store mode when importing the target image · New
Review effort: Balanced
cgwalters
reviewed
Oct 30, 2026
HarshwardhanPatil07
force-pushed
the
fix/switch-target-imgref
branch
2 times, most recently
from
October 31, 2026 13:42
a63c7f4 to
b00d6b9
Compare
Johan-Liebert1
requested changes
Nov 2, 2026
Member
|
Also the first two commits need proper messages and not just |
HarshwardhanPatil07
force-pushed
the
fix/switch-target-imgref
branch
3 times, most recently
from
November 3, 2026 09:22
462a54b to
7818ea5
Compare
HarshwardhanPatil07
force-pushed
the
fix/switch-target-imgref
branch
from
November 6, 2026 05:33
7818ea5 to
f511178
Compare
Johan-Liebert1
requested changes
Nov 6, 2026
There was a problem hiding this comment.
🟡 Changes recommended
Active issues misparse valid transport-prefixed targets and cause offline switches from host-only containers-storage sources to fail on OSTree hosts using unified storage.
2 open issues
9 resolved since last review
Preserve unified-store mode when importing the target image Preserve origin-only no-op when target image reference is absent Disambiguate registry host-and-port references from transport syntax Defer soft-reboot restrictions until the activation target is known Preserve pending origin changes until replacement succeeds Allow auto soft reboot to leave origin changes staged Normalize legacy manifest hashes before comparing image identity Keep status and recovery usable with stale origin transactions Prevent addon mutations from bypassing pending origin activation
Review effort: Balanced
HarshwardhanPatil07
force-pushed
the
fix/switch-target-imgref
branch
3 times, most recently
from
November 6, 2026 11:17
5b16978 to
1dc67ed
Compare
HarshwardhanPatil07
force-pushed
the
fix/switch-target-imgref
branch
from
November 12, 2026 06:15
1dc67ed to
686c19e
Compare
Member
Author
|
rebased |
cgwalters
reviewed
Nov 13, 2026
HarshwardhanPatil07
force-pushed
the
fix/switch-target-imgref
branch
2 times, most recently
from
November 19, 2026 11:21
cb93245 to
6d76838
Compare
HarshwardhanPatil07
force-pushed
the
fix/switch-target-imgref
branch
from
November 30, 2026 05:31
6d76838 to
7adf2e8
Compare
Member
Author
|
ci failures are fixed in #2685 |
Allow switch to accept an update origin separate from the image fetched now. Pass the target through OSTree staging and composefs switch so later updates can follow the recorded reference. Signed-off-by: Pragyan Poudyal <[email protected]> Co-authored-by: HarshwardhanPatil07 <[email protected]>
Keep the pulled image name alongside a staged deployment when switch chooses a different update origin. This prepares the staged state to distinguish the delivery source from the recorded origin. Signed-off-by: Pragyan Poudyal <[email protected]> Co-authored-by: HarshwardhanPatil07 <[email protected]>
Require an explicit transport for the target and parse it using the existing image reference type. Normalize references before fetching, reject incompatible options, and avoid advertising enforced verification on an unsupported composefs path. Assisted-by: AI Signed-off-by: HarshwardhanPatil07 <[email protected]>
A cache hit returns before import writes the target ref. Point the requested target at the cached merge commit before returning AlreadyPresent, unless the caller disabled image refs with set_no_imgref. Exercise the cached import paths and verify that removing the source ref leaves the target and its layers available. Assisted-by: AI Signed-off-by: HarshwardhanPatil07 <[email protected]>
The update origin cannot identify which offline delivery was staged. Record the pull source in each deployment origin and compare both references before fetching, preserving download-only locks on repeats. Route OSTree imports through the source while retaining the target. Cover offline repeats, source replacement, activation, and provenance after reboot on both backends. Assisted-by: AI Signed-off-by: HarshwardhanPatil07 <[email protected]>
Recording an origin is only useful if later updates actually use it. Extend the reboot test to check unchanged content and a newer image at the recorded update origin after completing an offline delivery. Assisted-by: AI Signed-off-by: HarshwardhanPatil07 <[email protected]>
Explain how to obtain an image from a temporary source while retaining the normal update origin. Document repeat behavior, activation, and user-visible restrictions with local-storage and registry examples. Assisted-by: AI Signed-off-by: HarshwardhanPatil07 <[email protected]>
Detect the deployed image by its OCI config ID when its update origin differs from the name in containers-storage. During cleanup, retain the image by ID for deployments with a recorded delivery source. Other deployments continue to use name-based retention. Copy containers-storage deliveries from host Podman storage when needed so they can be imported through the unified store. Assisted-by: AI Signed-off-by: HarshwardhanPatil07 <[email protected]>
HarshwardhanPatil07
force-pushed
the
fix/switch-target-imgref
branch
from
December 1, 2026 04:19
7adf2e8 to
249b539
Compare
Member
Author
|
@Johan-Liebert1 It would be nice if we could merge this pr, i don't see any new changes to be done here? do you see any thoughts which needs to be shared here? |
HarshwardhanPatil07
requested review from
Johan-Liebert1
and removed request for
Johan-Liebert1
December 1, 2026 05:07
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.

Adds --target-imgref to bootc switch for OSTree and composefs, allowing an image to be downloaded from a temporary source while keeping a different registry for future updates.
Manually verified composefs UKI switching, repeated switches, and reboot with the previous deployment available for rollback. Verified OSTree download-only staging and both references in its .origin file.
Fixes #2464