Updating subnet name removes dns_server

Bug #1521833 reported by Lee Trager on 2015-12-02
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
Medium
Unassigned
1.9
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

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  Edit
Everyone can see this information.

Other bug subscribers