-
Notifications
You must be signed in to change notification settings - Fork 835
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cloud-init interface renaming should apply .lower() to mac_address values to match sysfs entries #2955
Comments
Launchpad user Chris J Arges(arges) wrote on 2017-08-23T12:29:02.903074+00:00 Hello Ryan, or anyone else affected, Accepted cloud-init into xenial-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/cloud-init/0.7.9-233-ge586fe35-0ubuntu1~16.04.1 in a few hours, and then in the -proposed repository. Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed.Your feedback will aid us getting this update out to other Ubuntu users. If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-xenial to verification-done-xenial. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-xenial. In either case, details of your testing will help us make a better decision. Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance! |
Launchpad user Chris J Arges(arges) wrote on 2017-08-23T12:32:08.842933+00:00 Hello Ryan, or anyone else affected, Accepted cloud-init into zesty-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/cloud-init/0.7.9-233-ge586fe35-0ubuntu1~17.04.1 in a few hours, and then in the -proposed repository. Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed.Your feedback will aid us getting this update out to other Ubuntu users. If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-zesty to verification-done-zesty. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-zesty. In either case, details of your testing will help us make a better decision. Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance! |
Launchpad user Chad Smith(chad.smith) wrote on 2017-08-28T21:43:05.024928+00:00 Validated UPPERCASE macs do not cause warnings on xenial and zesty --- Xenial
root@test-xenial:~# ( cd /var/lib/cloud/seed/nocloud-net/ && diff -u network-config.dist network-config )
root@test-xenial: ---- test zesty
root@test-zesty:~# ( cd /var/lib/cloud/seed/nocloud-net/ && diff -u network-config.dist network-config )
root@test-zesty: |
Launchpad user Launchpad Janitor(janitor) wrote on 2017-09-13T01:26:05.837714+00:00 This bug was fixed in the package cloud-init - 0.7.9-233-ge586fe35-0ubuntu1~16.04.1 cloud-init (0.7.9-233-ge586fe35-0ubuntu1~16.04.1) xenial-proposed; urgency=medium
-- Scott Moser smoser@ubuntu.com Mon, 31 Jul 2017 16:36:16 -0400 |
Launchpad user Chris Halse Rogers(raof) wrote on 2017-09-13T01:27:02.639213+00:00 The verification of the Stable Release Update for cloud-init has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions. |
Launchpad user Launchpad Janitor(janitor) wrote on 2017-09-13T01:27:27.937540+00:00 This bug was fixed in the package cloud-init - 0.7.9-233-ge586fe35-0ubuntu1~17.04.1 cloud-init (0.7.9-233-ge586fe35-0ubuntu1~17.04.1) zesty; urgency=medium
-- Scott Moser smoser@ubuntu.com Mon, 31 Jul 2017 16:33:24 -0400 |
Launchpad user Scott Moser(smoser) wrote on 2017-09-23T02:34:54.177187+00:00 This bug is believed to be fixed in cloud-init in 17.1. If this is still a problem for you, please make a comment and set the state back to New Thank you. |
This bug was originally filed in Launchpad as LP: #1705147
Launchpad details
Launchpad user Ryan Harper(raharper) wrote on 2017-07-19T00:15:52.883159+00:00
=== Begin SRU Template ===
[Impact]
cloud-init takes network configuration input in a variety of formats.
It then applies that network configuration, including renaming devices
based on their mac address and provided name.
If the mac address provided contained upper case letters (hex values,
so A-F) then cloud-init would fail to rename the devices and show a
WARN message in /var/log/cloud-init.log.
The warn message would look like:
Failed to rename devices: [nic not present] Cannot rename
mac=00:16:3E:FC:3D:65 to eth0, not available.
[Test Case]
The basic idea below is:
a.) launch an lxd instance with proposed version of cloud-init.
b.) inside instance, change the provided network config to use upper case
for mac addresses.
c.) clean the system and reboot.
d.) check no errors in /var/log/cloud-init.log
launch an instance.
$ release=xenial
$ ref=$release-proposed
$ lxc-proposed-snapshot --proposed --publish $release $ref
$ lxc launch $ref $name
$ lxc exec $name -- /bin/bash
inside
% read lower < /sys/class/net/eth0/address
% echo $lower
00:16:3e:fc:3d:65
% upper=$(echo "$lower" | tr '[a-z]' '[A-Z]')
% sed -i.dist -e 's,( *)name: eth0,\1name: nic0\n\1mac_address: "'$upper'",'
/var/lib/cloud/seed/nocloud-net/network-config
% ( cd /var/lib/cloud/seed/nocloud-net/ && diff -u network-config.dist network-config )
--- network-config.dist 2017-08-01 20:44:48.445568094 +0000
+++ network-config 2017-08-01 20:44:58.277456919 +0000
@@ -1,7 +1,8 @@
version: 1
config:
- type: physical
clean up skipping the 'seed' directory.
% ( cd /var/lib/cloud && for i in ; do [ "$i" = "seed" ] || rm -Rf $i; done )
% rm -Rf /var/log/cloud-init
% reboot
back outside, wait a bit, then
% lxc exec $name -- /bin/bash
% grep WARN /var/log/cloud-init.log || echo "no warnings"
% ip addr show nic0
90: nic0@if91: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
link/ether 00:16:3e:5d:72:ae brd ff:ff:ff:ff:ff:ff link-netnsid 0
inet 10.75.205.253/24 brd 10.75.205.255 scope global nic0
valid_lft forever preferred_lft forever
inet6 fe80::216:3eff:fe5d:72ae/64 scope link
valid_lft forever preferred_lft forever
[Regression Potential]
Regression potential here should be very low. The fix was essentially to
be more liberal on matching mac addresses by using '.lower()' on both values.
[Other Info]
Upstream commit at
https://git.launchpad.net/cloud-init/commit/?id=c0060fe489
lxc-proposed-snapshot is
https://git.launchpad.net/~smoser/cloud-init/+git/sru-info/tree/bin/lxc-proposed-snapshot
It publishes an image to lxd with proposed enabled and cloud-init upgraded.
=== End SRU Template ===
When supplying a network config to cloud-init with MAC address values using Upper case letters, this will fail to match MAC address values returned from sysfs. THe result is that cloud-init gives up on the renaming of the interface.
The text was updated successfully, but these errors were encountered: