Creation of DNSRecord marks an IP address as "User reserved" leading to impossibility to use this IP later

Bug #1896197 reported by Vladimir Grevtsev
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
Expired
Undecided
Unassigned

Bug Description

tl;dr I want to pre-create the hostname for my service which is going to be deployed later with Juju; but it's IP address is marked as "User reserved" in MAAS - so this addr will never be picked up by Juju.

$ maas admin dnsresources create name='ns1-devci' domain='maas' ip_addresses='172.27.86.220'
Success.
Machine-readable output follows:
{
    "address_ttl": null,
    "id": 12,
    "fqdn": "ns1-devci.maas",
    "ip_addresses": [
        {
            "created": "2020-09-18T08:06:31.199",
            "ip": "172.27.86.220",
            "alloc_type": 4,
            "subnet": {
                "name": "external",
                "description": "",
                "vlan": {
                    "vid": 2,
                    "mtu": 1500,
                    "dhcp_on": false,
                    "external_dhcp": null,
                    "relay_vlan": null,
                    "id": 5002,
                    "space": "external-space",
                    "primary_rack": null,
                    "secondary_rack": null,
                    "fabric": "default",
                    "fabric_id": 4,
                    "name": "untagged",
                    "resource_uri": "/MAAS/api/2.0/vlans/5002/"
                },
                "cidr": "172.27.86.0/23",
                "rdns_mode": 2,
                "gateway_ip": "172.27.87.254",
                "dns_servers": [],
                "allow_dns": true,
                "allow_proxy": true,
                "active_discovery": false,
                "managed": true,
                "id": 5,
                "space": "external-space",
                "resource_uri": "/MAAS/api/2.0/subnets/5/"
            },
            "interface_set": [],
            "alloc_type_name": "User reserved",
            "owner": {
                "is_superuser": true,
                "username": "admin",
                "email": "root@localhost",
                "is_local": true,
                "resource_uri": "/MAAS/api/2.0/users/admin/"
            },
            "resource_uri": "/MAAS/api/2.0/ipaddresses/"
        }
    ],
    "resource_records": [],
    "resource_uri": "/MAAS/api/2.0/dnsresources/12/"
}

Moreover, it will not be unblocked even after I will delete the RR above.

tl;dr I want to pre-create the hostname for my service which is going to be deployed later with Juju; but it's IP address is marked as "User reserved" in MAAS - so this addr will never be picked up by Juju.

$ maas admin dnsresources create name='ns1-devci' domain='maas' ip_addresses='172.27.86.220'
Success.
Machine-readable output follows:
{
    "address_ttl": null,
    "id": 12,
    "fqdn": "ns1-devci.maas",
    "ip_addresses": [
        {
            "created": "2020-09-18T08:06:31.199",
            "ip": "172.27.86.220",
            "alloc_type": 4,
            "subnet": {
                "name": "external",
                "description": "",
                "vlan": {
                    "vid": 2,
                    "mtu": 1500,
                    "dhcp_on": false,
                    "external_dhcp": null,
                    "relay_vlan": null,
                    "id": 5002,
                    "space": "external-space",
                    "primary_rack": null,
                    "secondary_rack": null,
                    "fabric": "default",
                    "fabric_id": 4,
                    "name": "untagged",
                    "resource_uri": "/MAAS/api/2.0/vlans/5002/"
                },
                "cidr": "172.27.86.0/23",
                "rdns_mode": 2,
                "gateway_ip": "172.27.87.254",
                "dns_servers": [],
                "allow_dns": true,
                "allow_proxy": true,
                "active_discovery": false,
                "managed": true,
                "id": 5,
                "space": "external-space",
                "resource_uri": "/MAAS/api/2.0/subnets/5/"
            },
            "interface_set": [],
            "alloc_type_name": "User reserved",
            "owner": {
                "is_superuser": true,
                "username": "admin",
                "email": "root@localhost",
                "is_local": true,
                "resource_uri": "/MAAS/api/2.0/users/admin/"
            },
            "resource_uri": "/MAAS/api/2.0/ipaddresses/"
        }
    ],
    "resource_records": [],
    "resource_uri": "/MAAS/api/2.0/dnsresources/12/"
}

Moreover, it will not be unblocked even after I will delete the RR above.

MAAS 2.8.2 (8577-g.a3e674063-0ubuntu1~18.04.1)

Revision history for this message
Vladimir Grevtsev (vlgrevtsev) wrote :
Revision history for this message
Alberto Donato (ack) wrote :

Since the IP is reserved in MAAS, it's not deleted automatically after removing the DNS record.

You can release it with:

maas admin ipaddresses release ip=172.27.86.220

Currently, you can't use reserved address to assign it to a machine. Reserving them is mostly meant as a way to ensure MAAS doesn't hand those out.

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