[2.5] dnssresources read outputs nothing when there are machines with assigned IP's and records in the zone file

Bug #1791364 reported by Andres Rodriguez
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
Triaged
High
Unassigned

Bug Description

I have a MAAS were there are multiple resource records for both, machines and controllers. These are listed in the UI just fine, however they are not exposed over the API (see screenshots for comparison).

ubuntu@maas00:~$ maas user1@ldap dnsresources read
Success.
Machine-readable output follows:
[]
ubuntu@maas00:~$ maas user1@ldap dnsresource-records read
Success.
Machine-readable output follows:
[]

ubuntu@maas00:~$ maas user1@ldap domains read
Success.
Machine-readable output follows:
[
    {
        "authoritative": true,
        "ttl": null,
        "is_default": true,
        "resource_record_count": 0,
        "name": "maas",
        "id": 0,
        "resource_uri": "/MAAS/api/2.0/domains/0/"
    },
    {
        "authoritative": true,
        "ttl": null,
        "is_default": false,
        "resource_record_count": 0,
        "name": "maaslab",
        "id": 1,
        "resource_uri": "/MAAS/api/2.0/domains/1/"
    },
    {
        "authoritative": false,
        "ttl": null,
        "is_default": false,
        "resource_record_count": 0,
        "name": "foo.com",
        "id": 2,
        "resource_uri": "/MAAS/api/2.0/domains/2/"
    },
    {
        "authoritative": false,
        "ttl": null,
        "is_default": false,
        "resource_record_count": 0,
        "name": "gate.local",
        "id": 3,
        "resource_uri": "/MAAS/api/2.0/domains/3/"
    }
]

ubuntu@maas00:/etc/bind/maas$ grep -sr node01 *
zone.90.90.10.in-addr.arpa:3 30 IN PTR node01.maaslab.
zone.maaslab:node01 30 IN A 10.90.90.3
ubuntu@maas00:/etc/bind/maas$ grep -sr node02 *
zone.90.90.10.in-addr.arpa:4 30 IN PTR node02.maaslab.
zone.maaslab:node02 30 IN A 10.90.90.4

Revision history for this message
Andres Rodriguez (andreserl) wrote :
Revision history for this message
Andres Rodriguez (andreserl) wrote :
Revision history for this message
Andres Rodriguez (andreserl) wrote :
Changed in maas:
importance: Undecided → High
status: New → Triaged
milestone: none → 2.5.0beta2
description: updated
summary: - [2.5] dnssresources read outputs nothing
+ [2.5] dnssresources read outputs nothing when there are machines with
+ assigned IP's and records in the zone file
description: updated
Revision history for this message
Mike Pontillo (mpontillo) wrote :

This is because the UI also presents synthetic records that are not actually in the database and cannot be changed by the user.

A change was recently landed that allows those to be seen in "dnsresources read" if the "all=true" parameter is specified. Unfortunately, it seems a separate bug may be preventing the implicit resources from being presented - if no non-implicit records exist. So you still might not see anything even if you run that.

We could investigate what it would take to make *real* DNS records instead of implicit ones, but it could be a very significant change - possibly not sufficiently small in scope to be a bug fix.

Revision history for this message
Mike Pontillo (mpontillo) wrote :

Another note: the UI (and `maas <profile> dnsresources read all=true`) doesn't show all the records in the zone file, either. You can look at the zone file itself to see what was generated, or do something like this on the MAAS server:

    dig @127.0.0.1 axfr maas.

(Where `maas.` is the name of the domain you're interested in.)

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.