[action] [PR:26844] Fix issue #26776: missing /zmq_swss directory causes orchagent crash - #2804
Open
mssonicbld wants to merge 1 commit into
Open
mssonicbld wants to merge 1 commit into
mssonicbld wants to merge 1 commit into
Conversation
Issue: missing /zmq_swss directory causes orchagent crash #### Why I did it After sonic-net/sonic-swss#4243 was merged (around 2026-04-01), orchagent uses ZMQ with IPC sockets for P4 orchestration. These sockets are bound to paths like ipc:///zmq_swss/p4orch_zmq_swss_ep. On real SONiC systems: The /zmq_swss directory is bind-mounted into the swss container from the host filesystem via the docker run configuration in rules/docker-orchagent.mk. On docker-sonic-vs: The container runs standalone (e.g., via containerlab) without a host bind mount, so the /zmq_swss directory doesn't exist. When orchagent tries to bind to the ZMQ IPC endpoint, zmq_bind() fails with errno 2 (No such file or directory), causing orchagent to abort. #### How I did it I've added a directory creation step in the docker-sonic-vs Dockerfile: File: platform/vs/docker-sonic-vs/Dockerfile.j2 Change: Added lines 171-173 to create the /zmq_swss directory: #### How to verify it The workaround mentioned in the issue (manually creating the directory and restarting) confirms this fix will work: docker exec <container> mkdir -p /zmq_swss docker exec <container> supervisorctl restart start.sh #### Which release branch to backport (provide reason below if selected) - [x] 202305 - [x] 202311 - [x] 202405 - [x] 202411 - [x] 202505 - [x] 202511 Reason for backporting: docker-sonic-vs crashes on startup due to missing /zmq_swss directory. This bug affects stable releases as well, so backporting ensures docker-sonic-vs runs correctly on those branches. #### Tested branch (Please provide the tested image version) - [x] 20200712 #### Description for the changelog PR#26776 under sonic-net repo. Added lines 171-173 to create the /zmq_swss directory to ensure that the directory exists inside the container filesystem, allowing orchagent to successfully bind to its ZMQ IPC endpoints and start properly. #### Link to config_db schema for YANG module changes N/A #### A picture of a cute animal (not mandatory but encouraged) ╱|、 (˚ˎ 。7 |、˜〵 じしˍ,)ノ Signed-off-by: Sonic Build Admin <sonicbld@microsoft.com>
Collaborator
Author
|
Original PR: sonic-net/sonic-buildimage#26844 |
Collaborator
Author
|
/azp run |
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
7 tasks
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
Collaborator
Author
|
This cherry pick PR has been opened for more than 3 days. The mssonicbld will attempt to retry. ---Powered by SONiC BuildBot
|
Collaborator
Author
|
/azpw retry |
Collaborator
Author
|
bingwang-ms The cherry pick PR didn't pass PR checker after retry. Left a comment in original PR sonic-net/sonic-buildimage#26844 to notify author. ---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.
Issue: missing /zmq_swss directory causes orchagent crash
Why I did it
After sonic-net/sonic-swss#4243 was merged (around 2026-04-01), orchagent uses ZMQ with IPC sockets for P4 orchestration. These sockets are bound to paths like ipc:///zmq_swss/p4orch_zmq_swss_ep.
On real SONiC systems: The /zmq_swss directory is bind-mounted into the swss container from the host filesystem via the docker run configuration in rules/docker-orchagent.mk.
On docker-sonic-vs: The container runs standalone (e.g., via containerlab) without a host bind mount, so the /zmq_swss directory doesn't exist. When orchagent tries to bind to the ZMQ IPC endpoint, zmq_bind() fails with errno 2 (No such file or directory), causing orchagent to abort.
How I did it
I've added a directory creation step in the docker-sonic-vs Dockerfile:
File: platform/vs/docker-sonic-vs/Dockerfile.j2
Change: Added lines 171-173 to create the /zmq_swss directory:
How to verify it
The workaround mentioned in the issue (manually creating the directory and restarting) confirms this fix will work:
docker exec mkdir -p /zmq_swss
docker exec supervisorctl
restart start.sh
Which release branch to backport (provide reason below if selected)
Reason for backporting: docker-sonic-vs crashes on startup due to missing /zmq_swss directory. This bug affects
stable releases as well, so backporting ensures docker-sonic-vs runs correctly on those branches.
Tested branch (Please provide the tested image version)
Description for the changelog
PR#26776 under sonic-net repo. Added lines 171-173 to create the /zmq_swss directory to ensure that the directory exists inside the container filesystem, allowing orchagent to successfully bind to its ZMQ IPC endpoints and start properly.
Link to config_db schema for YANG module changes
N/A
A picture of a cute animal (not mandatory but encouraged)
╱|、
(˚ˎ 。7
|、˜〵
じしˍ,)ノ
Signed-off-by: Sonic Build Admin sonicbld@microsoft.com