Hi,

I'm setting up and Openstack cluster and I was trying out a Debian 10 cloud 
image. The IPv4 address works via DHCP, and the metadata service provides the 
static data for IPv4 and IPv6. This gets written to 
/etc/network/interfaces.d/50-cloud-init, but the system won't honour the 
configuration because the lines in /etc/network/interfaces have a conflicting 
config.

/etc/network/interfaces contains

# The normal eth0
allow-hotplug eth0
iface eth0 inet dhcp

And the file 50-cloud-init has

```
# This file is generated from information provided by the datasource.  Changes
# to it will not persist across an instance reboot.  To disable cloud-init's
# network configuration capabilities, write a file
# /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with the following:
# network: {config: disabled}
auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
    address 145.110.26.4/28
    post-up route add default gw 145.110.26.1 || true
    pre-down route del default gw 145.110.26.1 || true

# control-alias eth0
iface eth0 inet6 static
    address 2a07:8500:140:1000::3/64
    post-up route add -A inet6 default gw 2a07:8500:140:1000::1 || true
    pre-down route del -A inet6 default gw 2a07:8500:140:1000::1 || true
```

There is probably more than one way to fix the issue, between how the cloud 
image is put together and the cloud-init software.

I suppose cloud-init could remove the dhcp line from /etc/network/interfaces.

Reply via email to