Comment 3 for bug 1814164

Revision history for this message
László Bortel (bortel-laszlo) wrote :

This bug also hit us in MAAS version: 2.4.2 (7034-g2f5deb8b8-0ubuntu1).
After upgrading to MAAS version: 2.6.2 (7841-ga10625be3-0ubuntu1~18.04.1) I can still reproduce it in a slightly different scenario. In this scenario the update of dnsresource fails:

$ maas admin domain read 12
Success.
Machine-readable output follows:
{
    "authoritative": true,
    "ttl": null,
    "is_default": false,
    "id": 12,
    "resource_record_count": 0,
    "name": "c",
    "resource_uri": "/MAAS/api/2.0/domains/12/"
}

$ maas admin dnsresources create name="a.b" domain="c" ip_addresses="1.2.3.4"
Success.
Machine-readable output follows:
{
    "address_ttl": null,
    "resource_records": [],
    "ip_addresses": [
        {
            "created": "2020-03-13T17:16:17.007",
            "ip": "1.2.3.4",
            "alloc_type": 4,
            "subnet": null,
            "interface_set": [],
            "alloc_type_name": "User reserved",
            "owner": {
                "is_superuser": true,
                "username": "admin",
                "email": "****@telekom.hu",
                "is_local": true,
                "resource_uri": "/MAAS/api/2.0/users/admin/"
            },
            "resource_uri": "/MAAS/api/2.0/ipaddresses/"
        }
    ],
    "fqdn": "a.b.c",
    "id": 68,
    "resource_uri": "/MAAS/api/2.0/dnsresources/68/"
}

$ maas admin domain read 12
Success.
Machine-readable output follows:
{
    "authoritative": true,
    "ttl": null,
    "is_default": false,
    "id": 12,
    "resource_record_count": 1,
    "name": "c",
    "resource_uri": "/MAAS/api/2.0/domains/12/"
}

$ maas admin dnsresource update 68
{"__all__": ["Invalid dnsresource name: a.b."]}

Update of dnsresource fails, although I change nothing!
Observed this in MAAS version: 2.6.2 (7841-ga10625be3-0ubuntu1~18.04.1)

In fact, deleting the dnsresource succeeds:

$ maas admin dnsresource delete 68
Success.
Machine-readable output follows:

$ maas admin domain read 12
Success.
Machine-readable output follows:
{
    "authoritative": true,
    "ttl": null,
    "name": "c",
    "is_default": false,
    "id": 12,
    "resource_record_count": 0,
    "resource_uri": "/MAAS/api/2.0/domains/12/"
}

Should I open a new bug for the faiing dnsresource update or can you cover it here?