yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #88757
[Bug 1906187] Re: Version tag is not respected when put last
** Also affects: netplan
Importance: Undecided
Status: New
** Also affects: cloud-init
Importance: Undecided
Status: New
** No longer affects: netplan
** Changed in: cloud-init
Status: New => Triaged
** Changed in: cloud-init
Importance: Undecided => High
--
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/1906187
Title:
Version tag is not respected when put last
Status in cloud-init:
Triaged
Status in cloud-init package in Ubuntu:
Triaged
Status in netplan.io package in Ubuntu:
Confirmed
Bug description:
I've created a 'network-config' file with Terraform's yamldecode() function that contains (btw. I've tried with the version being a Number w/o quotes and as well as a String as shown here):
---
"network":
"ethernets":
"eth0":
"gateway4": "192.168.1.1"
"nameservers":
"addresses":
- "192.168.1.74"
- "192.168.1.104"
"search":
- "fritz.box"
"set-name": "eth0"
"version": "2"
---
After running on Raspberry Pi 4B with 4 GB, created with ubuntu-20.04.1-preinstalled-server-arm64+raspi.img.xz, the machine's setup fails and /var/log/cloud-init.log reveals that:
---
2020-04-01 17:23:48,649 - util.py[DEBUG]: Reading from /boot/firmware//network-config (quiet=False)
2020-04-01 17:23:48,649 - util.py[DEBUG]: Read 245 bytes from /boot/firmware//network-config
2020-04-01 17:23:48,650 - util.py[DEBUG]: Attempting to load yaml from string of length 240 with allowed root types (<class 'dict'>,)
2020-04-01 17:23:48,652 - util.py[DEBUG]: Attempting to load yaml from string of length 245 with allowed root types (<class 'dict'>,)
2020-04-01 17:23:48,656 - DataSourceNoCloud.py[DEBUG]: Top level network key in network-config but missing 'config' or 'version': {'network': {'ethernets': {'eth0': {'gateway4': '192.168.1.1', 'nameservers': {'addresses': ['192.168.1.74', '192.168.1.104'], 'search': ['fritz.box']}, 'set-name': 'eth0'}}, 'version': '2'}}
---
The corresponding /var/log/clout-init-output.log reveals the trace and that Network won't come up.
---
Cloud-init v. 20.2-45-g5f7825e2-0ubuntu1~20.04.1 running 'init-local' at Wed, 01 Apr 2020 17:23:48 +0000. Up 21.71 seconds.
2020-04-01 17:23:48,796 - util.py[WARNING]: failed stage init-local
failed run of stage init-local
------------------------------------------------------------
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/cloudinit/cmd/main.py", line 653, in status_wrapper
ret = functor(name, args)
File "/usr/lib/python3/dist-packages/cloudinit/cmd/main.py", line 362, in main_init
init.apply_network_config(bring_up=bool(mode != sources.DSMODE_LOCAL))
File "/usr/lib/python3/dist-packages/cloudinit/stages.py", line 699, in apply_network_config
net.wait_for_physdevs(netcfg)
File "/usr/lib/python3/dist-packages/cloudinit/net/__init__.py", line 523, in wait_for_physdevs
physdevs = extract_physdevs(netcfg)
File "/usr/lib/python3/dist-packages/cloudinit/net/__init__.py", line 519, in extract_physdevs
raise RuntimeError('Unknown network config version: %s' % version)
RuntimeError: Unknown network config version: None
------------------------------------------------------------
Cloud-init v. 20.2-45-g5f7825e2-0ubuntu1~20.04.1 running 'init' at Wed, 01 Apr 2020 17:23:50 +0000. Up 23.69 seconds.
ci-info: +++++++++++++++++++++++++++Net device info++++++++++++++++++++++++++++
ci-info: +--------+-------+-----------+-----------+-------+-------------------+
ci-info: | Device | Up | Address | Mask | Scope | Hw-Address |
ci-info: +--------+-------+-----------+-----------+-------+-------------------+
ci-info: | eth0 | False | . | . | . | dc:a6:32:b1:78:8e |
ci-info: | lo | True | 127.0.0.1 | 255.0.0.0 | host | . |
ci-info: | lo | True | ::1/128 | . | host | . |
ci-info: | wlan0 | False | . | . | . | dc:a6:32:b1:78:8f |
ci-info: +--------+-------+-----------+-----------+-------+-------------------+
ci-info: +++++++++++++++++++Route IPv6 info+++++++++++++++++++
ci-info: +-------+-------------+---------+-----------+-------+
ci-info: | Route | Destination | Gateway | Interface | Flags |
ci-info: +-------+-------------+---------+-----------+-------+
ci-info: +-------+-------------+---------+-----------+-------+
2020-04-01 17:23:50,653 - stages.py[WARNING]: Failed to rename devices: Failed to apply network config names: Unknown network config version: None
Related bugs:
* bug 1798117: juju sends "network" top level key to user.network-config in lxd containers
To manage notifications about this bug go to:
https://bugs.launchpad.net/cloud-init/+bug/1906187/+subscriptions