Thank you for the bug Asaf and making cloud-init better.
It seems like your nocloud network-config YAML file exposed to your vm in the
file
"Read 120 bytes from /run/cloud-init/tmp/tmpb_430skf//network-config"
... represents the mac_address value as an integer.
2020-06-10 06:56:30,126 - stages.py[DEBUG]: applying net config names
for {'version': 1, 'config': [{'type': 'physical', 'name': 'eth0',
'mac_address': 41120542311, 'subnets': [{'type': 'dhcp'}]}]}
https://cloudinit.readthedocs.io/en/latest/topics/network-config-
format-v1.html
cloud-init suggests in network config docs above that mac_address values
should be colon-delimited values such as 04:11:20:54:23:11. Also, the
network-config file is read as yaml, any integer-only values present in
yaml will be interpreted as an int instead of strings. To ensure yaml
sees an integer value as a string you would need either single quotes or
double quotes around a value.
Since this network-config does not conform to cloud-init's documeted
network config v1 for mac_address, I don't believe we will be addressing
this feature request upstream as most tooling generally sees and
represents mac addresses as colon-delimited values for readability
instead of a squashed string of 12 hex-digits.
Again thanks for the report, please feel free to reopen if we are
missing a significant use-case here that should be better handled.
** Changed in: cloud-init
Status: New => Won't Fix
--
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/1882907
Title:
Cloud-init fails to rename device if mac address in the new config
contains only numbers
Status in cloud-init:
Won't Fix
Bug description:
On CentOS8, Cloud-init fails to rename device if the new mac address
config contains only numbers.
rpm -qa | grep cloud-init
cloud-init-18.5-7.el8_1.1.noarch
journalctl -u cloud-init
-- Logs begin at Tue 2020-06-02 08:42:02 UTC, end at Tue 2020-06-02 09:04:00
UTC. --
Jun 02 08:42:28 sa-engine.asrachmani.com systemd[1]: Starting Initial
cloud-init job (metadata service crawler)...
Jun 02 08:42:29 sa-engine.asrachmani.com cloud-init[1345]: Cloud-init v. 18.5
running 'init' at Tue, 02 Jun 2020 08:42:29 +0000. Up 36.72 seconds.
Jun 02 08:42:29 sa-engine.asrachmani.com cloud-init[1345]: ci-info:
+++++++++++++++++++++++++++Net device info+++++++++++++++++++++++++++
Jun 02 08:42:29 sa-engine.asrachmani.com cloud-init[1345]: ci-info:
+--------+------+-----------+-----------+-------+-------------------+
Jun 02 08:42:29 sa-engine.asrachmani.com cloud-init[1345]: ci-info: | Device
| Up | Address | Mask | Scope | Hw-Address |
Jun 02 08:42:29 sa-engine.asrachmani.com cloud-init[1345]: ci-info:
+--------+------+-----------+-----------+-------+-------------------+
Jun 02 08:42:29 sa-engine.asrachmani.com cloud-init[1345]: ci-info: | enp1s0
| True | . | . | . | 52:52:52:52:51:51 |
Jun 02 08:42:29 sa-engine.asrachmani.com cloud-init[1345]: ci-info: | lo
| True | 127.0.0.1 | 255.0.0.0 | host | . |
Jun 02 08:42:29 sa-engine.asrachmani.com cloud-init[1345]: ci-info: | lo
| True | ::1/128 | . | host | . |
Jun 02 08:42:29 sa-engine.asrachmani.com cloud-init[1345]: ci-info:
+--------+------+-----------+-----------+-------+-------------------+
Jun 02 08:42:29 sa-engine.asrachmani.com cloud-init[1345]: ci-info:
+++++++++++++++++++Route IPv6 info+++++++++++++++++++
Jun 02 08:42:29 sa-engine.asrachmani.com cloud-init[1345]: ci-info:
+-------+-------------+---------+-----------+-------+
Jun 02 08:42:29 sa-engine.asrachmani.com cloud-init[1345]: ci-info: | Route |
Destination | Gateway | Interface | Flags |
Jun 02 08:42:29 sa-engine.asrachmani.com cloud-init[1345]: ci-info:
+-------+-------------+---------+-----------+-------+
Jun 02 08:42:29 sa-engine.asrachmani.com cloud-init[1345]: ci-info: | 2 |
ff00::/8 | :: | enp1s0 | U |
Jun 02 08:42:29 sa-engine.asrachmani.com cloud-init[1345]: ci-info:
+-------+-------------+---------+-----------+-------+
Jun 02 08:42:29 sa-engine.asrachmani.com cloud-init[1345]: 2020-06-02
08:42:29,933 - stages.py[WARNING]: Failed to rename devices: 'int' object has
no attribute 'lower'
Jun 02 08:42:30 sa-engine.asrachmani.com useradd[1638]: new group:
name=cloud-user, GID=1002
Jun 02 08:42:30 sa-engine.asrachmani.com useradd[1638]: new user:
name=cloud-user, UID=1001, GID=1002, home=/home/cloud-user, shell=/bin/bash
Jun 02 08:42:30 sa-engine.asrachmani.com useradd[1638]: add 'cloud-user' to
group 'adm'
Jun 02 08:42:30 sa-engine.asrachmani.com useradd[1638]: add 'cloud-user' to
group 'wheel'
Jun 02 08:42:30 sa-engine.asrachmani.com useradd[1638]: add 'cloud-user' to
group 'systemd-journal'
Jun 02 08:42:30 sa-engine.asrachmani.com useradd[1638]: add 'cloud-user' to
shadow group 'adm'
Jun 02 08:42:30 sa-engine.asrachmani.com useradd[1638]: add 'cloud-user' to
shadow group 'wheel'
Jun 02 08:42:30 sa-engine.asrachmani.com useradd[1638]: add 'cloud-user' to
shadow group 'systemd-journal'
Jun 02 08:42:31 sa-engine.asrachmani.com systemd[1]: Started Initial
cloud-init job (metadata service crawler).
cat /etc/sysconfig/network-scripts/ifcfg-eth0
# Created by cloud-init on instance boot automatically, do not edit.
#
BOOTPROTO=dhcp
DEVICE=eth0
HWADDR=41120542311
ONBOOT=yes
TYPE=Ethernet
USERCTL=no
To manage notifications about this bug go to:
https://bugs.launchpad.net/cloud-init/+bug/1882907/+subscriptions
--
Mailing list: https://launchpad.net/~yahoo-eng-team
Post to : [email protected]
Unsubscribe : https://launchpad.net/~yahoo-eng-team
More help : https://help.launchpad.net/ListHelp