Composing a VM with an IP address on its interface is in Auto Assign state after commissioning

Bug #1846457 reported by Nicolas Pochet
36
This bug affects 6 people
Affects Status Importance Assigned to Milestone
MAAS
Triaged
High
Stamatis Katsaounis
3.3
Triaged
Medium
Unassigned
3.4
New
High
Unassigned

Bug Description

When composing a VM with an IP address on its interface with the following command:

maas root pod compose 5 hostname=foo cores=1 memory=1024 storage=5 interfaces="eth0:space=oam-space,ip=192.168.105.10"

results in the VM having its interface in Auto Assign mode after commissioning.

I also tried with:
maas root pod compose 5 hostname=foo cores=1 memory=1024 storage=5 interfaces="eth0:space=oam-space,ip=192.168.105.10,mode=static"

But the result is the same.

The expected result would be that the VM has an IP address that persist after commissioning.

Alberto Donato (ack)
Changed in maas:
status: New → Triaged
importance: Undecided → Critical
importance: Critical → Medium
Revision history for this message
Vern Hart (vern) wrote :

I tried this on maas 2.6.2 and verified that the node commissions with the given static ip, the mode is auto and the ip goes away after it finishes commissioning.

ubuntu@OrangeBox100:~$ maas admin pod compose 13 hostname=vern1 cores=1 memory=1024 storage=5 interfaces="eth0:space=undefined,ip=172.27.100.100,mode=static"
Success.
Machine-readable output follows:
{
    "system_id": "73a8gy",
    "resource_uri": "/MAAS/api/2.0/machines/73a8gy/"
}
ubuntu@OrangeBox100:~$ systemid=73a8gy
ubuntu@OrangeBox100:~$ maas admin machine read $systemid | jq '{"status": .status_name, "boot_interface": .boot_interface.links[0] | {"mode": .mode, "ip_address": .ip_address}}'
{
  "status": "Commissioning",
  "boot_interface": {
    "mode": "auto",
    "ip_address": "172.27.100.100"
  }
}
ubuntu@OrangeBox100:~$ maas admin machine read $systemid | jq '{"status": .status_name, "boot_interface": .boot_interface.links[0] | {"mode": .mode, "ip_address": .ip_address}}'
{
  "status": "Ready",
  "boot_interface": {
    "mode": "auto",
    "ip_address": null
  }
}
ubuntu@OrangeBox100:~$ maas admin version read
Success.
Machine-readable output follows:
{"capabilities": ["networks-management", "static-ipaddresses", "ipv6-deployment-ubuntu", "devices-management", "storage-deployment-ubuntu", "network-deployment-ubuntu", "bridging-interface-ubuntu", "bridging-automatic-ubuntu", "authenticate-api"], "version": "2.6.2", "subversion": "7841-ga10625be3-0ubuntu1~19.10.1"}

Revision history for this message
Andre Ruiz (andre-ruiz) wrote :

I'm having this problem right now with maas snap 2.9.2.

I'm using "eth0:space=oam:ip=x.x.x.x" (as opposed to "eth0:space=oam,ip=x.x.x.x) but I don't think this makes a difference because the behavior I see is exactly the same as described (ip gets assigned, can be seen in the network config screen but after commissioning it goes away).

We are not blocked by this right now because static ip is not necessary in initial tests but it will become a problem soon.

Revision history for this message
Andre Ruiz (andre-ruiz) wrote :

Just mentioning that https://bugs.launchpad.net/maas/+bug/1883349 is a duplicate of this and there it mentions a workaround.

Revision history for this message
Björn Tillenius (bjornt) wrote :

The issue here is that after composing the VM, we do a normal commissioning of the VM. That will autodetect the interface configuration and reset them to the default configuration, which is auto assign.

Given that we configure the interfaces fully on compose, we can probably get away with setting retain_network_configuration to True.

Or we could store the composed network configuration and use that when configuring networking after commissioning.

summary: - [2.6] Composing a VM with an IP address on its interface is in Auto
- Assign state after commissioning
+ Composing a VM with an IP address on its interface is in Auto Assign
+ state after commissioning
Changed in maas:
milestone: none → 3.3.0
Changed in maas:
milestone: 3.3.0 → 3.4.0
Alberto Donato (ack)
Changed in maas:
milestone: 3.4.0 → 3.4.x
Changed in maas:
importance: Medium → High
milestone: 3.4.x → 3.5.0
Changed in maas:
assignee: nobody → Stamatis Katsaounis (skatsaounis)
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.