On Sat, Dec 10, 2016 at 08:57:22PM +0100, Bernhard Schmidt wrote:
> I don't think this will ever be fixed with ifupdown. I think
> systemd-networkd and NetworkManager do the right thing here, but I have
> never had a look at either for maintaining a _server_. So I will not
> propose switching to those.

I've put together a workaround for ifupdown that does the right thing
for both dual-stack and ipv4-only instances:

https://anonscm.debian.org/cgit/cloud/fai-cloud-images.git/commit/?h=dhcpv6&id=ff79069df0eb08634f52a355e5c578c10532479c

This change isn't merged into the master branch in the fai-cloud-images
repo, and I'd like others on the cloud team to review it and see if
there's anything I'm missing or that could be improved. Of course, it
should go without saying that such a hack is unfortunate, and it'd be
preferable if ifupdown did the right thing, but as you say, it probably
never will.

Something similar should work for the jessie images, but I'm not
familiar with how they're generated. jessie doesn't have
/lib/ifupdown/wait-for-ll6.sh, so that functionality may need to be
incorporated into a helper script similar to the one in my branch.

The key is that /etc/network/interfaces is populated with entries of the
form:

iface eth0 inet dhcp
iface eth0 inet6 manual
  up /usr/local/sbin/inet6-ifup-helper
  down /usr/local/sbin/inet6-ifup-helper

The inet6-ifup-helper takes care of starting and stopping dhclient -6 on
the appropriate interfaces. It should only exit 0, so it shouldn't
interfere with ifupdown's operation.

I've tested this configuration on the primary interface and on secondary
interfaces on instances in both dual-stack and v4-only networks and it
works as expected.

I don't really like the idea of installing actual code on AMIs from the
fai-cloud-images repo, but I'm not really interested in packaging
inet6-ifup-helper either.

I've created public AMIs ami-290ca649 (us-west-2) and ami-95a7fdf0
(us-east-2) based on these changes if anyone would like to perform
additional testing...

noah

Attachment: signature.asc
Description: PGP signature

Reply via email to