← Back to team overview

maas-devel team mailing list archive

Re: Idea for dynamic/static IP allocation

 

On 03/05/14 00:11, Andreas Hasenack wrote:
> On Fri, May 2, 2014 at 10:50 AM, Gavin Panella
> <gavin.panella@xxxxxxxxxxxxx <mailto:gavin.panella@xxxxxxxxxxxxx>> wrote:
> 
>     On 2 May 2014 14:42, Andres Rodriguez
>     <andres.rodriguez@xxxxxxxxxxxxx
>     <mailto:andres.rodriguez@xxxxxxxxxxxxx>> wrote:
>     > Why not making the static the addresses that have already been
>     assigned
>     > during enlistment/commissioning ? It seems to me that when the
>     commissioning
>     > process happens, the node already know what's its IP address. Why
>     not making
>     > an static mapping at that stage?
> 
>     That's what happens now. However, it seems that dhcpd treats static
>     assignments within a dynamic range as advisory only, and will give
>     them out when it runs low of free addresses.
> 
> 
> 
> What else can you do with omshell? Delete a lease perhaps? Add ranges,
> so that the static IP is skipped?

omshell manages "objects" inside dhcpd, and is quite limited in what it
can do, basically what you see in the leases file is what you can
manipulate.

So, ranges cannot be changed on the fly.

> And I missed this bit: why don't we use ranges in dhcpd.conf to exclude
> the new static ip, because we need to restart dhcpd for that to take
> effect? No reload option? And why would a restart be particularly bad?

Yes it requires a restart [1] which is bad because there's no HA DHCPD
in MAAS (yet), but is not the main problem with this approach.

Imagine if you have a range of several thousand IPs.  DHCPD then
allocates an IP in the middle of that range if the client requested it.
 We now need to re-write the config with two more large ranges.  Repeat
this process again and again and you can potentially end up with a huge
number of ranges to configure.  It starts to become unmanageable.

[1] from dhcpd man page: "Whenever changes are made to the dhcpd.conf
file, dhcpd must be restarted"


References