Stop teamd service before syncd (#6756)

When large number of port channels (more than 64) is configured, a config reload command might ends with not all port channel configured and up. Further debug shows that unloading the port channels on the ASIC driver take a lot of time.
With the change, deleting all port channels before the syncd restart will free resources better and the ASIC driver will unload all netdev fast and the operation will execute properly.
This commit is contained in:
shlomibitton 2021-02-19 01:48:11 +02:00 committed by GitHub
parent dc5eaf618f
commit 4a1742e839
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -101,14 +101,6 @@ start_peer_and_dependent_services() {
stop_peer_and_dependent_services() {
# if warm start enabled or peer lock exists, don't stop peer service docker
if [[ x"$WARM_BOOT" != x"true" ]]; then
if [[ ! -z $DEV ]]; then
/bin/systemctl stop ${PEER}@$DEV
else
/bin/systemctl stop ${PEER}
fi
for dep in ${DEPENDENT}; do
/bin/systemctl stop ${dep}
done
for dep in ${MULTI_INST_DEPENDENT}; do
if [[ ! -z $DEV ]]; then
/bin/systemctl stop ${dep}@$DEV
@ -116,7 +108,14 @@ stop_peer_and_dependent_services() {
/bin/systemctl stop ${dep}
fi
done
for dep in ${DEPENDENT}; do
/bin/systemctl stop ${dep}
done
if [[ ! -z $DEV ]]; then
/bin/systemctl stop ${PEER}@$DEV
else
/bin/systemctl stop ${PEER}
fi
fi
}