yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #69488
[Bug 1734989] [NEW] incorrect duplicate mac error for non-Ethernet based interfaces have empty saddr
Public bug reported:
## Environment
Cloud provider: EC2
Distro: Gentoo (Kernel: 4.12.12-gentoo)
Version: 17.1
## Crashes as follows:
[ 14.383147] cloud-init[2765]: ------------------------------------------------------------
[ 14.395646] cloud-init[2765]: Traceback (most recent call last):
[ 14.407168] cloud-init[2765]: File "/usr/lib64/python3.4/site-packages/cloudinit/cmd/main.py", line 638, in status_wrapper
[ 14.421615] cloud-init[2765]: ret = functor(name, args)
[ 14.429130] cloud-init[2765]: File "/usr/lib64/python3.4/site-packages/cloudinit/cmd/main.py", line 357, in main_init
[ 14.441136] cloud-init[2765]: init.apply_network_config(bring_up=bool(mode != sources.DSMODE_LOCAL))
[ 14.455574] cloud-init[2765]: File "/usr/lib64/python3.4/site-packages/cloudinit/stages.py", line 635, in apply_network_config
[ 14.470693] cloud-init[2765]: netcfg, src = self._find_networking_config()
[ 14.478577] cloud-init[2765]: File "/usr/lib64/python3.4/site-packages/cloudinit/stages.py", line 622, in _find_networking_config
[ 14.496614] cloud-init[2765]: if self.datasource and hasattr(self.datasource, 'network_config'):
[ 14.509144] cloud-init[2765]: File "/usr/lib64/python3.4/site-packages/cloudinit/sources/DataSourceEc2.py", line 301, in network_config
[ 14.526627] cloud-init[2765]: result = convert_ec2_metadata_network_config(net_md)
[ 14.535504] cloud-init[2765]: File "/usr/lib64/python3.4/site-packages/cloudinit/sources/DataSourceEc2.py", line 475, in convert_ec2_metadata_network_config
[ 14.552604] cloud-init[2765]: macs_to_nics = net.get_interfaces_by_mac()
[ 14.560545] cloud-init[2765]: File "/usr/lib64/python3.4/site-packages/cloudinit/net/__init__.py", line 522, in get_interfaces_by_mac
[ 14.576593] cloud-init[2765]: (name, ret[mac], mac))
[ 14.582105] cloud-init[2765]: RuntimeError: duplicate mac found! both 'gre0' and 'ip_vti0' have mac '00:00:00:00'
## Cause
/sys/class/net/*/address varies based on a lower-level protocol used by a interface.
https://www.kernel.org/doc/Documentation/ABI/testing/sysfs-class-net
However, cloud-init assumes /sys/class/net/*/address always to be
Ethernet MAC address. https://github.com/cloud-init/cloud-
init/blob/4964fb38f11c15ed119ff4c7f4379ae3c8785a9a/cloudinit/net/__init__.py#L533
But some interfaces have IPv4/v6 for underlying protocol:
$ ip -br l|grep 0.0.0.0
tunl0@NONE DOWN 0.0.0.0 <NOARP>
gre0@NONE DOWN 0.0.0.0 <NOARP>
ip_vti0@NONE DOWN 0.0.0.0 <NOARP>
sit0@NONE DOWN 0.0.0.0 <NOARP>
$ ip -br l|grep ::
ip6_vti0@NONE DOWN :: <NOARP>
ip6tnl0@NONE DOWN :: <NOARP>
$ grep -r ^00:00 /sys/class/net/*/address
/sys/class/net/gre0/address:00:00:00:00
/sys/class/net/gretap0/address:00:00:00:00:00:00
/sys/class/net/ip6gre0/address:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00
/sys/class/net/ip6tnl0/address:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00
/sys/class/net/ip6_vti0/address:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00
/sys/class/net/ip_vti0/address:00:00:00:00
/sys/class/net/lo/address:00:00:00:00:00:00
/sys/class/net/sit0/address:00:00:00:00
/sys/class/net/tunl0/address:00:00:00:00
These should also be ignored as the empty_mac pattern.
** Affects: cloud-init
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to cloud-init.
https://bugs.launchpad.net/bugs/1734989
Title:
incorrect duplicate mac error for non-Ethernet based interfaces have
empty saddr
Status in cloud-init:
New
Bug description:
## Environment
Cloud provider: EC2
Distro: Gentoo (Kernel: 4.12.12-gentoo)
Version: 17.1
## Crashes as follows:
[ 14.383147] cloud-init[2765]: ------------------------------------------------------------
[ 14.395646] cloud-init[2765]: Traceback (most recent call last):
[ 14.407168] cloud-init[2765]: File "/usr/lib64/python3.4/site-packages/cloudinit/cmd/main.py", line 638, in status_wrapper
[ 14.421615] cloud-init[2765]: ret = functor(name, args)
[ 14.429130] cloud-init[2765]: File "/usr/lib64/python3.4/site-packages/cloudinit/cmd/main.py", line 357, in main_init
[ 14.441136] cloud-init[2765]: init.apply_network_config(bring_up=bool(mode != sources.DSMODE_LOCAL))
[ 14.455574] cloud-init[2765]: File "/usr/lib64/python3.4/site-packages/cloudinit/stages.py", line 635, in apply_network_config
[ 14.470693] cloud-init[2765]: netcfg, src = self._find_networking_config()
[ 14.478577] cloud-init[2765]: File "/usr/lib64/python3.4/site-packages/cloudinit/stages.py", line 622, in _find_networking_config
[ 14.496614] cloud-init[2765]: if self.datasource and hasattr(self.datasource, 'network_config'):
[ 14.509144] cloud-init[2765]: File "/usr/lib64/python3.4/site-packages/cloudinit/sources/DataSourceEc2.py", line 301, in network_config
[ 14.526627] cloud-init[2765]: result = convert_ec2_metadata_network_config(net_md)
[ 14.535504] cloud-init[2765]: File "/usr/lib64/python3.4/site-packages/cloudinit/sources/DataSourceEc2.py", line 475, in convert_ec2_metadata_network_config
[ 14.552604] cloud-init[2765]: macs_to_nics = net.get_interfaces_by_mac()
[ 14.560545] cloud-init[2765]: File "/usr/lib64/python3.4/site-packages/cloudinit/net/__init__.py", line 522, in get_interfaces_by_mac
[ 14.576593] cloud-init[2765]: (name, ret[mac], mac))
[ 14.582105] cloud-init[2765]: RuntimeError: duplicate mac found! both 'gre0' and 'ip_vti0' have mac '00:00:00:00'
## Cause
/sys/class/net/*/address varies based on a lower-level protocol used by a interface.
https://www.kernel.org/doc/Documentation/ABI/testing/sysfs-class-net
However, cloud-init assumes /sys/class/net/*/address always to be
Ethernet MAC address. https://github.com/cloud-init/cloud-
init/blob/4964fb38f11c15ed119ff4c7f4379ae3c8785a9a/cloudinit/net/__init__.py#L533
But some interfaces have IPv4/v6 for underlying protocol:
$ ip -br l|grep 0.0.0.0
tunl0@NONE DOWN 0.0.0.0 <NOARP>
gre0@NONE DOWN 0.0.0.0 <NOARP>
ip_vti0@NONE DOWN 0.0.0.0 <NOARP>
sit0@NONE DOWN 0.0.0.0 <NOARP>
$ ip -br l|grep ::
ip6_vti0@NONE DOWN :: <NOARP>
ip6tnl0@NONE DOWN :: <NOARP>
$ grep -r ^00:00 /sys/class/net/*/address
/sys/class/net/gre0/address:00:00:00:00
/sys/class/net/gretap0/address:00:00:00:00:00:00
/sys/class/net/ip6gre0/address:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00
/sys/class/net/ip6tnl0/address:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00
/sys/class/net/ip6_vti0/address:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00
/sys/class/net/ip_vti0/address:00:00:00:00
/sys/class/net/lo/address:00:00:00:00:00:00
/sys/class/net/sit0/address:00:00:00:00
/sys/class/net/tunl0/address:00:00:00:00
These should also be ignored as the empty_mac pattern.
To manage notifications about this bug go to:
https://bugs.launchpad.net/cloud-init/+bug/1734989/+subscriptions
Follow ups