maas-devel team mailing list archive
-
maas-devel team
-
Mailing list archive
-
Message #01619
Re: Idea for dynamic/static IP allocation
* Julian Edwards <julian.edwards@xxxxxxxxxxxxx> [2014-05-05 19:00]:
> On 06/05/14 02:50, Ryan Harper wrote:
> > Not sure cleanup will be enough:
> >
> > - lxc containers generate random mac addresses
> > - dhcpd is designed to keep all MACs around forever in case it can hand
> > the same IP back to a known host
>
> Can you elaborate on this? The lease file is cleaned every hour or so
> and expired leases are removed.
I don't have it handy, but some googling about pruning the lease file
revealed a discussion on why the leases file wasn't pruned by dhcpd; and
the response was because they wanted to keep them around to hand them
out again. This of course is in the context of physical machines.
>
> > - dhcp lease time (default is quite large, IIUC to reduce the amount of
> > dhcp traffic)
> >
> > Combine this with our lab in OIL which does a new openstack deployment
> > every 30 minutes 24x7, times 8 runs in parallel (and we'll increase as
> > we have new customer hardware).
> >
> > I don't believe there is an easy way to tell dhcpd that an lxc is done
> > with its IP. And at the rate of which lxc containers are going to be
> > going up and down this could create a lot of churn on maas re-writing
> > dhcpd.leases and/or restarting DHCPd.
>
> If the LXC is shut down correctly, dhcpc will release the lease. If the
> LXC is just ripped out, then the zombie lease will exist until it expires.
In our case, we run juju destroy-environment; it's not clear to me if
this results in a "clean" lxc shutdown.
--
Ryan Harper
Canonical, Ltd.
Attachment:
pgpB5zx5zc_pa.pgp
Description: PGP signature
Follow ups
References