Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bind ZMQ to midplane mgmt interface on SmartSwitch DPU #20352

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions dockers/docker-orchagent/orchagent.sh
Original file line number Diff line number Diff line change
Expand Up @@ -77,13 +77,13 @@ fi
# Enable ZMQ for SmartSwitch
LOCALHOST_SUBTYPE=`sonic-db-cli CONFIG_DB hget "DEVICE_METADATA|localhost" "subtype"`
if [[ x"${LOCALHOST_SUBTYPE}" == x"SmartSwitch" ]]; then
midplane_mgmt_ip=$( ip -json -4 addr show eth0-midplane | jq -r ".[0].addr_info[0].local" )
midplane_mgmt_state=$( ip -json -4 addr show eth0-midplane | jq -r ".[0].operstate" )
mgmt_ip=$( ip -json -4 addr show eth0 | jq -r ".[0].addr_info[0].local" )
if [[ $midplane_ip != "" ]]; then
# Enable ZMQ with eth0-midplane address
ORCHAGENT_ARGS+=" -q tcp://${midplane_mgmt_ip}:8100"
if [[ $midplane_mgmt_state == "UP" ]]; then
# Enable ZMQ with eth0-midplane interface name
ORCHAGENT_ARGS+=" -q tcp://eth0-midplane:8100"
elif [[ $mgmt_ip != "" ]] && [[ $mgmt_ip != "null" ]]; then
# If eth0-midplane interface does not exist, enable ZMQ with eth0 address
# If eth0-midplane interface does not up, enable ZMQ with eth0 address
ORCHAGENT_ARGS+=" -q tcp://${mgmt_ip}:8100"
else
ORCHAGENT_ARGS+=" -q tcp://127.0.0.1:8100"
Expand Down
Loading