2017-03-03 17:58:39 |
Ryan Harper |
bug |
|
|
added bug |
2017-03-03 18:00:23 |
Jon Grimm |
bug |
|
|
added subscriber Jon Grimm |
2017-03-03 18:45:42 |
Scott Moser |
cloud-init (Ubuntu): status |
New |
Confirmed |
|
2017-03-03 18:45:45 |
Scott Moser |
cloud-init (Ubuntu): importance |
Undecided |
Medium |
|
2017-03-03 18:45:49 |
Scott Moser |
bug task added |
|
cloud-init |
|
2017-03-03 18:46:13 |
Scott Moser |
cloud-init: status |
New |
Confirmed |
|
2017-03-03 18:46:16 |
Scott Moser |
cloud-init: importance |
Undecided |
Medium |
|
2017-03-20 14:03:14 |
Scott Moser |
attachment added |
|
simple program to create container with different network configs https://bugs.launchpad.net/ubuntu/+source/cloud-init/+bug/1669860/+attachment/4840969/+files/lp1669860-lxc |
|
2017-03-20 15:10:57 |
Ryan Harper |
attachment added |
|
bond-rename-launch.sh https://bugs.launchpad.net/ubuntu/+source/cloud-init/+bug/1669860/+attachment/4841013/+files/bond-rename-launch.sh |
|
2017-03-20 21:08:44 |
Ryan Harper |
attachment added |
|
bond-rename-launch.sh https://bugs.launchpad.net/ubuntu/+source/cloud-init/+bug/1669860/+attachment/4841194/+files/bond-rename-launch.sh |
|
2017-03-31 15:03:43 |
Launchpad Janitor |
merge proposal linked |
|
https://code.launchpad.net/~smoser/cloud-init/+git/cloud-init/+merge/321578 |
|
2017-03-31 20:47:10 |
Scott Moser |
cloud-init: status |
Confirmed |
Fix Committed |
|
2017-04-03 08:05:57 |
Launchpad Janitor |
cloud-init (Ubuntu): status |
Confirmed |
Fix Released |
|
2017-04-03 16:16:45 |
Scott Moser |
nominated for series |
|
Ubuntu Xenial |
|
2017-04-03 16:16:45 |
Scott Moser |
bug task added |
|
cloud-init (Ubuntu Xenial) |
|
2017-04-03 16:16:45 |
Scott Moser |
nominated for series |
|
Ubuntu Yakkety |
|
2017-04-03 16:16:45 |
Scott Moser |
bug task added |
|
cloud-init (Ubuntu Yakkety) |
|
2017-04-03 16:17:33 |
Scott Moser |
cloud-init (Ubuntu Xenial): status |
New |
Confirmed |
|
2017-04-03 16:17:35 |
Scott Moser |
cloud-init (Ubuntu Yakkety): status |
New |
Confirmed |
|
2017-04-03 16:17:38 |
Scott Moser |
cloud-init (Ubuntu Xenial): importance |
Undecided |
Medium |
|
2017-04-03 16:17:40 |
Scott Moser |
cloud-init (Ubuntu Yakkety): importance |
Undecided |
Medium |
|
2017-04-03 20:50:35 |
Scott Moser |
description |
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/ |
=== 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/ |
|
2017-04-10 22:23:33 |
Brian Murray |
cloud-init (Ubuntu Yakkety): status |
Confirmed |
Fix Committed |
|
2017-04-10 22:23:35 |
Brian Murray |
bug |
|
|
added subscriber Ubuntu Stable Release Updates Team |
2017-04-10 22:23:40 |
Brian Murray |
bug |
|
|
added subscriber SRU Verification |
2017-04-10 22:23:46 |
Brian Murray |
tags |
|
verification-needed |
|
2017-04-10 22:46:30 |
Brian Murray |
cloud-init (Ubuntu Xenial): status |
Confirmed |
Fix Committed |
|
2017-04-14 16:17:59 |
Scott Moser |
attachment removed |
bond-rename-launch.sh https://bugs.launchpad.net/ubuntu/+source/cloud-init/+bug/1669860/+attachment/4841013/+files/bond-rename-launch.sh |
|
|
2017-04-14 16:27:10 |
Scott Moser |
attachment removed |
bond-rename-launch.sh https://bugs.launchpad.net/ubuntu/+source/cloud-init/+bug/1669860/+attachment/4841194/+files/bond-rename-launch.sh |
|
|
2017-04-14 16:29:08 |
Scott Moser |
attachment added |
|
btest-launch.sh launch a kvm guest with some network config https://bugs.launchpad.net/ubuntu/+source/cloud-init/+bug/1669860/+attachment/4862128/+files/btest-launch.sh |
|
2017-04-14 16:29:38 |
Scott Moser |
tags |
verification-needed |
verification-done-xenial verification-done-yakkety |
|
2017-04-14 16:37:58 |
Scott Moser |
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/ |
=== 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 |
|
2017-04-20 19:33:34 |
Launchpad Janitor |
cloud-init (Ubuntu Yakkety): status |
Fix Committed |
Fix Released |
|
2017-04-20 19:34:36 |
Steve Langasek |
removed subscriber Ubuntu Stable Release Updates Team |
|
|
|
2017-04-20 19:35:54 |
Launchpad Janitor |
cloud-init (Ubuntu Xenial): status |
Fix Committed |
Fix Released |
|
2017-09-23 02:29:30 |
Scott Moser |
cloud-init: status |
Fix Committed |
Fix Released |
|
2023-05-10 21:08:44 |
James Falcon |
bug watch added |
|
https://github.com/canonical/cloud-init/issues/2818 |
|