Skip to content

Commit 4681703

Browse files
authored
[chassis]: removed dependency for bgp and swss for chassis supervisor (#15734)
Fixes #15667 and #13293 Work item tracking Microsoft ADO 24472854: How I did it On chassis supervisor bgp feature is disabled in hostcfgd. The dependency between swss and bgp causes the bgp containers to start even though the feature is disabled. How to verify it Tests on chassis supervisor and LC
1 parent d9393b0 commit 4681703

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

files/scripts/swss.sh

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -318,6 +318,16 @@ function check_macsec()
318318
fi
319319
}
320320

321+
function check_add_bgp_dependency()
322+
{
323+
if ! is_chassis_supervisor; then
324+
if [ "$DEV" ]; then
325+
DEPENDENT="${DEPENDENT} bgp@${DEV}"
326+
else
327+
DEPENDENT="${DEPENDENT} bgp"
328+
fi
329+
fi
330+
}
321331
function check_ports_present()
322332
{
323333
PORT_CONFIG_INI=/usr/share/sonic/device/$PLATFORM/$HWSKU/$DEV/port_config.ini
@@ -353,19 +363,17 @@ fi
353363
if [ "$DEV" ]; then
354364
NET_NS="$NAMESPACE_PREFIX$DEV" #name of the network namespace
355365
SONIC_DB_CLI="sonic-db-cli -n $NET_NS"
356-
DEPENDENT+=" bgp@${DEV}"
357366
else
358367
NET_NS=""
359368
SONIC_DB_CLI="sonic-db-cli"
360-
DEPENDENT+=" bgp"
361369
fi
362370

363371
PLATFORM=`$SONIC_DB_CLI CONFIG_DB hget 'DEVICE_METADATA|localhost' platform`
364372
HWSKU=`$SONIC_DB_CLI CONFIG_DB hget 'DEVICE_METADATA|localhost' hwsku`
365373

366374
check_peer_gbsyncd
367375
check_macsec
368-
376+
check_add_bgp_dependency
369377
check_ports_present
370378
PORTS_PRESENT=$?
371379

0 commit comments

Comments
 (0)