Unable to remove DNS records where name is in the format <name>.<domain>

Bug #1814164 reported by Ryan
24
This bug affects 5 people
Affects Status Importance Assigned to Milestone
MAAS
Expired
Undecided
Unassigned

Bug Description

I have a domain: "pdl-openstack" and instantiated an A record named "cinder.pdl-openstack" (as opposed to being named "cinder").

Attempting to delete this record fails with the following error: https://pastebin.com/JRFmBULG

This also prevents deletion of the domain as it has existing records.

Tags: dns
Ryan (rr-pdl)
description: updated
Changed in maas:
milestone: none → 2.5.2
importance: Undecided → Medium
status: New → Triaged
importance: Medium → High
Changed in maas:
milestone: 2.5.2 → 2.5.3
Changed in maas:
milestone: 2.5.3 → 2.5.4
zw.paper (zw-paper)
Changed in maas:
status: Triaged → Confirmed
Changed in maas:
milestone: 2.5.4 → 2.6.0rc1
Changed in maas:
assignee: nobody → Newell Jensen (newell-jensen)
Revision history for this message
Newell Jensen (newell-jensen) wrote :

Ryan,

I have not been able to reproduce this. I am able to add a domain named "pdl-openstack" and then after that I am able to add a resource record of type A with a name of "cinder.pdl-openstack" and I am able to delete it and then the domain subsequently without any issues. I am trying this in MAAS 2.6. What version of MAAS are you seeing this in?

Revision history for this message
Newell Jensen (newell-jensen) wrote :

I am also able to the above steps via the API and I don't have any issues. Marking invalid until more steps are given.

# maas admin domains create name=pdl-openstack
Success.
Machine-readable output follows:
{
    "authoritative": true,
    "ttl": null,
    "resource_record_count": 0,
    "name": "pdl-openstack",
    "is_default": false,
    "id": 14,
    "resource_uri": "/MAAS/api/2.0/domains/14/"
}

# maas admin dnsresource-records create domain=pdl-openstack name=cinder.pdl-openstack rrtype=TXT rrdata=10.0.0.14
Success.
Machine-readable output follows:
{
    "ttl": null,
    "rrtype": "TXT",
    "rrdata": "10.0.0.14",
    "id": 1,
    "fqdn": "cinder.pdl-openstack.pdl-openstack",
    "resource_uri": "/MAAS/api/2.0/dnsresourcerecords/1/"
}

# maas admin dnsresources read
Success.
Machine-readable output follows:
[
    {
        "address_ttl": null,
        "id": 30,
        "resource_records": [
            {
                "ttl": null,
                "rrtype": "TXT",
                "rrdata": "10.0.0.14",
                "id": 1,
                "fqdn": "cinder.pdl-openstack.pdl-openstack",
                "resource_uri": "/MAAS/api/2.0/dnsresourcerecords/1/"
            }
        ],
        "ip_addresses": [],
        "fqdn": "cinder.pdl-openstack.pdl-openstack",
        "resource_uri": "/MAAS/api/2.0/dnsresources/30/"
    }
]

# maas admin dnsresource delete 30
Success.
Machine-readable output follows:

# maas admin domain delete 14
Success.
Machine-readable output follows:

Changed in maas:
status: Confirmed → Incomplete
Changed in maas:
milestone: 2.6.0rc1 → 2.6.0rc2
Changed in maas:
milestone: 2.6.0rc2 → 2.7.0alpha1
Changed in maas:
milestone: 2.7.0b1 → 2.7.0b2
Changed in maas:
milestone: 2.7.0b2 → none
Changed in maas:
importance: High → Undecided
assignee: Newell Jensen (newell-jensen) → nobody
status: Incomplete → New
status: New → Incomplete
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?

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for MAAS because there has been no activity for 60 days.]

Changed in maas:
status: Incomplete → Expired
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.