Mon, Aug 31, 2015 at 03:28:12PM CEST, lucien.xin(a)gmail.com wrote:
From: root <root(a)dhcp12-119.nay.redhat.com>
I fixed this by hand :)
commit 01c1e7888cd9 ("teamd: do not change ctx->hwaddr pointer")
make the first iface's mac is not same with the team:
eth1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
ether 26:29:fa:60:f0:ea txqueuelen 1000 (Ethernet) <---
eth2: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
ether 00:a4:f3:8c:47:d6 txqueuelen 1000 (Ethernet)
team0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
ether 00:a4:f3:8c:47:d6 txqueuelen 0 (Ethernet) <---
when we add the first iface to team0, three watch events will be triggerred
in teamd:
1.teamd_event_watch_port_added.
team0's mac will be updated with eth1's mac in teamd_hwaddr_check_change(),
besides, ctx->hwaddr will not be update by this mac any more, it still keep
the original team mac.
2.port_priv_change_handler_func.
.port_added() of loadbalance will update eth1's mac with ctx->hwaddr. that's
why eth1's mac is different from team0's.
but for lacp and activebackup, they both has .hwaddr_changed(). when another
watch event comes:
3. teamd_event_ifinf_hwaddr_changed:
the eth1's mac will be update with team0's mac, now they have the same macs.
for broadcast, roundrobin, and random, they don't have neither .port_added()
nor .hwaddr_changed(), so the macs of team0 and eth1 are consistent.
we can fix it by adding a .hwaddr_changed for loadbalance mode.
Fixes: Commit 01c1e7888cd9 ("teamd: do not change ctx->hwaddr pointer")
Just ---Fixes: hashpart ("desc")--- is enough. No "Commit" needed.
Signed-off-by: Xin Long <lucien.xin(a)gmail.com>
applied. Thanks.
Jiri