ifupdown-ng: not compatible with vlan configuration used previously with ifupdown
I'm the maintainer of the cloud-init package which currently depends on the ifupdown package (as the Busybox's ifupdown had missing functionality). Today I was noticed the recent change to make ifupdown-ng the default package to provide ifup/ifdown tools when rebuilding a VM that is using the cloud-init package. The build failed with these errors:
ERROR: ifupdown-0.8.35-r0: trying to overwrite sbin/ifdown owned by ifupdown-ng-0.8.0-r1.
ERROR: ifupdown-0.8.35-r0: trying to overwrite sbin/ifquery owned by ifupdown-ng-0.8.0-r1.
ERROR: ifupdown-0.8.35-r0: trying to overwrite sbin/ifup owned by ifupdown-ng-0.8.0-r1.
I had intended to test cloud-init with ifupdown-ng at some point in the near future but, due to this issue, I locally rebuilt cloud-init to use ifupdown-ng rather than ifupdown as a dependancy.
I have since performed some testing of cloud-init with various networking configurations to verify the compatibility of ifupdown-ng and I've spotted a problem with VLANs. The following /etc/network/interfaces content (as generated by cloud-init) has worked fine in the past with the ifupdown package but does not work correctly with ifupdown-ng package:
iface lo inet loopback
auto eth0
iface eth0 inet static
address 1.2.3.4/24
mtu 8000
# control-alias eth0
iface eth0 inet6 static
address abcd:ef12:3456:3::4/64
auto servers
iface servers inet static
address 1.2.10.4/24
gateway 1.2.10.1
mtu 8000
vlan-raw-device eth0
vlan_id 5
# control-alias servers
iface servers inet6 static
address abcd:ef12:3456:10::4/64
gateway abcd:ef12:3456:10::1
This should result in 2 network interfaces, eth0 and servers but only eth0 is setup.
Manually trying to bring up the servers interface gives the following errors:
# ifup servers
execute '/usr/libexec/ifupdown-ng/link': No file descriptors available
ifup: failed to change interface servers state to 'up'
From a quick look at the ifupdown-ng code (interface-file.c) it does not appear to handle "vlan-raw-device" or "vlan_id" entries at all.