summaryrefslogtreecommitdiff
path: root/cloudinit/cmd
diff options
context:
space:
mode:
authorRyan Harper <ryan.harper@canonical.com>2019-10-24 20:16:47 +0000
committerServer Team CI Bot <josh.powers+server-team-bot@canonical.com>2019-10-24 20:16:47 +0000
commitf1c788e2bb7c86069d43a015267facfb8aefcdf0 (patch)
tree528ad995c0ee62b4cf5d24080faf1b8f17937256 /cloudinit/cmd
parent5bec6b0e2a2ce5fd03bb04f441536fc130e67997 (diff)
downloadvyos-cloud-init-f1c788e2bb7c86069d43a015267facfb8aefcdf0.tar.gz
vyos-cloud-init-f1c788e2bb7c86069d43a015267facfb8aefcdf0.zip
net/netplan: use ipv6-mtu key for specifying ipv6 mtu values
netplan introduced an 'info' subcommand which emits yaml describing implemented features that indicate new or changed fields and values in the yaml that it accepts. Previously, cloud-init emitted the key 'mtu6' for ipv6 MTU values. This is not correct and netplan will fail to parse these values. Netplan as of 0.98 supports both the info subcommand and the ipv6-mtu key. This branch modifies the netplan renderer to collect the netplan info output into a 'features' property which is a list of available feature flags which the renderer can use to modify its output. If the command is not available, no feature flags are set and cloud-init will render IPv6 MTU values just as MTU for the subnet.
Diffstat (limited to 'cloudinit/cmd')
-rwxr-xr-xcloudinit/cmd/devel/net_convert.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/cloudinit/cmd/devel/net_convert.py b/cloudinit/cmd/devel/net_convert.py
index 9b768304..2d27a76a 100755
--- a/cloudinit/cmd/devel/net_convert.py
+++ b/cloudinit/cmd/devel/net_convert.py
@@ -113,6 +113,8 @@ def handle_args(name, args):
config['postcmds'] = False
# trim leading slash
config['netplan_path'] = config['netplan_path'][1:]
+ # enable some netplan features
+ config['features'] = ['dhcp-use-domains', 'ipv6-mtu']
else:
r_cls = sysconfig.Renderer
config = distro.renderer_configs.get('sysconfig')