Skip to content

Commit

Permalink
Stop teamd service before syncd (#6755)
Browse files Browse the repository at this point in the history
- What I did
All SWSS dependent services should stop before SWSS service to avoid future possible issues.
For example 'teamd' service will stop before to allow the driver unload netdev gracefully.
This is to stop all LAG's before restarting syncd service when running 'config reload' command.

- How I did it
Change the order of dependent services of SWSS.

- How to verify it
Run 'config reload' command.
Previously the operation failed when a large number of PortChannel configured on the system.

Signed-off-by: Shlomi Bitton <shlomibi@nvidia.com>
  • Loading branch information
shlomibitton committed Feb 15, 2021
1 parent 97c605f commit f6bee73
Showing 1 changed file with 8 additions and 9 deletions.
17 changes: 8 additions & 9 deletions files/scripts/swss.sh
Original file line number Diff line number Diff line change
Expand Up @@ -110,22 +110,21 @@ start_peer_and_dependent_services() {
stop_peer_and_dependent_services() {
# if warm/fast start enabled or peer lock exists, don't stop peer service docker
if [[ x"$WARM_BOOT" != x"true" ]] && [[ x"$FAST_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
else
/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
}

Expand Down

0 comments on commit f6bee73

Please sign in to comment.