Updating subnet name removes dns_server

Bug #1521833 reported by Lee Trager
6
This bug affects 1 person
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='192.168.1.1,8.8.8.8'
Success.
Machine-readable output follows:
{
    "dns_servers": [
        "192.168.1.1",
        "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,
        "resource_uri": "/MAAS/api/1.0/vlans/0/"
    },
    "gateway_ip": "10.0.0.1",
    "cidr": "10.0.0.0/24",
    "id": 1,
    "resource_uri": "/MAAS/api/1.0/subnets/1/"
}
$ 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,
        "resource_uri": "/MAAS/api/1.0/vlans/0/"
    },
    "gateway_ip": "10.0.0.1",
    "cidr": "10.0.0.0/24",
    "id": 1,
    "resource_uri": "/MAAS/api/1.0/subnets/1/"
}

Related branches

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

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.

Changed in maas:
milestone: none → next
Changed in maas:
status: Triaged → Fix Committed
Changed in maas:
status: Fix Committed → Fix Released
milestone: next → none
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.