From f63dc738f9cacc8e198f75d47d8e1265685bee3f Mon Sep 17 00:00:00 2001 From: Nikola Dancejic <26731235+Ndancejic@users.noreply.github.com> Date: Fri, 12 Aug 2022 11:34:10 -0700 Subject: [PATCH] [swss] Adding conditional for bgp when on multi ASIC platform (#11691) bgp should be a per-asic service, and runs for each namespace on multi-asic platforms. However, putting bgp in MULTI_INST_DEPENDENT causes swss to be restarted as well as bgp. this is causing issues after #11000 Issue: #11653 This fix: removes bgp from dependents list adds a conditional that either adds bgp, or bgp@$DEV to separate between single and multi-asic platforms --- files/scripts/swss.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/files/scripts/swss.sh b/files/scripts/swss.sh index 61315acc14..93b1a3811c 100755 --- a/files/scripts/swss.sh +++ b/files/scripts/swss.sh @@ -9,7 +9,9 @@ LOCKFILE="/tmp/swss-syncd-lock$DEV" NAMESPACE_PREFIX="asic" ETC_SONIC_PATH="/etc/sonic/" -DEPENDENT="radv bgp" +# DEPENDENT initially contains namespace independent services +# namespace specific services are added later in this script. +DEPENDENT="radv" MULTI_INST_DEPENDENT="teamd" . /usr/local/bin/asic_status.sh @@ -309,9 +311,11 @@ function check_peer_gbsyncd() if [ "$DEV" ]; then NET_NS="$NAMESPACE_PREFIX$DEV" #name of the network namespace SONIC_DB_CLI="sonic-db-cli -n $NET_NS" + DEPENDENT+=" bgp@${DEV}" else NET_NS="" SONIC_DB_CLI="sonic-db-cli" + DEPENDENT+=" bgp" fi check_peer_gbsyncd