Skip to content

Commit

Permalink
Update orchagent.sh (sonic-net#19062)
Browse files Browse the repository at this point in the history
Fix Orchagent crash during boot because of eth0 not config address.

#### Why I did it
Fix sonic-net#19044
On SmartSwitch DPU the eth0 might not config any address

##### Work item tracking
- Microsoft ADO: 28188952

#### How I did it
Fix Orchagent crash during boot because of eth0 not config address.

#### How to verify it
Pass all UT.
Manually verified the orchagent not crash when eth not config address:
root       20026  8.3  1.2 748344 49512 pts/0    Sl   06:25   0:03 /usr/bin/orchagent -d /var/log/swss -b 1024 -s -m 22:48:23:27:33:d8 -q tcp://127.0.0.1:8100

#### Description for the changelog
Fix Orchagent crash during boot because of eth0 not config address.
  • Loading branch information
liuh-80 authored May 28, 2024
1 parent 319c024 commit d0548cf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion dockers/docker-orchagent/orchagent.sh
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ if [[ x"${LOCALHOST_SUBTYPE}" == x"SmartSwitch" ]]; then
if [[ $midplane_ip != "" ]]; then
# Enable ZMQ with eth0-midplane address
ORCHAGENT_ARGS+=" -q tcp://${midplane_mgmt_ip}:8100"
elif [[ $mgmt_ip != "" ]]; then
elif [[ $mgmt_ip != "" ]] && [[ $mgmt_ip != "null" ]]; then
# If eth0-midplane interface does not exist, enable ZMQ with eth0 address
ORCHAGENT_ARGS+=" -q tcp://${mgmt_ip}:8100"
else
Expand Down

0 comments on commit d0548cf

Please sign in to comment.