[docker] Fix Docker commands hanging before docker.service starts#25398
Merged
lguohan merged 3 commits intosonic-net:masterfrom Feb 14, 2026
Merged
Conversation
Signed-off-by: Chiranjeevi U <[email protected]>
Collaborator
|
/azp run Azure.sonic-buildimage |
|
|
|
Azure Pipelines successfully started running 1 pipeline(s). |
Collaborator
|
/azp run Azure.sonic-buildimage |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Contributor
|
@make1980 please help check this, |
Collaborator
|
/azp run Azure.sonic-buildimage |
|
Azure Pipelines successfully started running 1 pipeline(s). |
Contributor
There was a problem hiding this comment.
Pull request overview
Updates SONiC’s Docker systemd drop-in so Docker socket activation works correctly during early boot, preventing docker client commands from hanging before docker.service starts.
Changes:
- Switch
dockerdhost argument from-H unix://to-H fd://to restore systemd socket activation behavior. - Add explanatory comments documenting why
fd://is required to avoid regressions.
qiluo-msft
approved these changes
Feb 11, 2026
Collaborator
qiluo-msft
left a comment
There was a problem hiding this comment.
lgtm. Please keep open for some days for more reviewers.
saiarcot895
approved these changes
Feb 11, 2026
Collaborator
|
@qiluo-msft @saiarcot895 Can we merge this? |
Collaborator
|
Cherry-pick PR to 202511: #25503 |
FengPan-Frank
pushed a commit
to FengPan-Frank/sonic-buildimage
that referenced
this pull request
Mar 6, 2026
sonic-net#25398) Why I did it Fix Docker socket activation broken since PR sonic-net#2417 (January 2019). Docker commands executed before docker.service starts hang indefinitely because -H unix:// breaks systemd socket activation. Fixes sonic-net#25383 Work item tracking Microsoft ADO (number only): How I did it Changed -H unix:// to -H fd:// in files/docker/docker.service.conf. Added documentation comments explaining why this flag is required to prevent future regression. How to verify it Verified on VS image: docker.socket is active and triggers docker.service dockerd runs with -H fd:// flag Socket activation works correctly Signed-off-by: Chiranjeevi U <[email protected]> Signed-off-by: Feng Pan <[email protected]>
dprital
pushed a commit
that referenced
this pull request
Mar 19, 2026
#25398) Why I did it Fix Docker socket activation broken since PR #2417 (January 2019). Docker commands executed before docker.service starts hang indefinitely because -H unix:// breaks systemd socket activation. Fixes #25383 Work item tracking Microsoft ADO (number only): How I did it Changed -H unix:// to -H fd:// in files/docker/docker.service.conf. Added documentation comments explaining why this flag is required to prevent future regression. How to verify it Verified on VS image: docker.socket is active and triggers docker.service dockerd runs with -H fd:// flag Socket activation works correctly Signed-off-by: Chiranjeevi U <[email protected]> Signed-off-by: dprital <[email protected]>
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
Fix Docker socket activation broken since PR #2417 (January 2019). Docker commands executed before docker.service starts hang indefinitely because -H unix:// breaks systemd socket activation.
Fixes #25383
Work item tracking
How I did it
Changed
-H unix://to-H fd://infiles/docker/docker.service.conf. Added documentation comments explaining why this flag is required to prevent future regression.How to verify it
Verified on VS image:
Which release branch to backport (provide reason below if selected)
Reason: This is a bug fix that has existed since January 2019. All active release branches are affected and should receive this fix.
Tested branch (Please provide the tested image version)
fix_docker-socket-activation-25383.0-b01504e6c(sonic-vs.img.gz)Description for the changelog
Fix Docker socket activation hang by using -H fd:// instead of -H unix:// in docker.service.conf
Link to config_db schema for YANG module changes
N/A
A picture of a cute animal (not mandatory but encouraged)