From 3d97b29bd71b9de5fb14d8bd320c20545b88a81b Mon Sep 17 00:00:00 2001 From: Ben Howard Date: Wed, 26 Apr 2017 14:07:53 -0600 Subject: DigitalOcean: remove routes except for the public interface. Previously, the datasource for DigitalOcean allowed for a gateway on each NIC. As a result, on Ubuntu 16.04, networking.service was broken. For 17.04 and later, Ubuntu _replaces_ the default gateway with the second gateway on 'ifup' after reboot. DigitalOcean is looking at changing the meta-data, however, this will result in another version of the meta-data JSON. LP: #1681531. --- cloudinit/sources/helpers/digitalocean.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cloudinit') diff --git a/cloudinit/sources/helpers/digitalocean.py b/cloudinit/sources/helpers/digitalocean.py index 257989e8..693f8d5c 100644 --- a/cloudinit/sources/helpers/digitalocean.py +++ b/cloudinit/sources/helpers/digitalocean.py @@ -162,7 +162,7 @@ def convert_network_configuration(config, dns_servers): continue sub_part = _get_subnet_part(raw_subnet) - if netdef in ('private', 'anchor_ipv4', 'anchor_ipv6'): + if nic_type != "public" or "anchor" in netdef: del sub_part['gateway'] subnets.append(sub_part) -- cgit v1.2.3