Skip to content

Fix interfaces-config missing first-boot transaction after image upgrade#27341

Open
rameshraghupathy wants to merge 1 commit into
sonic-net:masterfrom
rameshraghupathy:interface-config.service.fix
Open

Fix interfaces-config missing first-boot transaction after image upgrade#27341
rameshraghupathy wants to merge 1 commit into
sonic-net:masterfrom
rameshraghupathy:interface-config.service.fix

Conversation

@rameshraghupathy
Copy link
Copy Markdown
Contributor

@rameshraghupathy rameshraghupathy commented May 13, 2026

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)

  • 202305
  • 202311
  • 202405
  • 202411
  • 202505
  • 202511

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.

Signed-off-by: Ramesh Raghupathy <ram@cisco.com>
@rameshraghupathy rameshraghupathy requested a review from lguohan as a code owner May 13, 2026 06:13
@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run Azure.sonic-buildimage

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@rameshraghupathy
Copy link
Copy Markdown
Contributor Author

@prabhataravind Please review

@mssonicbld
Copy link
Copy Markdown
Collaborator

This PR has backport request for branch(es): 202511.
Added label(s) for branch(es) 202511.

---Powered by SONiC BuildBot

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants