[teamd]: Bring down all member interfaces before starting teamd (#1096)
Taken from https://github.com/Azure/sonic-buildimage/pull/1081
This commit is contained in:
parent
b945010243
commit
fd2455d58e
@ -17,6 +17,12 @@ fi
|
|||||||
|
|
||||||
for pc in `sonic-cfggen -d -v "PORTCHANNEL.keys() | join(' ') if PORTCHANNEL"`; do
|
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
|
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
|
done
|
||||||
|
|
||||||
mkdir -p /var/sonic
|
mkdir -p /var/sonic
|
||||||
|
Reference in New Issue
Block a user