MAAS should allow recognizing enlisting nodes by BMC credentials rather than just MAC

Bug #1707216 reported by Jason Hobbs
18
This bug affects 3 people
Affects Status Importance Assigned to Milestone
MAAS
Fix Released
Low
Newell Jensen

Bug Description

MAAS should change the requirement for a new machine to have a MAC address, and instead require it to either have a MAC address or a unique set of IPMI credentials.

If a unique set of IPMI credentials is given and no MAC address, MAAS can power on the node, start the enlistment scripts on it as if it were a brand new unknown node, discover the enlisting node's BMC credentials, and recognize that a machine in MAAS already has those credentials, and update that machine with the MAC address(es) of the machine. At that point it would be ready to start commissioning.

This relieves the burden of having to find the MAC address for machines when adding them, which isn't always trivial. It allows machines to be added through the API with useful information like hostname and zone, rather than having to manually go and find machines that were simply powered on and allowed to PXE and enlist, and then set hostname and zone etc.

Related branches

tags: added: foundation-engine
Changed in maas:
status: New → Won't Fix
Revision history for this message
Christian Reis (kiko) wrote :

One way to implement this might be to allow one to register a BMC device, and then trigger that BMC to do a fresh boot, which would trigger auto-enlistment and hopefully associate the existing BMC device to it.

Another way to do it, which would be even cheaper, would be to just have an API which took BMC credentials and triggered a power event without even touching the database.

Right now we are having to do remote boots of the machine via IPMI manually which poorly duplicates functionality in MAAS (for instance, it only supports IPMI).

Changed in maas:
status: Won't Fix → Triaged
Revision history for this message
Jason Hobbs (jason-hobbs) wrote :

You have to touch the database though kiko, the bmc credentials have to go somewhere and the API server is stateless

Revision history for this message
Jason Hobbs (jason-hobbs) wrote :

Ah I see what you're saying maybe, is a half implementation of this - just using MAAS for a glorified remote bmc client.

Revision history for this message
Andres Rodriguez (andreserl) wrote :

This is a tricky one. This would only work for machines when they have a 1:1 mapping with the BMC< and the BMC has a MAC address.

The complexity here is that MAAS uses the MAC address of the machine to uniquely identify it. You cannot say the same thing when using a BMC because the BMC can be shared among various machines. Even if you were to have a BMC, you cannot uniquely identify it unless it has a MAC attached to it.

Even then, you can have an IPMI based chassis with will be a single BMC for a whole bunch of machines. Also, you can add BMC's as devices in MAAS and after that add a machine. The BMC will continue to be a Device.

Changed in maas:
importance: Undecided → Low
Revision history for this message
Jason Hobbs (jason-hobbs) wrote :

I've never seen ipmi bmc control more than once machine, at least not through the standard commands. Can you point at an example of that or how it works? All of the semantics are mapped for a single machine - power on, off, configure boot, etc - none of it takes a machine as a parameter. how would something get around that?

Revision history for this message
Jason Hobbs (jason-hobbs) wrote :

Here's what we're doing with a script that talks to the MAAS API to accomplish this:

1) We add the node to MAAS with correct IPMI credentials and a fake MAC
address (MAAS requires a MAC address).

2) MAAS, prior to returning from the API call to add the machine, issues
the IPMI commands required to PXE boot the machine. It handles this
regardless of the machine's current state.

3) Immediately upon return from the add machine API call, we issue
another API call to delete the machine from MAAS. MAAS does not issue
any power commands in response to this, so the machine continues to
PXE boot, and will show up in MAAS as a 'New' node once enlistment
completes.

4) We poll MAAS for nodes in 'New' state, looking for a machine to match
our IPMI power address. When we find it, we set the proper hostname and
zone on it, and start commissioning.

tags: added: foundations-engine
removed: foundation-engine
tags: added: internal
Revision history for this message
Christian Reis (kiko) wrote :

I spent some time musing on this one, but I had missed the fact that it's really not possible to tell who the machine is when it boots from MAAS other than via what is provided by PXE or the commissioning environment. Somehow I assumed that we could tell that the node we created via the API was the node that MAAS was seeing boot for commissioning.

Just to summarize the root cause of the issue:

1. We only have BMC information for the nodes we are adding to MAAS
2. MAAS can only identify machines today by PXE MAC

It could potentially identify by BMC MAC but it doesn't, and that's this bug.

Changed in maas:
milestone: none → 2.5.x
Changed in maas:
milestone: 2.5.x → 2.5.0
Changed in maas:
status: Triaged → In Progress
assignee: nobody → Newell Jensen (newell-jensen)
Changed in maas:
status: In Progress → Fix Committed
Changed in maas:
status: Fix Committed → In Progress
Changed in maas:
status: In Progress → Fix Committed
Changed in maas:
milestone: 2.5.0 → 2.5.0alpha1
Changed in maas:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.