Skip to content

Commit

Permalink
[swss] Adding conditional for bgp when on multi ASIC platform (#11691)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
Ndancejic authored and yxieca committed Aug 17, 2022
1 parent f9bfa47 commit f63dc73
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion files/scripts/swss.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit f63dc73

Please sign in to comment.