yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #63470
[Bug 1669860] Re: cloud-init attempts to rename bonds
This bug was fixed in the package cloud-init - 0.7.9-90-g61eb03fe-
0ubuntu1~16.10.1
---------------
cloud-init (0.7.9-90-g61eb03fe-0ubuntu1~16.10.1) yakkety; urgency=medium
* debian/cloud-init.templates: add Bigstep to list of sources. (LP: #1676460)
* New upstream snapshot.
- OpenStack: add 'dvs' to the list of physical link types. (LP: #1674946)
- Fix bug that resulted in an attempt to rename bonds or vlans.
(LP: #1669860)
- tests: update OpenNebula and Digital Ocean to not rely on host
interfaces.
- net: in netplan renderer delete known image-builtin content.
(LP: #1675576)
- doc: correct grammar in capabilities.rst [David Tagatac]
- ds-identify: fix detecting of maas datasource. (LP: #1677710)
- netplan: remove debugging prints, add debug logging [Ryan Harper]
- ds-identify: do not write None twice to datasource_list.
- support resizing partition and rootfs on system booted without
initramfs. [Steve Langasek] (LP: #1677376)
- apt_configure: run only when needed. (LP: #1675185)
- OpenStack: identify OpenStack by product 'OpenStack Compute'.
(LP: #1675349)
- GCE: Search GCE in ds-identify, consider serial number in check.
(LP: #1674861)
- Add support for setting hashed passwords [Tore S. Lonoy] (LP: #1570325)
- Fix filesystem creation when using "partition: auto"
[Jonathan Ballet] (LP: #1634678)
- ConfigDrive: support reading config drive data from /config-drive.
(LP: #1673411)
- ds-identify: fix detection of Bigstep datasource. (LP: #1674766)
- test: add running of pylint [Joshua Powers]
- ds-identify: fix bug where filename expansion was left on.
- advertise network config v2 support (NETWORK_CONFIG_V2) in features.
- Bigstep: fix bug when executing in python3. [root]
- Fix unit test when running in a system deployed with cloud-init.
- Bounce network interface for Azure when using the built-in path.
[Brent Baude] (LP: #1674685)
- cloudinit.net: add network config v2 parsing and rendering [Ryan Harper]
- net: Fix incorrect call to isfile [Joshua Powers] (LP: #1674317)
- net: add renderers for automatically selecting the renderer.
- doc: fix config drive doc with regard to unpartitioned disks.
(LP: #1673818)
- test: Adding integratiron test for password as list [Joshua Powers]
- render_network_state: switch arguments around, do not require target
- support 'loopback' as a device type.
- Integration Testing: improve testcase subclassing [Wesley Wiedenmeier]
- gitignore: adding doc/rtd_html [Joshua Powers]
- doc: add instructions for running integration tests via tox.
[Joshua Powers]
- test: avoid differences in 'date' output due to daylight savings.
- Fix chef config module in omnibus install. [Jeremy Melvin] (LP: #1583837)
- Add feature flags to cloudinit.version. [Wesley Wiedenmeier]
- tox: add a citest environment
- Support chpasswd/list being a list in addition to a string.
[Sergio Lystopad] (LP: #1665694)
- doc: Fix configuration example for cc_set_passwords module.
[Sergio Lystopad] (LP: #1665773)
- net: support both ipv4 and ipv6 gateways in sysconfig.
[Lars Kellogg-Stedman] (LP: #1669504)
- net: do not raise exception for > 3 nameservers
[Lars Kellogg-Stedman] (LP: #1670052)
-- Scott Moser <smoser@xxxxxxxxxx> Mon, 03 Apr 2017 12:03:30 -0400
** Changed in: cloud-init (Ubuntu Yakkety)
Status: Fix Committed => Fix Released
--
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/1669860
Title:
cloud-init attempts to rename bonds
Status in cloud-init:
Fix Committed
Status in cloud-init package in Ubuntu:
Fix Released
Status in cloud-init source package in Xenial:
Fix Released
Status in cloud-init source package in Yakkety:
Fix Released
Bug description:
=== Begin SRU Template ===
[Impact]
When booting with bonds provided in networking configuration, cloud-init
can fail as it attempts to rename the bond device to an interface.
[Test Case]
* download ubuntu cloud image
* mount image, enable proposed, update, upgrade cloud-init
* run 'bond-rename-launch' as provided.
* login to kvm guest as 'ubuntu:passw0rd'
* sudo cloud-init init
the 'cloud-init init' above would fail before in an attempt
to rename a bond device. It will succeed now, as it will realize
that it does not have anything to do.
[Regression Potential]
Should be small. regressions would be certainly related to
bond or vlan configurations.
=== End SRU Template ===
1. Zesty amd64
2. cloud-init 0.7.9-47-gc81ea53-0ubuntu1
3. cloud-init boots with a bond network config and does not attempt to
rename bond0
4. cloud-init init (net mode) fails when it attempts to rename a bond
interface
Running with the following network config (2 nics)
config:
- mac_address: bc:76:4e:06:96:b3
name: interface0
type: physical
- mac_address: bc:76:4e:04:88:41
name: interface1
type: physical
- bond_interfaces:
- interface0
- interface1
name: bond0
params:
bond_miimon: 100
bond_mode: 802.3ad
bond_xmit_hash_policy: layer3+4
type: bond
- name: bond0.108
subnets:
- address: 65.61.151.38
netmask: 255.255.255.252
routes:
- gateway: 65.61.151.37
netmask: 0.0.0.0
network: 0.0.0.0
type: static
- address: 2001:4800:78ff:1b:be76:4eff:fe06:96b3
netmask: 'ffff:ffff:ffff:ffff::'
routes:
- gateway: 2001:4800:78ff:1b::1
netmask: '::'
network: '::'
type: static
type: vlan
vlan_id: '108'
vlan_link: bond0
- name: bond0.208
subnets:
- address: 10.184.225.122
netmask: 255.255.255.252
routes:
- gateway: 10.184.225.121
netmask: 255.240.0.0
network: 10.176.0.0
- gateway: 10.184.225.121
netmask: 255.240.0.0
network: 10.208.0.0
type: static
type: vlan
vlan_id: '208'
vlan_link: bond0
- address: 72.3.128.240
type: nameserver
- address: 72.3.128.241
type: nameserver
During cloud-init init --local; the network configuration is rendered and brought up
bond0 is a virtual interface which uses the MAC from one of the slaves.
In cloud-init init (net) mode, we check if the interfaces are named properly;
When cloud-init collects the current_rename_info, it reads the MAC address of
each device listed in /sys/class/net; this includes *virtual* devices, like bonds/bridges
Then it looks up an interface name by MAC, however the bond and one of the interfaces
have the same value which results in cloud-init attempting to rename bond0
The solution is to not collect MACs of virtual interfaces for rename-purpose since
virtual devices do not ever get renamed; their name is defined by the config.
diff --git a/cloudinit/net/__init__.py b/cloudinit/net/__init__.py
index ea649cc..e2a50ad 100755
--- a/cloudinit/net/__init__.py
+++ b/cloudinit/net/__init__.py
@@ -14,6 +14,7 @@ from cloudinit import util
LOG = logging.getLogger(__name__)
SYS_CLASS_NET = "/sys/class/net/"
+SYS_DEV_VIRT_NET = "/sys/devices/virtual/net/"
DEFAULT_PRIMARY_INTERFACE = 'eth0'
@@ -205,7 +206,11 @@ def _get_current_rename_info(check_downable=True):
"""Collect information necessary for rename_interfaces."""
names = get_devicelist()
bymac = {}
+ virtual = os.listdir(SYS_DEV_VIRT_NET)
for n in names:
+ # do not attempt to rename virtual interfaces
+ if n in virtual:
+ continue
bymac[get_interface_mac(n)] = {
'name': n, 'up': is_up(n), 'downable': None}
Log file of a failure:
http://paste.ubuntu.com/24084999/
Related bugs:
* bug 1682871: cloud-init attempts to rename vlans / get_interfaces_by_mac does not filter vlans
To manage notifications about this bug go to:
https://bugs.launchpad.net/cloud-init/+bug/1669860/+subscriptions