Fix interfaces-config missing first-boot transaction after image upgrade#27341
Open
rameshraghupathy wants to merge 1 commit into
Open
Fix interfaces-config missing first-boot transaction after image upgrade#27341rameshraghupathy wants to merge 1 commit into
rameshraghupathy wants to merge 1 commit into
Conversation
Signed-off-by: Ramesh Raghupathy <ram@cisco.com>
Collaborator
|
/azp run Azure.sonic-buildimage |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Contributor
Author
|
@prabhataravind Please review |
Collaborator
|
This PR has backport request for branch(es): 202511. ---Powered by SONiC BuildBot
|
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.
Why I did it
On some image upgrade scenarios after sonic-installer install, interfaces-config.service can miss its initial boot transaction during first-boot platform package installation in rc.local. In this condition, the service remains inactive even after the system later recovers normally, leaving management interface eth0 unconfigured until interfaces-config.service is manually restarted.
This issue was observed after the Docker socket activation changes introduced by PR #25503, which can cause Docker and related services to be triggered earlier during first boot.
This change ensures interfaces-config.service is requeued after first-boot platform package installation completes so that management interface configuration succeeds automatically after image upgrade.
The change only affects the existing first-boot upgrade path in rc.local. Normal reboot flows are unchanged, and if interfaces-config.service has already completed successfully, the additional systemctl start operation is a no-op and does not impact existing platforms.
How I did it
Added the following recovery logic in rc.local after first-boot platform package installation:
systemctl reset-failed interfaces-config.service || true
systemctl start --no-block interfaces-config.service || true
How to verify it
nstall a new SONiC image using sonic-installer install
Reboot into the newly installed image
Verify that eth0 is configured automatically after first boot:
show ip int | grep eth0
Verify interfaces-config.service completed successfully:
systemctl status interfaces-config.service
Verify no manual recovery/restart is needed after image upgrade.
Which release branch to backport (provide reason below if selected)
Tested branch (Please provide the tested image version)
master
Description for the changelog
Fix first-boot image upgrade issue where interfaces-config.service could miss its initial startup transaction on SmartSwitch platforms, leaving eth0 unconfigured after upgrade.