← Back to team overview

maas-devel team mailing list archive

MAAS IP Allocation [was: Re: 1.6.0 beta 4 out]

 

Hi Julian,


> The original design (as discussed on this list and design docs) was not to
> do
> this, but to give an IP when allocating the node to a user.  This was so
> that
> (in the future) users can say things like "I want to use this VPN/bond IP"
> etc
> right from the start without wasting another IP.  It's very hard for MAAS
> to
> be able to change the IP on demand for a machine that is already booted
> unless
> we go down the Azure road and run a MAAS agent on the nodes.
>

I do agree with you that it is very hard to change the IP on demand, and
this should not be considered as part of the DHCP work.

>
> There is a separate mechanism to permanently assign an IP to a node if the
> admin wishes (the API for that is not coded yet but the underlying basics
> are
> in place).  Is this what folks want now?
>

I think that this is indeed something we want to be able to do. I think it
is important for us to be able to assign an IP to a node's MAC address, so
that when we configure things like bonding (in the future, or manually), we
could choose what interface will be the default or the one answering ARP
requests for the bond. We should be able to do this without even having the
machine allocated to a user. (Only an admin should be able to do this).

>
> > On Sat, Jul 12, 2014 at 9:55 AM, Mark Shuttleworth <mark@xxxxxxxxxx>
> wrote:
> > > I would suggest that once MAAS "owns" a machine, i.e. MAAS has PXE
> > > booted the machine itself (credentials work), it is given a name and
> > > static IP address which does not change unless edited by the user (it
> > > should be possible for the user to put it on a difference, unused IP
> > > address in the static range). Renaming the machine would update DNS,
> > > editing the IP would update DNS.
> > >
> > > This allows a user to "ping" a machine and see that it is off.
>

I see benefits/advantages on doing this:

1. Having machines with pre-allocated addresses makes maintenance easier.
Nodes will always have a DNS/IP address mapping, allowing the administrator
to know IP addresses before hand, which eases maintenance.
2. Allows for network enumeration / mapping between machines, DNS names,
MAC and IP addresses. (Allows administrators to select the interfaces to
use for things like bonding, if the IP is assigned to an specific MAC)
3. MAAS will do less updating of DNS/DHCP mappings every time machines are
powered on/off. At scale, we expect that many machines would be powered
on/off, and having to update mappings when this happens might become costly
(As an example, one of the drivers of DHCP changes was the fact that celery
would consume 100% CPU when parsing DHCP leases, because they were read on
real time. With this this wouldn't be the case as IP address would be
previously defined and would not change unless done by the administrator).

Disadvantages

1. This is not a cloud-like approach.
2. We will be using IP address of a network range even if machines are
powered off.


> We can do this as things stand because if a user still "owns" a machine, it
> retains the static IP given at startup time.
>
> Or to put it another way, a machine that is supposed to be up will always
> have
> an IP.  If you want to see whether it's really up or not we should
> probably do
> an API call to examine the power status (on the BMC); then if it's still
> not
> pingable you know there's a more serious problem.
>

I think that we can keep the current approach on how MAAS is assigning IP
addresses, however, as briefly discussed via IRC with Julian, we can have a
Setting option that would change this approach to basically do the
following:

1. Pre-allocate IP address to nodes that have successfully "commissioned".
2. Change the IP allocation to a different MAC address or a different IP
address, allowing DNS mapping to be updated without having the allocate /
turn on the machine.
3. We could potentially allocate multiple IP's to a node, each one to a
different MAC addresses.

@James.
We would really like to hear your input.

-- 
Andres Rodriguez
Engineering Manager, HWE Team
Canonical USA, Inc.

Follow ups