MAAS does not provide an API for reserving a static IP for a given MAC address

Bug #1387239 reported by Ryan Harper on 2014-10-29
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
High
Graham Binns

Bug Description

We have an SDN charm that is creating a VM on-the-fly which only DHCPs on the virtual nic to obtain an IP address. While they're currently arp'ing to "find" the IP that was obtained, this is very unreliable and racy.

the ipaddress API only allocates IPs but does not associate them with a MAC.
sticky ip only associates with MACs on a registered node, but the VM cannot be registered since it's a block box OS.

Neither of these fit the use case.

With the give_me_an_ip_for_this _mac I would be able register a specific MAC value with MAAS and have MAAS reply with the IP that will be associated with the MAC. Using the returned IP address, I can configure the charm with the registered MAC and know that when the VM DHCPs it will obtain the IP address MAAS associated with the provided MAC.

This gives the deployer enough control to configure the charms before deployment with MAC and IP addresses used in charm relations.

Tags: oil Edit Tag help

Related branches

Marking High since this affects OIL.

summary: - maas should provide a give_me_an_ip_for_this_mac API
+ MAAS does not provide an IP for reserving a static IP for a given MAC
+ address
Changed in maas:
status: New → Triaged
importance: Undecided → High
milestone: none → next
Christian Reis (kiko) on 2014-10-29
summary: - MAAS does not provide an IP for reserving a static IP for a given MAC
+ MAAS does not provide an API for reserving a static IP for a given MAC
address
Julian Edwards (julian-edwards) wrote :

Are you using cloud-init to start the new VMs? If so, you can pass the IP (and netmask etc) to that and avoid DHCP altogether.

Julian Edwards (julian-edwards) wrote :

FWIW this is what we're going to do in MAAS eventually so that we don't rely on DHCPD for deployments other than the PXE stage, it will be a lot more reliable.

On Wed, Oct 29, 2014 at 7:55 PM, Julian Edwards <email address hidden>
wrote:

> Are you using cloud-init to start the new VMs? If so, you can pass the
> IP (and netmask etc) to that and avoid DHCP altogether.
>

I wish. VMs are black boxes from SDN vendors.

Julian Edwards (julian-edwards) wrote :

On Thursday 30 Oct 2014 01:39:31 you wrote:
> On Wed, Oct 29, 2014 at 7:55 PM, Julian Edwards <email address hidden>
> wrote:
> > Are you using cloud-init to start the new VMs? If so, you can pass the
> > IP (and netmask etc) to that and avoid DHCP altogether.
>
> I wish. VMs are black boxes from SDN vendors.

Darn! Ok, thanks.

So basically we need an additional IP reservation type that also writes a host
map to the DHCP server. Or perhaps just change the existing API so that
there's an optional mac parameter, which if present causes the host map to be
written.

Graham Binns (gmb) on 2014-10-30
Changed in maas:
status: Triaged → In Progress
assignee: nobody → Graham Binns (gmb)
Christian Reis (kiko) on 2014-10-30
Changed in maas:
milestone: next → 1.7.1
Christian Reis (kiko) wrote :

Can't there be multiple IPs for a given MAC, though? Will the network model change allow for that sort of setup?

Changed in maas:
status: In Progress → Fix Committed
Changed in maas:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers