Comment 18 for bug 1367482

Revision history for this message
Graham Binns (gmb) wrote :

So, after some hacking, we came up with a partial fix — but only a
partial one — for this. We can assign both NICs static IPs and write the
hostmaps out just fine. DNS is a bit trickier — it needs a refactoring
since the DNS Zone config uses `hostname` as a dict key, so you can only
have one entry per host at the moment — but not a blocker.

However, this uncovers several other very problematic failure states:

 - We don't currently (AIUI) bring up all the interfaces on a node on
   boot; only one is auto-configured, so even if we assign IPs to all
   the NICs on a node, only one will come up. However, Juju may try the
   IP address for which the NIC hasn't come up, in which case it will
   fail.
 - Similarly, we don't guarantee that the networks of all the NICs will
   be routable from Juju's point of view (this doesn't fit the immediate
   case, since both NICs are on the same network here). The upshot is
   that having DNS entries for the node that point at IPs on different
   subnets could lead to Juju using the wrong address, and so failing.

We discussed moving the allocation of static IP and the writing of the
DHCP host map until after the node has finished deploying (i.e. once it
turns of netboot). However, this doesn't solve the problem, because we
can't guarantee that the node will use the correct interface when it
reboots, and we're back in the same state as we were before.

Realistically, the only correct way for us to fix this is to get the
udev rules right to force the correct NIC to be the primary NIC *every*
time the node boots. That's not quick work, however.