After doing a bunch more digging it seems to be related to https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=947351
On Tue, May 12, 2020 at 5:00 PM Ryan Belgrave <[email protected]> wrote: > Sorry if this is a duplicate message, it seems my email client may not > have replied correctly to the mailing list. > > > I tried the following two openstack images: > > > https://cloud.debian.org/images/cloud/OpenStack/current-10/debian-10-openstack-amd64.raw > > https://cdimage.debian.org/cdimage/openstack/current-10/debian-10-openstack-amd64.raw > > Both of them did not work, if there is one that doesn't include the cloud > kernel variant I can't seem to find it. > > The generic image I am using is > https://cloud.debian.org/images/cloud/buster/20200511-260/debian-10-generic-amd64-20200511-260.tar.xz > > The /var/log/cloud-init.log does show it setting the correct IP address, > while /var/log/cloud-init-output.log shows the the address from DHCP. > > 2020-05-12 13:32:28,814 - __init__.py[DEBUG]: no work necessary for > renaming of [['d0:50:99:d3:47:d1', 'enp35s0', 'igb', '0x1533']] > 2020-05-12 13:32:28,814 - stages.py[INFO]: Applying network configuration > from ds bringup=False: {'version': 1, 'config': [{'type': 'physical', > 'subnets': [{'type': 'static', 'netmask': '255.255.255.0', 'gateway': > '192.168.23.254', 'dns_nameservers': ['192.168.23.254'], 'address': > '192.168.23.100', 'ipv4': True}], 'mac_address': 'd0:50:99:d3:47:d1', > 'name': 'enp35s0'}]} > 2020-05-12 13:32:28,814 - __init__.py[DEBUG]: Selected renderer 'eni' from > priority list: None > 2020-05-12 13:32:28,816 - util.py[DEBUG]: Writing to > /etc/network/interfaces.d/50-cloud-init.cfg - wb: [644] 467 bytes > 2020-05-12 13:32:28,817 - util.py[DEBUG]: Writing to > /etc/udev/rules.d/70-persistent-net.rules - wb: [644] 99 bytes > > Cloud-init v. 18.3 running 'init-local' at Tue, 12 May 2020 13:32:28 > +0000. Up 8.18 seconds. > Cloud-init v. 18.3 running 'init' at Tue, 12 May 2020 13:33:31 +0000. Up > 70.94 seconds. > ci-info: ++++++++++++++++++++++++++++++++++++++++++++Net device > info++++++++++++++++++++++++++++++++++++++++++++ > ci-info: > +-----------------+-------+------------------------------+---------------+--------+-------------------+ > ci-info: | Device | Up | Address | > Mask | Scope | Hw-Address | > ci-info: > +-----------------+-------+------------------------------+---------------+--------+-------------------+ > ci-info: | enp35s0 | True | 192.168.23.81 | > 255.255.255.0 | global | d0:50:99:d3:47:d1 | > ci-info: | enp35s0 | True | fe80::d250:99ff:fed3:47d1/64 | > . | link | d0:50:99:d3:47:d1 | > ci-info: | enp36s0 | False | . | > . | . | d0:50:99:d3:47:d2 | > ci-info: | enp3s0f0u14u2c2 | False | . | > . | . | 4e:a5:18:33:61:79 | > ci-info: | lo | True | 127.0.0.1 | > 255.0.0.0 | host | . | > ci-info: | lo | True | ::1/128 | > . | host | . | > ci-info: > +-----------------+-------+------------------------------+---------------+--------+-------------------+ > > The server has 2 nics enp35s0 and enp36s0. Only enp35s0 is physically > plugged in and configured right now. enp3s0f0u14u2c2 is from my IPMI > console. > > I looked at /etc/network/interfaces and found something a bit curious. > > # Include files from /etc/network/interfaces.d: > source-directory /etc/network/interfaces.d > > # Cloud images dynamically generate config fragments for newly > # attached interfaces. See /etc/udev/rules.d/75-cloud-ifupdown.rules > # and /etc/network/cloud-ifupdown-helper. Dynamically generated > # configuration fragments are stored in /run: > source-directory /run/network/interfaces.d > > It looks like it's looking in /run/network/interfaces.d as well. > > /etc/network/interfaces.d/50-cloud-init.cfg contains the correct things > > auto lo > iface lo inet loopback > > auto enp35s0 > iface enp35s0 inet static > address 192.168.23.100/24 > dns-nameservers 192.168.23.254 > gateway 192.168.23.254 > > But there is a file here /run/network/interfaces.d/enp35s0 that contains > > auto enp35s0 > allow-hotplug enp35s0 > > iface enp35s0 inet dhcp > > My guess is because /run/network/interfaces.d is included it is overriding > whatever cloud-init is placing down and forcing dhcp. Not too sure where to > look next to figure out where that file is generated from and how to turn > it off when cloud-init is configuring the network. >
