Bug 1488715
| Summary: | The Team MAC address seems to randomly change after every reboot or when the team is down/up cycled | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | Venkatesh Kavtikwar <vkavtikw> |
| Component: | NetworkManager | Assignee: | Beniamino Galvani <bgalvani> |
| Status: | CLOSED DUPLICATE | QA Contact: | Desktop QE <desktop-qa-list> |
| Severity: | high | Docs Contact: | |
| Priority: | high | ||
| Version: | 7.4 | CC: | aiyengar, aloughla, atragler, bgalvani, fgiudici, lrintel, rkhan, sukulkar, thaller, vkavtikw |
| Target Milestone: | rc | ||
| Target Release: | --- | ||
| Hardware: | x86_64 | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2017-10-06 13:35:02 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
As far as I see, nothing indicates that the NetworkManager connection for the team interface specifies an explict MAC address.
For team, there are two ways. Either set "hwaddr" in the team JSON config:
nmcli connection modify "$TEAM0" team.config '{"hwaddr": "02:01:02:03:04:05", "runner": {"name": "activebackup"}}'
Or better: set ethernet.cloned-mac-address to a fixed address:
nmcli connection modify "$TEAM0" ethernet.cloned-mac-address 02:01:02:03:04:05
Why do you expect the MAC address of the software device to be stable, if you don't configure it?
Using a dispatcher script seems a bad workaround, compared to explicitly configuring it in the connection. Is there some reason that doesn't work?
Hello Thomas, Thanks for the input and the workaround where we can add the hardware address to the team configuration which will give fix the problem. So the query here is :- - Is it expected to add the hardware address to team configuration file to get a fixed team mac addressing? and if so then what should be mac address provided at the time of a new team configuration? Once the team is created and system assigned some random mac address we can pick that and modify the connection but what if we want to add it at the time of team connection creation? - Please correct me here as I am still learning, is it an enhancement compare to bonding where teaming picks any random mac address than the one from any slave whereas in bonding, systems picks mac address from any of the slave and assign it to bond interface & keeps it same across the reboots. So I am finding it a bit difficult to understand the use-case of this feature with teaming as it will be difficult to modify the every new team connection with the mac address generated by system. Coming to the queries:- Why do you expect the MAC address of the software device to be stable, if you don't configure it? - Our most of the customers are familiar with bonding where the behaviour is, as soon as we create a new bond interface, it picks the mac address of any slave or primary slave and keep it same across the reboots. Where we need not to add a hardware address explicitly to the configuration file until we want to have failover-mac. So would like to know more on the new feature. As well, would like to know if there is any feature with teaming which allows us to fallback to similar behaviour as of bonding if not then can this be considered as a feature enhancement? Please share your thoughts on this. Hi Venkatesh, when not explictily configured in the JSON or in the connection, the team gets the MAC address of the first interface that gets enslaved. The order in which NM enslaves interfaces is stable across reboots and this should guarantee a stable MAC address for the team interface. However, there is currently a bug in NetworkManager-1.8.0-9 that makes the MAC change when the connection is reactivated manually. See: https://bugzilla.redhat.com/show_bug.cgi?id=1472965 for more details. We plan to fix it in the 7.4.2 z-stream update; I can provide a scratch build with the fix if your want to try it earlier. Also, consider that when doing: for x in 1 2 3 4 5; do nmcli conn down team0; sleep 5 ; nmcli conn up team0; ip l l team0; done | grep link/ether the team connection is reactivated, but its slaves remain disconnected (unless the connection has autoconnect-slaves=yes). When the team interface has no slaves, it can't inherit a MAC and thus its MAC is random until the first slave comes up. Probably you should do something like: for x in 1 2 3 4 5; do nmcli conn down team0; sleep 5 ; nmcli conn up $slave_connection; ip l l team0; done | grep link/ether because activating a slave also activates its master. Or, as an alternative, configure the team to autoconnect the slaves: nmcli conection modify team0 connection.autoconnect-slaves 1 Hello, Thanks for the information and sorry for the late reply. I have asked customer to upgrade the NetworkManager and share the result. I will update the BZ as soon as I hear back from CU. Thanks again for this. |
Description of problem: The Team MAC address seems to randomly change after every reboot or when the team is down/up cycled Version-Release number of selected component (if applicable): kernel- 3.10.0-693.el7.x86_64 NetworkManager-1.8.0-9.el7.x86_64 NetworkManager-team-1.8.0-9.el7.x86_64 OR kernel-3.10.0-514.el7.x86_64 NetworkManager-1.8.0-9.el7.x86_64 NetworkManager-team-1.8.0-9.el7.x86_64 How reproducible: Create a team interface in active backup mode and verify the mac address. Bring the interface down & then up or reboot the system, we will observe the change in MAC address. Steps to Reproduce: for x in 1 2 3 4 5; do nmcli conn down team0; sleep 5 ; nmcli conn up team0; ip l l team0; done | grep link/ether link/ether 32:23:7a:28:7c:63 brd ff:ff:ff:ff:ff:ff link/ether d6:fd:f0:27:d3:1b brd ff:ff:ff:ff:ff:ff link/ether 6a:4f:58:1d:37:bc brd ff:ff:ff:ff:ff:ff link/ether ca:7b:67:bc:f1:e6 brd ff:ff:ff:ff:ff:ff link/ether 12:2f:92:6b:dc:78 brd ff:ff:ff:ff:ff:ff Actual results: MAC address changes after every cycle or whenever the team interface goes down and come back up but this behaviour is not observed when we will restart the NetworkManager. Expected results: MAC address should be constant across the reboots. Additional info: Workaround as mentioned in earlier bugzilla 1424641 where is is mentioned that this has been fixed with latest NetworkManager but the problem remains same. Add a file to /etc/NetworkManager/dispatcher.d # cat /etc/NetworkManager/dispatcher.d/30-team0-link if [ $2 == "down" ] then exit fi if [ $1 == "team0" ] then /sbin/ip link set address 02:01:02:03:04:05 dev team0 fi Make sure that the script is owned by root and not writeable by any other user or group, as per the NetworkManager man page in RHEL7. The following commands can assist with this: chown root /etc/NetworkManager/dispatcher.d/30-team0-link chmod u+x /etc/NetworkManager/dispatcher.d/30-team0-link chmod go-w /etc/NetworkManager/dispatcher.d/30-team0-link