Top-level 'network' key results in error using v2 config
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
cloud-init |
Fix Released
|
High
|
Unassigned | ||
cloud-init (Ubuntu) |
Fix Released
|
High
|
Unassigned | ||
netplan.io (Ubuntu) |
Invalid
|
Undecided
|
Unassigned |
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"
"
- "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-
---
2020-04-01 17:23:48,649 - util.py[DEBUG]: Reading from /boot/firmware/
2020-04-01 17:23:48,649 - util.py[DEBUG]: Read 245 bytes from /boot/firmware/
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 - DataSourceNoClo
---
The corresponding /var/log/
---
Cloud-init v. 20.2-45-
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/
ret = functor(name, args)
File "/usr/lib/
init.
File "/usr/lib/
net.
File "/usr/lib/
physdevs = extract_
File "/usr/lib/
raise RuntimeError(
RuntimeError: Unknown network config version: None
-------
Cloud-init v. 20.2-45-
ci-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: +++++++
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
no longer affects: | netplan |
Changed in cloud-init (Ubuntu): | |
status: | New → Triaged |
importance: | Undecided → High |
description: | updated |
no longer affects: | netplan |
Changed in cloud-init: | |
status: | New → Triaged |
importance: | Undecided → High |
Changed in netplan.io (Ubuntu): | |
status: | Confirmed → Invalid |
summary: |
- Version tag is not respected when put last + Top-level 'network' key results in error using v2 config |
Changed in cloud-init (Ubuntu): | |
status: | Triaged → Fix Committed |
Should be yamlencode(), it also happens with ubuntu- 20.10-preinstal led-server- arm64+raspi. img.xz