[2.0b7, regression] maas-rack register makes up a new hostname

Bug #1592246 reported by Mark Shuttleworth
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
Fix Released
Critical
Lee Trager

Bug Description

I just registered a new rack controller with my region:

  sudo maas-rack register --url http://.../MAAS --secret abc...xyz

The register succeeded and I see the new rack controller in the nodes listing, but it has a made-up name instead of its actual hostname.

The registration process should include the rack server telling the region the name it would prefer (with the region free to reject the registration if the name is not unique).

Related branches

summary: - maas-rack register makes up a new hostname
+ [2.0b7] maas-rack register makes up a new hostname
Changed in maas:
status: New → Confirmed
importance: Undecided → Critical
milestone: none → 2.0.0
summary: - [2.0b7] maas-rack register makes up a new hostname
+ [2.0b7, regression] maas-rack register makes up a new hostname
Revision history for this message
Newell Jensen (newell-jensen) wrote :

Mark,

I was unable to reproduce what you were seeing. Here are the steps that I performed.

Steps:

1. Created two separate VMs (one for the region controller and one for the rack controller).

2. Installed region controller on region VM:

$ sudo apt install maas-cli maas-region-controller

3. Created superuser to login into MAAS UI on region VM.

4. Installed rack controller on the rack VM:

$ sudo apt install maas-rack-controller

5. Registered the rack on the rack VM using the url and secret of the region:

$ sudo maas-rack register --url http://.../MAAS --secret ...

In the MAAS UI there are two controllers and they have the hostnames of the VMs.

If your steps were different than the above can you please provide them so we can try and reproduce the issue?

The above steps were performed with MAAS Version 2.0.0 (beta7+bzr5112)

Changed in maas:
assignee: nobody → Newell Jensen (newell-jensen)
status: Confirmed → Incomplete
Revision history for this message
Mike Pontillo (mpontillo) wrote :

Here's a guess: by the time maas-rack-controller was installed on the 2nd machine, the rack had already auto-enlisted in MAAS and grabbed a generated name. Then when the rack was registered, no subsequent update occurred.

I would try starting up the 2nd VM after the first MAAS is up and running, so that it auto-enlists first.

Revision history for this message
Mike Pontillo (mpontillo) wrote :

Reassigning Lee; he already has a branch in progress that should fix this.

Changed in maas:
assignee: Newell Jensen (newell-jensen) → Lee Trager (ltrager)
status: Incomplete → Triaged
Revision history for this message
Mark Shuttleworth (sabdfl) wrote : Re: [Bug 1592246] Re: [2.0b7, regression] maas-rack register makes up a new hostname

In my case, it can't have been an auto-enlistment issue, because the
machine I'm using as a rack controller is on a completely different
network and has never been pxe-booted off the MAAS region that I was
adding it to. So, this is something else.

I did the following:

 * installed maas-regiond on a machine in one subnet
 * pxe-booted a bunch of machines on that subnet to auto-enlist them
 * then went to a nuc on a completely different subnet
 * installed maas-rackd on that machine
 * used maas-rack register --url --secret
 * then went to look at the controllers on the region

Mark

Revision history for this message
Lee Trager (ltrager) wrote :

Has a MAAS region or rack controller ever run on that machine? Did one of your machines go missing? While going through the code I noticed that maas-rack register isn't deleting /var/lib/maas/maas_id. I'm wondering if a previous install had created /var/lib/maas/maas_id and when you used the maas-rack register command it connected with the old system_id and stole an existing node instead of creating a new one.

Revision history for this message
Mark Shuttleworth (sabdfl) wrote :

Yes, a rack controller did run there previously.

Mark

Changed in maas:
status: Triaged → Fix Committed
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.

Other bug subscribers

Remote bug watches

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