unable to deploy a machine with vmhost if a bond interface was created
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MAAS |
Fix Released
|
High
|
Alberto Donato | ||
3.2 |
Fix Released
|
High
|
Alberto Donato |
Bug Description
Since 3.2, i can no longer deploy new physical machine:
1. once my machine is ready, i go to the network section and create a bond combining my boot interface with another one
2. at deployment time, OS gets installed (20.04) and after reboot cloud-init successfully completes but machine gets stuck in "deploying" state
Note that if i deploy ithout creating bond, it will work.
Looked at the regiond.log and found an exception reported in it:
```
2022-10-07 11:04:24 metadataserver.
Traceback (most recent call last):
File "/usr/lib/
File "/snap/
return target()
File "/snap/
task()
File "/snap/
task()
--- <exception caught here> ---
File "/snap/
result = inContext.theWork()
File "/snap/
File "/snap/
return self.currentCon
File "/snap/
return func(*args,**kw)
File "/snap/
return func(*args, **kwargs)
File "/snap/
result = func(*args, **kwargs)
File "/snap/
File "/snap/
return func_outside_
File "/snap/
return func(*args, **kwargs)
File "/usr/lib/
return func(*args, **kwds)
File "/snap/
File "/snap/
ip = node.ip_
```
Looked the code and there was a change between 3.1 and 3.2 which fails:
```
# the IP is associated to the bridge the boot interface is in, not the
# interface itself
boot_if = node.get_
ifaces = list(boot_
ip = node.ip_
```
I have extracted the JSON output of a maas-cli "machine read" of my interface and my boot interface looks like this:
```json
{
"name": "eno1",
"system_id": "mx48cn",
"type": "physical",
"vlan": {
"vid": 123,
...
},
"link_connected": true,
"children": [
"bond0"
],
"enabled": true,
}
```
And here is my bond0 interface:
```json
{
"parents": [
"eno1",
"eno2"
],
"name": "bond0",
"vendor": null,
"vlan": {
"vid": 123,
},
"link_
"children": [
"br0"
],
"enabled": true,
}
```
and finally my br0 (created automatically by maas):
```json
{
"links": [
{
"subnet": {
"vlan": {
"vid": 123,
},
}
}
],
"firmware_
"sriov_max_vf": 0,
"product": null,
"params": {
"bridge_stp": false,
"
},
"discovered": null,
"link_speed": 0,
"interface_
"parents": [
"bond0"
],
"name": "br0",
"vlan": {
"vid": 123,
},
"link_
}
```
As you can see, maas python code ends up with an empty list hence generating the exception it assumes there is always at least on entry in the list.
Related branches
- MAAS Lander: Needs Fixing
- Alberto Donato (community): Approve
-
Diff: 117 lines (+67/-7)2 files modifiedsrc/metadataserver/api_twisted.py (+27/-6)
src/metadataserver/tests/test_api_twisted.py (+40/-1)
- Adam Collard (community): Approve
- MAAS Lander: Approve
-
Diff: 119 lines (+69/-7)2 files modifiedsrc/metadataserver/api_twisted.py (+27/-6)
src/metadataserver/tests/test_api_twisted.py (+42/-1)
Changed in maas: | |
status: | New → Triaged |
importance: | Undecided → High |
tags: | added: bug-council |
Changed in maas: | |
status: | Triaged → In Progress |
milestone: | none → 3.3.0 |
Changed in maas: | |
status: | In Progress → Fix Committed |
Changed in maas: | |
milestone: | 3.3.0 → 3.3.0-beta1 |
Changed in maas: | |
status: | Fix Committed → Fix Released |
Changed in maas: | |
milestone: | 3.3.0-beta1 → 3.3.0-beta2 |
Note that:
1. system fails alike also if i do not ask to deploy it as a KVM host
2. system deploys fine if i do not use bond interfaces