cloud-init network v2 config loses some settings when rendered
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
cloud-init |
Triaged
|
Medium
|
Unassigned | ||
cloud-init (Ubuntu) |
Triaged
|
Medium
|
Unassigned |
Bug Description
Running a v2 network-config through cloud-init's net-convert we can see that we're not passing it through, but importing and re-rendering lossy.
% cat simple-v2.yaml
network:
version: 2
# comment above ethernets
ethernets:
ens0:
dhcp4: true
match:
set-name: ens0
switchports:
# all cards on second PCI bus; unconfigured by themselves, will be added
# to br0 below
match:
name: enp2*
mtu: 1280
% PYTHONPATH=`pwd` ./tools/
% cat target/
network:
version: 2
ethernets:
ens0:
dhcp4: true
mtu: 1280
We lose comments and matching.
Also note, ./tools/
% git diff tools/net-
diff --git a/tools/
index 870da63..ec4ee64 100755
--- a/tools/
+++ b/tools/
@@ -75,7 +75,7 @@ def main():
r_cls = sysconfig.Renderer
r = r_cls()
- r.render_
+ r.render_
if __name__ == '__main__':
Changed in cloud-init: | |
status: | New → Confirmed |
Changed in cloud-init (Ubuntu): | |
status: | New → Confirmed |
Changed in cloud-init: | |
importance: | Undecided → Medium |
Changed in cloud-init (Ubuntu): | |
importance: | Undecided → Medium |
Changed in cloud-init: | |
status: | Confirmed → Triaged |
Changed in cloud-init (Ubuntu): | |
status: | Confirmed → Triaged |