Skip to content

Commit

Permalink
Bind ZMQ to midplane mgmt interface on SmartSwitch (#20352)
Browse files Browse the repository at this point in the history
Bind ZMQ to midplane mgmt interface on SmartSwitch
  • Loading branch information
liuh-80 authored Oct 9, 2024
1 parent 6741c8c commit 07dd2b4
Showing 1 changed file with 5 additions and 5 deletions.
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

0 comments on commit 07dd2b4

Please sign in to comment.