[Bug 1705147] Re: cloud-init interface renaming should apply .lower() to mac_address values to match sysfs entries
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. ** Changed in: cloud-init Status: Fix Committed => Fix Released -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1705147 Title: cloud-init interface renaming should apply .lower() to mac_address values to match sysfs entries To manage notifications about this bug go to: https://bugs.launchpad.net/cloud-init/+bug/1705147/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1705147] Re: cloud-init interface renaming should apply .lower() to mac_address values to match sysfs entries
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 * debian/cloud-init.templates: enable Scaleway cloud. * debian/cloud-init.templates: enable Aliyun cloud. * drop the following cherry picks, now incorporated in snapshot. + debian/patches/cpick-5fb49bac-azure-identify-platform... + debian/patches/cpick-003c6678-net-remove-systemd-link... + debian/patches/cpick-1cd4323b-azure-remove-accidental... + debian/patches/cpick-ebc9ecbc-Azure-Add-network-config... + debian/patches/cpick-11121fe4-systemd-make-cloud-final... * debian/patches/stable-release-no-jsonschema-dep.patch: add patch to remove optional dependency on jsonschema. * New upstream snapshot. - cloudinit.net: add initialize_network_device function and tests [Chad Smith] - makefile: fix ci-deps-ubuntu target [Chad Smith] - tests: adjust locale integration test to parse default locale. - tests: remove 'yakkety' from releases as it is EOL. - centos: do not package systemd-fsck drop-in. - systemd: make systemd-fsck run after cloud-init.service (LP: #1691489) - tests: Add initial tests for EC2 and improve a docstring. - locale: Do not re-run locale-gen if provided locale is system default. - archlinux: fix set hostname usage of write_file. [Joshua Powers] - sysconfig: support subnet type of 'manual'. - tools/run-centos: make running with no argument show help. - Drop rand_str() usage in DNS redirection detection [Bob Aman] (LP: #1088611) - sysconfig: use MACADDR on bonds/bridges to configure mac_address [Ryan Harper] - net: eni route rendering missed ipv6 default route config [Ryan Harper] (LP: #1701097) - sysconfig: enable mtu set per subnet, including ipv6 mtu [Ryan Harper] - sysconfig: handle manual type subnets [Ryan Harper] - sysconfig: fix ipv6 gateway routes [Ryan Harper] - sysconfig: fix rendering of bond, bridge and vlan types. [Ryan Harper] - Templatize systemd unit files for cross distro deltas. [Ryan Harper] - sysconfig: ipv6 and default gateway fixes. [Ryan Harper] - net: fix renaming of nics to support mac addresses written in upper case. (LP: #1705147) - tests: fixes for issues uncovered when moving to python 3.6. - sysconfig: include GATEWAY value if set in subnet [Ryan Harper] - Scaleway: add datasource with user and vendor data for Scaleway. [Julien Castets] - Support comments in content read by load_shell_content. - cloudinitlocal fail to run during boot [Hongjiang Zhang] - doc: fix disk setup example table_type options [Sandor Zeestraten] - tools: Fix exception handling. [Joonas Kylmälä] - tests: fix usage of mock in GCE test. - test_gce: Fix invalid mock of platform_reports_gce to return False [Chad Smith] - test: fix incorrect keyid for apt repository. [Joshua Powers] - tests: Update version of pylxd [Joshua Powers] - write_files: Remove log from helper function signatures. [Andrew Jorgensen] - doc: document the cmdline options to NoCloud [Brian Candler] - read_dmi_data: always return None when inside a container. (LP: #1701325) - requirements.txt: remove trailing white space. - Tests: Simplify the check on ssh-import-id [Joshua Powers] - tests: update ntp tests after sntp added [Joshua Powers] - FreeBSD: Make freebsd a variant, fix unittests and tools/build-on-freebsd. - FreeBSD: fix test failure - FreeBSD: replace ifdown/ifup with "ifconfig down" and "ifconfig up". [Hongjiang Zhang] - FreeBSD: fix cdrom mounting failure if /mnt/cdrom/secure did not exist. [Hongjiang Zhang] - main: Don't use templater to format the welcome message [Andrew Jorgensen] - docs: Automatically generate module docs form schema if present. [Chad Smith] - debian: fix path comment in /etc/hosts template. [Jens Sandmann] - suse: add hostname and fully qualified domain to template. [Jens Sandmann] - write_file(s): Print permissions as octal, not decimal [Andrew Jorgensen] - ci deps: Add --test-distro to read-dependencies to install all deps [Chad Smith] - tools/run-centos: cleanups and move to using read-dependencies - pkg build ci: Add make ci-deps- target to install pkgs [Chad Smith] - selinux: Allow restorecon to be non-fatal. [Ryan Harper] - net: Allow netinfo subprocesses to return 0 or 1 due to selinux. [Ryan Harper] - net: Allow for NetworkManager configuration [Ryan McCabe] - Use distro release version to determine if we use systemd in redhat spec [Ryan Harper] - net: normalize data in network_state object - Integration Testing: tox env, pyxld 2.2.3, and revamp framework [Wesley Wiedenmeier] - Chef: Update omnibus url to chef.io, minor doc change
[Bug 1705147] Re: cloud-init interface renaming should apply .lower() to mac_address values to match sysfs entries
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 * debian/cloud-init.templates: enable Scaleway cloud. * debian/cloud-init.templates: enable Aliyun cloud. * drop the following cherry picks, now incorporated in snapshot. + debian/patches/cpick-5fb49bac-azure-identify-platform... + debian/patches/cpick-003c6678-net-remove-systemd-link... + debian/patches/cpick-1cd4323b-azure-remove-accidental... + debian/patches/cpick-ebc9ecbc-Azure-Add-network-config... + debian/patches/cpick-11121fe4-systemd-make-cloud-final... * debian/patches/stable-release-no-jsonschema-dep.patch: add patch to remove optional dependency on jsonschema. * New upstream snapshot. - cloudinit.net: add initialize_network_device function and tests [Chad Smith] - makefile: fix ci-deps-ubuntu target [Chad Smith] - tests: adjust locale integration test to parse default locale. - tests: remove 'yakkety' from releases as it is EOL. - centos: do not package systemd-fsck drop-in. - systemd: make systemd-fsck run after cloud-init.service (LP: #1691489) - tests: Add initial tests for EC2 and improve a docstring. - locale: Do not re-run locale-gen if provided locale is system default. - archlinux: fix set hostname usage of write_file. [Joshua Powers] - sysconfig: support subnet type of 'manual'. - tools/run-centos: make running with no argument show help. - Drop rand_str() usage in DNS redirection detection [Bob Aman] (LP: #1088611) - sysconfig: use MACADDR on bonds/bridges to configure mac_address [Ryan Harper] - net: eni route rendering missed ipv6 default route config [Ryan Harper] (LP: #1701097) - sysconfig: enable mtu set per subnet, including ipv6 mtu [Ryan Harper] - sysconfig: handle manual type subnets [Ryan Harper] - sysconfig: fix ipv6 gateway routes [Ryan Harper] - sysconfig: fix rendering of bond, bridge and vlan types. [Ryan Harper] - Templatize systemd unit files for cross distro deltas. [Ryan Harper] - sysconfig: ipv6 and default gateway fixes. [Ryan Harper] - net: fix renaming of nics to support mac addresses written in upper case. (LP: #1705147) - tests: fixes for issues uncovered when moving to python 3.6. - sysconfig: include GATEWAY value if set in subnet [Ryan Harper] - Scaleway: add datasource with user and vendor data for Scaleway. [Julien Castets] - Support comments in content read by load_shell_content. - cloudinitlocal fail to run during boot [Hongjiang Zhang] - doc: fix disk setup example table_type options [Sandor Zeestraten] - tools: Fix exception handling. [Joonas Kylmälä] - tests: fix usage of mock in GCE test. - test_gce: Fix invalid mock of platform_reports_gce to return False [Chad Smith] - test: fix incorrect keyid for apt repository. [Joshua Powers] - tests: Update version of pylxd [Joshua Powers] - write_files: Remove log from helper function signatures. [Andrew Jorgensen] - doc: document the cmdline options to NoCloud [Brian Candler] - read_dmi_data: always return None when inside a container. (LP: #1701325) - requirements.txt: remove trailing white space. - Tests: Simplify the check on ssh-import-id [Joshua Powers] - tests: update ntp tests after sntp added [Joshua Powers] - FreeBSD: Make freebsd a variant, fix unittests and tools/build-on-freebsd. - FreeBSD: fix test failure - FreeBSD: replace ifdown/ifup with "ifconfig down" and "ifconfig up". [Hongjiang Zhang] - FreeBSD: fix cdrom mounting failure if /mnt/cdrom/secure did not exist. [Hongjiang Zhang] - main: Don't use templater to format the welcome message [Andrew Jorgensen] - docs: Automatically generate module docs form schema if present. [Chad Smith] - debian: fix path comment in /etc/hosts template. [Jens Sandmann] - suse: add hostname and fully qualified domain to template. [Jens Sandmann] - write_file(s): Print permissions as octal, not decimal [Andrew Jorgensen] - ci deps: Add --test-distro to read-dependencies to install all deps [Chad Smith] - tools/run-centos: cleanups and move to using read-dependencies - pkg build ci: Add make ci-deps- target to install pkgs [Chad Smith] - selinux: Allow restorecon to be non-fatal. [Ryan Harper] - net: Allow netinfo subprocesses to return 0 or 1 due to selinux. [Ryan Harper] - net: Allow for NetworkManager configuration [Ryan McCabe] - Use distro release version to determine if we use systemd in redhat spec [Ryan Harper] - net: normalize data in network_state object - Integration Testing: tox env, pyxld 2.2.3, and revamp framework [Wesley Wiedenmeier] - Chef: Update omnibus url to chef.io, minor
[Bug 1705147] Re: cloud-init interface renaming should apply .lower() to mac_address values to match sysfs entries
Validated UPPERCASE macs do not cause warnings on xenial and zesty --- Xenial csmith@fringe:~$ lxc exec test-xenial bash root@test-xenial:~# grep CODENAME /etc/lsb-release; dpkg-query --show cloud-init DISTRIB_CODENAME=xenial cloud-init 0.7.9-233-ge586fe35-0ubuntu1~16.04.1 root@test-xenial:~# read lower < /sys/class/net/eth0/address root@test-xenial:~# echo $lower 00:16:3e:1e:df:cc root@test-xenial:~# upper=$(echo "$lower" | tr '[a-z]' '[A-Z]') root@test-xenial:~# sed -i.dist -e 's,\( *\)name: eth0,\1name: nic0\n\1mac_address: "'$upper'",' \ > /var/lib/cloud/seed/nocloud-net/network-config root@test-xenial:~# ( cd /var/lib/cloud/seed/nocloud-net/ && diff -u network-config.dist network-config ) --- network-config.dist 2017-08-28 17:49:04.566339355 + +++ network-config 2017-08-28 21:36:30.007994177 + @@ -1,7 +1,8 @@ version: 1 config: - type: physical - name: eth0 + name: nic0 + mac_address: "00:16:3E:1E:DF:CC" subnets: - type: dhcp control: auto root@test-xenial:~# ( cd /var/lib/cloud && for i in *; do [ "$i" = "seed" ] || rm -Rf $i; done ) root@test-xenial:~# rm -Rf /var/log/cloud-init* root@test-xenial:~# reboot csmith@fringe:~$ lxc exec test-xenial -- grep WARN /var/log/cloud-init.log || echo "no warnings" no warnings test zesty csmith@fringe:~$ lxc exec test-zesty bash root@test-zesty:~# grep CODENAME /etc/lsb-release; dpkg-query --show cloud-init DISTRIB_CODENAME=zesty cloud-init 0.7.9-233-ge586fe35-0ubuntu1~17.04.1 root@test-zesty:~# read lower < /sys/class/net/eth0/address root@test-zesty:~# echo $lower 00:16:3e:b0:72:1f root@test-zesty:~# upper=$(echo "$lower" | tr '[a-z]' '[A-Z]') root@test-zesty:~# sed -i.dist -e 's,\( *\)name: eth0,\1name: nic0\n\1mac_address: "'$upper'",' \ > /var/lib/cloud/seed/nocloud-net/network-config root@test-zesty:~# ( cd /var/lib/cloud/seed/nocloud-net/ && diff -u network-config.dist network-config ) --- network-config.dist 2017-08-28 17:50:39.302871814 + +++ network-config 2017-08-28 21:41:24.999348297 + @@ -1,7 +1,8 @@ version: 1 config: - type: physical - name: eth0 + name: nic0 + mac_address: "00:16:3E:B0:72:1F" subnets: - type: dhcp control: auto root@test-zesty:~# ( cd /var/lib/cloud && for i in *; do [ "$i" = "seed" ] || rm -Rf $i; done ) root@test-zesty:~# rm -Rf /var/log/cloud-init* root@test-zesty:~# reboot csmith@fringe:~$ lxc exec test-zesty -- grep WARN /var/log/cloud-init.log || echo "no warnings" no warnings ** Tags removed: verification-needed verification-needed-xenial verification-needed-zesty ** Tags added: verification-done-xenial verification-done-zesty -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1705147 Title: cloud-init interface renaming should apply .lower() to mac_address values to match sysfs entries To manage notifications about this bug go to: https://bugs.launchpad.net/cloud-init/+bug/1705147/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1705147] Re: cloud-init interface renaming should apply .lower() to mac_address values to match sysfs entries
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! ** Changed in: cloud-init (Ubuntu Xenial) Status: Confirmed => Fix Committed ** Tags added: verification-needed verification-needed-xenial ** Changed in: cloud-init (Ubuntu Zesty) Status: Confirmed => Fix Committed ** Tags added: verification-needed-zesty -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1705147 Title: cloud-init interface renaming should apply .lower() to mac_address values to match sysfs entries To manage notifications about this bug go to: https://bugs.launchpad.net/cloud-init/+bug/1705147/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1705147] Re: cloud-init interface renaming should apply .lower() to mac_address values to match sysfs entries
** Description changed: - 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. + === 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 + + +++ network-config 2017-08-01 20:44:58.277456919 + + @@ -1,7 +1,8 @@ + version: 1 + config: + - type: physical + - name: eth0 + + name: nic0 + + mac_address: "00:16:3E:5D:72:AE" +subnets: +- type: dhcp + control: auto + + ## 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: 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. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1705147 Title: cloud-init interface renaming should apply .lower() to mac_address values to match sysfs entries To manage notifications about this bug go to: https://bugs.launchpad.net/cloud-init/+bug/1705147/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1705147] Re: cloud-init interface renaming should apply .lower() to mac_address values to match sysfs entries
** Changed in: cloud-init (Ubuntu Xenial) Status: New => Confirmed ** Changed in: cloud-init (Ubuntu Zesty) Status: New => Confirmed ** Changed in: cloud-init (Ubuntu Xenial) Importance: Undecided => Medium ** Changed in: cloud-init (Ubuntu Zesty) Importance: Undecided => Medium -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1705147 Title: cloud-init interface renaming should apply .lower() to mac_address values to match sysfs entries To manage notifications about this bug go to: https://bugs.launchpad.net/cloud-init/+bug/1705147/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
[Bug 1705147] Re: cloud-init interface renaming should apply .lower() to mac_address values to match sysfs entries
** Also affects: cloud-init (Ubuntu) Importance: Undecided Status: New ** Changed in: cloud-init (Ubuntu) Status: New => Fix Released ** Changed in: cloud-init (Ubuntu) Importance: Undecided => Medium ** Also affects: cloud-init (Ubuntu Zesty) Importance: Undecided Status: New ** Also affects: cloud-init (Ubuntu Xenial) Importance: Undecided Status: New -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/1705147 Title: cloud-init interface renaming should apply .lower() to mac_address values to match sysfs entries To manage notifications about this bug go to: https://bugs.launchpad.net/cloud-init/+bug/1705147/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs