[2.4] After a fresh MAAS install MAAS cannot create domains nor update records

Bug #1807777 reported by Andres Rodriguez
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
Expired
Critical
Unassigned

Bug Description

After installing a fresh 2.4 version of MAAS, it wouldn't be updating anything to DNS and likely anything else at all.

Error
-----
1. Installed maas and checked the zones:

root@maas-bionic:/etc/bind/maas# ll
total 28
drwxr-xr-x 2 maas root 4096 Dec 10 22:57 ./
drwxr-sr-x 3 root bind 4096 Dec 10 22:56 ../
-rw-r--r-- 1 maas maas 305 Dec 10 22:57 named.conf.maas
-rw-r--r-- 1 maas maas 110 Dec 10 22:57 named.conf.options.inside.maas
-rw-r----- 1 maas bind 257 Dec 10 22:56 named.conf.rndc.maas
-rw------- 1 maas root 539 Dec 10 22:56 rndc.conf.maas
-rw-r--r-- 1 maas maas 304 Dec 10 22:57 zone.maas

2. Then created a domain named 'first':

root@maas-bionic:/etc/bind/maas# maas admin domains create name=first
Success.
Machine-readable output follows:
{
    "authoritative": true,
    "ttl": null,
    "is_default": false,
    "resource_record_count": 0,
    "id": 3,
    "name": "first",
    "resource_uri": "/MAAS/api/2.0/domains/3/"
}

NOTE: After creating the domain there was *NO* error log, only thing in regiond.log was:

2018-12-10 23:00:29 regiond: [info] 127.0.0.1 POST /MAAS/api/2.0/domains/ HTTP/1.1 --> 200 OK (referrer: -; agent: Python-httplib2/0.9.2 (gzip))

3. Checked if the zone file was created, and it wasnt:

root@maas-bionic:/etc/bind/maas# ll
total 28
drwxr-xr-x 2 maas root 4096 Dec 10 22:57 ./
drwxr-sr-x 3 root bind 4096 Dec 10 22:56 ../
-rw-r--r-- 1 maas maas 305 Dec 10 22:57 named.conf.maas
-rw-r--r-- 1 maas maas 110 Dec 10 22:57 named.conf.options.inside.maas
-rw-r----- 1 maas bind 257 Dec 10 22:56 named.conf.rndc.maas
-rw------- 1 maas root 539 Dec 10 22:56 rndc.conf.maas
-rw-r--r-- 1 maas maas 304 Dec 10 22:57 zone.maas

4. Created a device, and see if it would be added to the default zone, which the machine wasn't added:

root@maas-bionic:/etc/bind/maas# sysid=$(maas admin devices create mac_addresses=aa:bb:cc:dd:ee:f1 hostname=device01 | jq '.system_id' | cut -d"\"" -f2)
root@maas-bionic:/etc/bind/maas# ifaceid=$(maas admin interfaces read "$sysid" | grep "\"id" | cut -d":" -f2 | cut -d"," -f1)
root@maas-bionic:/etc/bind/maas# maas admin interface link-subnet $sysid $ifaceid subnet=192.168.122.0/24 mode=STATIC > /dev/null
root@maas-bionic:/etc/bind/maas# grep -sr device01 *

NOTE: When doing the above, the error log I saw was:

2018-12-10 23:06:51 maasserver.models.signals.interfaces: [info] eth0 (physical) on device01: deleted IP addresses due to VLAN update (None -> 5001).

Restarting maas-regiond
------------------------

4. I restarted maas-regiond and now the zone file was there:

root@maas-bionic:/etc/bind/maas# sudo service maas-regiond restart
root@maas-bionic:/etc/bind/maas# ll
total 44
drwxr-xr-x 2 maas root 4096 Dec 10 23:08 ./
drwxr-sr-x 3 root bind 4096 Dec 10 22:56 ../
-rw-r--r-- 1 maas maas 719 Dec 10 23:08 named.conf.maas
-rw-r--r-- 1 maas maas 110 Dec 10 23:08 named.conf.options.inside.maas
-rw-r----- 1 maas bind 257 Dec 10 22:56 named.conf.rndc.maas
-rw------- 1 maas root 539 Dec 10 22:56 rndc.conf.maas
-rw-r--r-- 1 maas maas 339 Dec 10 23:08 zone.122.168.192.in-addr.arpa
-rw-r--r-- 1 maas maas 317 Dec 10 23:08 zone.123.168.192.in-addr.arpa
-rw-r--r-- 1 maas maas 281 Dec 10 23:08 zone.first
-rw-r--r-- 1 maas maas 412 Dec 10 23:08 zone.maas

5. Checked if the previously created device was there, and it was:

root@maas-bionic:/etc/bind/maas# grep -sr device01 *
zone.122.168.192.in-addr.arpa:189 30 IN PTR device01.maas.
zone.maas:device01 30 IN A 192.168.122.189

6. Added a new domain, and this time it was added correctly

root@maas-bionic:/etc/bind/maas# ll
total 44
drwxr-xr-x 2 maas root 4096 Dec 10 23:08 ./
drwxr-sr-x 3 root bind 4096 Dec 10 22:56 ../
-rw-r--r-- 1 maas maas 719 Dec 10 23:08 named.conf.maas
-rw-r--r-- 1 maas maas 110 Dec 10 23:08 named.conf.options.inside.maas
-rw-r----- 1 maas bind 257 Dec 10 22:56 named.conf.rndc.maas
-rw------- 1 maas root 539 Dec 10 22:56 rndc.conf.maas
-rw-r--r-- 1 maas maas 339 Dec 10 23:08 zone.122.168.192.in-addr.arpa
-rw-r--r-- 1 maas maas 317 Dec 10 23:08 zone.123.168.192.in-addr.arpa
-rw-r--r-- 1 maas maas 281 Dec 10 23:08 zone.first
-rw-r--r-- 1 maas maas 412 Dec 10 23:08 zone.maas
-rw-r--r-- 1 maas maas 282 Dec 10 23:08 zone.second

7. Added a new device, and the device was there:

root@maas-bionic:/etc/bind/maas# sysid=$(maas admin devices create mac_addresses=aa:bb:cc:dd:ee:f2 hostname=device02 | jq '.system_id' | cut -d"\"" -f2)
root@maas-bionic:/etc/bind/maas# ifaceid=$(maas admin interfaces read "$sysid" | grep "\"id" | cut -d":" -f2 | cut -d"," -f1)
root@maas-bionic:/etc/bind/maas# maas admin interface link-subnet $sysid $ifaceid subnet=192.168.122.0/24 mode=STATIC > /dev/null
root@maas-bionic:/etc/bind/maas# grep -sr device02 *
zone.122.168.192.in-addr.arpa:190 30 IN PTR device02.maas.
zone.maas:device02 30 IN A 192.168.122.190

So it seems that there's an error with MAAS in that it is either not dealing with triggers correctly, or it is ignoring the triggers or the code that handles the triggers is not running.

Revision history for this message
Andres Rodriguez (andreserl) wrote :

The work around to solve this issue is to restart maas-regiond.

Changed in maas:
importance: Undecided → Critical
status: New → Triaged
status: Triaged → Confirmed
milestone: none → 2.5.1
summary: - [2.4] After a fresh MAAS install MAAS cannot create
+ [2.4] After a fresh MAAS install MAAS cannot create domains nor update
+ records
Revision history for this message
Andres Rodriguez (andreserl) wrote :

I've tested 2.5 and it seems unaffected.

Changed in maas:
status: Confirmed → Incomplete
Changed in maas:
milestone: 2.5.1 → 2.5.2
Changed in maas:
milestone: 2.5.2 → 2.5.3
no longer affects: maas/2.4
Changed in maas:
milestone: 2.5.3 → 2.5.4
Changed in maas:
milestone: 2.5.4 → none
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.