[2.1.3] Can't link subnet with link_up from maas API as in WebUI- Cannot configure interface to link up (with no IP address) while other links are already configured.
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MAAS |
Fix Released
|
High
|
Mike Pontillo | ||
2.1 |
Fix Released
|
High
|
Mike Pontillo |
Bug Description
I am trying to use API to update link from auto to link_up and back from link_up to auto based on the network requirement for the service deployed with Juju (see bug 1659360) and the API is not allowing me to do that. If I try a POST without first unlinking then it creates aliases for every calls eth1.1,.. eth1.x. If I unlink then try to link with mode set to link_up then it fails. I tried from the MAAS CLI to get a better error and this is what it says:
ubuntu@
{"mode": ["Cannot configure interface to link up (with no IP address) while other links are already configured."]}
The problem with this seems to be that even when subnet is unlinked, there's a default link_up link that's spawned after the last link is unlinked:
so for example:
{
"links": [
{
},
},
"mode": "auto",
"id": 198502
}
],
"enabled": true,
"resource_uri": "/MAAS/
"children": [],
"name": "eth1",
"mac_address": "00:22:
"vlan": {
"mtu": 1500,
"dhcp_on": false,
"fabric": "fabric-2",
"vid": 0,
"name": "untagged",
"id": 5005
},
"id": 90398,
"type": "physical",
"tags": [],
"system_id": "4y4cra",
"parents": [],
"params": {},
"discovered": null,
"effective_
}
Then I run,
ubuntu@
Success.
Machine-readable output follows:
{
"links": [
{
"mode": "link_up",
"id": 198686
}
],
"enabled": true,
"resource_uri": "/MAAS/
"children": [],
"name": "eth1",
"mac_address": "00:22:
"vlan": {
"mtu": 1500,
"dhcp_on": false,
"fabric": "fabric-2",
"vid": 0,
"name": "untagged",
"id": 5005
},
"id": 90398,
"type": "physical",
"tags": [],
"system_id": "4y4cra",
"parents": [],
"params": {},
"discovered": null,
"effective_
}
It creates link 198686.
ubuntu@
Desired=
| Status=
|/ Err?=(none)
||/ Name Version Architecture Description
+++-===
ii maas 2.1.3+bzr5573-
ii maas-cli 2.1.3+bzr5573-
un maas-cluster-
ii maas-common 2.1.3+bzr5573-
ii maas-dhcp 2.1.3+bzr5573-
ii maas-dns 2.1.3+bzr5573-
ii maas-proxy 2.1.3+bzr5573-
ii maas-rack-
ii maas-region-api 2.1.3+bzr5573-
ii maas-region-
un maas-region-
un python-django-maas <none> <none> (no description available)
un python-maas-client <none> <none> (no description available)
un python-
ii python3-django-maas 2.1.3+bzr5573-
ii python3-maas-client 2.1.3+bzr5573-
ii python3-
Related branches
- Andres Rodriguez (community): Approve
-
Diff: 442 lines (+303/-9)5 files modifiedsrc/maasserver/api/interfaces.py (+37/-2)
src/maasserver/api/tests/test_interfaces.py (+224/-0)
src/maasserver/fields.py (+11/-2)
src/maasserver/forms_interface_link.py (+29/-4)
src/maasserver/tests/test_forms_interface_link.py (+2/-1)
- Mike Pontillo (community): Approve
-
Diff: 442 lines (+303/-9)5 files modifiedsrc/maasserver/api/interfaces.py (+37/-2)
src/maasserver/api/tests/test_interfaces.py (+224/-0)
src/maasserver/fields.py (+11/-2)
src/maasserver/forms_interface_link.py (+29/-4)
src/maasserver/tests/test_forms_interface_link.py (+2/-1)
Changed in maas: | |
status: | New → Triaged |
importance: | Undecided → High |
assignee: | nobody → Mike Pontillo (mpontillo) |
Changed in maas: | |
status: | Triaged → Fix Committed |
tags: | added: cdo-qa-blocker |
Changed in maas: | |
status: | Fix Committed → Fix Released |
Can you clarify the expected behavior? (You want to see no LINK_UP, which implies no VLAN either?) Have you tried explicitly removing the VLAN?