From d0548cfe7b36c8bd95e5cc473e46fc9b92dda27b Mon Sep 17 00:00:00 2001 From: Hua Liu <58683130+liuh-80@users.noreply.github.com> Date: Wed, 29 May 2024 05:59:24 +0800 Subject: [PATCH] Update orchagent.sh (#19062) Fix Orchagent crash during boot because of eth0 not config address. #### Why I did it Fix https://github.com/sonic-net/sonic-buildimage/issues/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. --- dockers/docker-orchagent/orchagent.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dockers/docker-orchagent/orchagent.sh b/dockers/docker-orchagent/orchagent.sh index 1b2a1b88ab72..df29c6a258b5 100755 --- a/dockers/docker-orchagent/orchagent.sh +++ b/dockers/docker-orchagent/orchagent.sh @@ -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