Updating subnet name removes dns_server
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MAAS |
Fix Released
|
Medium
|
Unassigned | ||
1.9 |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
I noticed that setting the name removes the first DNS server if more than one are listed
$ maas maas subnet update 1 dns_servers=
Success.
Machine-readable output follows:
{
"dns_servers": [
"8.8.8.8"
],
"name": "10.0.0.0/24",
"space": "space-0",
"vlan": {
"name": "untagged",
"vid": 0,
"mtu": 1500,
"fabric": "fabric-0",
"id": 0,
},
"gateway_ip": "10.0.0.1",
"cidr": "10.0.0.0/24",
"id": 1,
"resource_uri": "/MAAS/
}
$ maas maas subnet update 1 name='10.0.0.0/24'
Success.
Machine-readable output follows:
{
"dns_servers": [
"8.8.8.8"
],
"name": "10.0.0.0/24",
"space": "space-0",
"vlan": {
"name": "untagged",
"vid": 0,
"mtu": 1500,
"fabric": "fabric-0",
"id": 0,
},
"gateway_ip": "10.0.0.1",
"cidr": "10.0.0.0/24",
"id": 1,
"resource_uri": "/MAAS/
}
Related branches
- Blake Rouse (community): Approve
-
Diff: 38 lines (+17/-0)2 files modifiedsrc/maasserver/forms_subnet.py (+4/-0)
src/maasserver/tests/test_forms_subnet.py (+13/-0)
- Lee Trager (community): Approve
-
Diff: 38 lines (+17/-0)2 files modifiedsrc/maasserver/forms_subnet.py (+4/-0)
src/maasserver/tests/test_forms_subnet.py (+13/-0)
Changed in maas: | |
milestone: | none → next |
Changed in maas: | |
status: | Triaged → Fix Committed |
Changed in maas: | |
status: | Fix Committed → Fix Released |
milestone: | next → none |
I dug in a little bit and it seems like when the SubnetForm asks the parent form to get its cleaned data the parent form is only returning one entry. I have no idea why its doing that.