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 +0000
+++ network-config      2017-08-28 21:36:30.007994177 +0000
@@ -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 +0000
+++ network-config      2017-08-28 21:41:24.999348297 +0000
@@ -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
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to