Skip to content

Commit

Permalink
[teamd]: Bring down all member interfaces before starting teamd (#1081)
Browse files Browse the repository at this point in the history
teamd requires all members to be set down before adding as a team port

Signed-off-by: Shu0T1an ChenG <shuche@microsoft.com>
  • Loading branch information
Shuotian Cheng committed Oct 26, 2017
1 parent 3d290b9 commit d1156ca
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions dockers/docker-teamd/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@ fi

for pc in `sonic-cfggen -d -v "PORTCHANNEL.keys() | join(' ') if PORTCHANNEL"`; do
sonic-cfggen -d -a '{"pc":"'$pc'","hwaddr":"'$MAC_ADDRESS'"}' -t /usr/share/sonic/templates/teamd.j2 > $TEAMD_CONF_PATH/$pc.conf
# bring down all member ports before starting teamd
for member in $(sonic-cfggen -d -v "PORTCHANNEL['$pc']['members'] | join(' ')" ); do
if [ -L /sys/class/net/$member ]; then
ip link set $member down
fi
done
done

mkdir -p /var/sonic
Expand Down

0 comments on commit d1156ca

Please sign in to comment.