feat(installer): integrate complete runtime support for SONIE and systemd-boot OS upgrades#4532
Open
jasonbridges wants to merge 3 commits into
Open
feat(installer): integrate complete runtime support for SONIE and systemd-boot OS upgrades#4532jasonbridges wants to merge 3 commits into
jasonbridges wants to merge 3 commits into
Conversation
Collaborator
|
/azp run |
|
Azure Pipelines will not run the associated pipelines, because the pull request was updated after the run command was issued. Review the pull request again and issue a new run command. |
Collaborator
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Collaborator
|
/azp run |
|
Azure Pipelines will not run the associated pipelines, because the pull request was updated after the run command was issued. Review the pull request again and issue a new run command. |
Collaborator
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Collaborator
|
/azp run |
|
Azure Pipelines will not run the associated pipelines, because the pull request was updated after the run command was issued. Review the pull request again and issue a new run command. |
Collaborator
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Collaborator
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Collaborator
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Collaborator
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Collaborator
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Collaborator
|
/azp run |
Collaborator
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Collaborator
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Collaborator
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Collaborator
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Collaborator
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Collaborator
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Collaborator
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Change-Id: I4d4cfa6115957987e33fda2c663fcaf3d69be991
Collaborator
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Change-Id: Ic923c51ded5c8343e4bf6cae2b83f3b2630c440a
Collaborator
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
saiarcot895
reviewed
May 29, 2026
| # Always check for A/B slots first as they are preferred for SONiC | ||
| candidates = [] | ||
| for slot in ["image-A", "image-B"]: | ||
| slot_path = path.join(HOST_PATH, slot) |
Contributor
There was a problem hiding this comment.
I think this assumes that the two images will be mounted at /host/image-A and /host/image-B? Might it make sense to use partition labels or something similar instead of assuming it will be mounted there?
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.
Pull Request Description: Add Support for SONIE &
systemd-bootUpgradesTitle
feat(installer): integrate complete runtime support for SONIE and systemd-boot OS upgradesDescription Body
What I did
Introduced comprehensive runtime OS upgrade and installation support for bare-metal SONIE (SONiC Operating System Installation Environment) and generic
systemd-bootbased platforms into thesonic-installerframework.This enables standard CLI operations (
sonic-installer install,set-next-boot,set-default) to function seamlessly on non-GRUB,systemd-bootdriven distribution architectures.How I did it
Ported and combined three major feature evolutions into the standard utility framework:
sonic_sdboot_utilslibrary to interact natively withsystemd-bootloader variables and EFI configurations. Added theSonieGrubBootloader(sonie.py) andNullBootloader(null.py) classes.sonic_installer/main.py. Added support for the--skip-bootloaderparameter, robust temporary folder cleanup onSystemExit, and conditional database flags (-d) for hermetic environment updates.get_image_pathinbootloader.pyto implement a highly robust fallback sequence:sonic-configYAML manifests rather than guessing by file timestamps./proc/cmdlinerunning state.How to verify it
Execute standard local unit test suites to confirm 100% pass rates across the new bootloader and assessment logic:
Manual verification can be conducted on a SONIE bare-metal or QEMU instance:
Previous command output (if the output of a command-line utility has changed)
Operations on
systemd-bootarchitectures previously failed with fatal exceptions due to missing GRUB environment files:New command output (if the output of a command-line utility has changed)
Standard
sonic-installeroutput now processes cleanly onsystemd-bootplatforms: