UI does not send interface constraints when composing a machine

Bug #1876180 reported by Lee Trager
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
Fix Released
High
Caleb Ellis
maas-ui
Fix Released
Unknown

Bug Description

I tried to compose a machine with two interfaces using the UI. The request went through with no errors however the region never received any interface constraints. Below is what was sent over the websocket. As you can see "interfaces" is set to ""

Note this effects all Pod types and this bug may exist previous versions of MAAS.

{
  "type": 0,
  "request_id": 24,
  "method": "pod.compose",
  "params": {
    "storage": "0:4(maas),1:4(maas)",
    "requests": [
      {
        "poolId": "e9c55659-125f-4b50-abf7-7ed631b3602c",
        "size": 8,
        "available": 11
      }
    ],
    "interfaces": "",
    "domain": 0,
    "zone": 1,
    "cores": "2",
    "memory": "2048",
    "id": 78
  }
}

Tags: ui
Lee Trager (ltrager)
description: updated
Revision history for this message
Caleb Ellis (caleb-ellis) wrote :

If add a couple of interfaces with manually entered IP addresses I get:
  "interfaces": "eth0:ip=192.168.1.1;eth1:ip=196.168.1.2",

If I do the same but select subnets istead I get:
  "interfaces": "eth0:subnet_cidr=10.249.0.0/21;eth1:subnet_cidr=172.16.99.0/24",

But if I add a couple of interfaces but enter/select no other information I get:
  "interfaces": "",

What should the shape of the interfaces constraint look like in this case?

Changed in maas:
status: New → Incomplete
Revision history for this message
Lee Trager (ltrager) wrote :

Interface constraints require some kind of attribute. They should also be associated with a subnet so I think the UI should automatically select the first subnet where managed = True.

In the case of no IP assigned the UI will send:
"interfaces": "eth0:subnet_cidr=10.249.0.0/21;eth1:subnet_cidr=172.16.99.0/24",

In the case where IPs are assigned the UI will send:
"interfaces": "eth0:subnet_cidr=10.249.0.0/21,ip=10.249.0.100;eth1:subnet_cidr=172.16.99.0/24,172.16.99.100",

Changed in maas:
status: Incomplete → New
Lee Trager (ltrager)
Changed in maas:
milestone: none → 2.8.0rc1
Lee Trager (ltrager)
Changed in maas:
importance: Undecided → High
Changed in maas-ui:
status: Unknown → New
Revision history for this message
Caleb Ellis (caleb-ellis) wrote :

Okay, the way it's currently set up is that if a subnet is not chosen (which is the default) you can manually enter an IP address. But if a subnet IS chosen the IP address field is disabled with the label "Auto-assigned".

You're saying that the correct behaviour should be that the the first available subnet is chosen automatically, which means in the current set up you could never manually enter an IP, because it would be disabled. Should the IP address field instead not be disabled? Maybe some help text that says something along the lines of "Leave empty to auto-assign"?

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

Yes I think allowing the IP address field to always be enabled and adding some help text would be a good way to solve this.

Changed in maas:
assignee: nobody → Caleb Ellis (caleb-ellis)
status: New → In Progress
Revision history for this message
Caleb Ellis (caleb-ellis) wrote :
Changed in maas:
status: In Progress → Fix Committed
Changed in maas-ui:
status: New → Fix Released
Alberto Donato (ack)
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.