[2.0b5,1.9] DNS record added for non-boot interface IP when no address of that family exists on the boot interface

Bug #1584850 reported by Andreas Hasenack on 2016-05-23
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
Critical
LaMont Jones
1.9
Critical
LaMont Jones

Bug Description

MAAS Version 1.9.1+bzr4543-0ubuntu2 (trusty1)

We got a situation where IPv6 was being used in a MAAS 1.9 subnet and the node failed to get a FQDN for its hostname.

Specifically, the call that failed was pyton's socket.gethostbyaddr(<hostname>), which is used by socket.getfqdn():

ubuntu@rectangular-structure:~$ python -c "import socket; print socket.gethostname()"
rectangular-structure

ubuntu@rectangular-structure:~$ python -c "import socket; print socket.gethostbyaddr(socket.gethostname())"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
socket.herror: [Errno 1] Unknown host
ubuntu@rectangular-structure:~$

A DNS traffic capture showed this:
146 2.859261 192.168.120.8 -> 198.18.173.40 DNS 88 Standard query 0x0e2a AAAA rectangular-structure.maas
147 2.859422 198.18.173.40 -> 192.168.120.8 DNS 146 Standard query response 0x0e2a AAAA rectangular-structure.maas AAAA 2001:4878:c1e0:603a:225:90ff:fe30:4b6c NS maas A 198.18.173.40
149 2.859831 192.168.120.8 -> 198.18.173.40 DNS 134 Standard query 0xd332 PTR c.6.b.4.0.3.e.f.f.f.0.9.5.2.2.0.a.3.0.6.0.e.1.c.8.7.8.4.1.0.0.2.ip6.arpa
150 2.860065 198.18.173.40 -> 192.168.120.8 DNS 196 Standard query response 0xd332 No such name PTR c.6.b.4.0.3.e.f.f.f.0.9.5.2.2.0.a.3.0.6.0.e.1.c.8.7.8.4.1.0.0.2.ip6.arpa SOA use1.akamai.com

We can see that the PTR for the IPv6 address does not exist. Looking at /etc/bind in the MAAS node, that's confirmed:
$ grep rectangular -r etc/
etc/bind/maas/zone.168.192.in-addr.arpa:8.120.168.192.in-addr.arpa. IN PTR rectangular-structure.maas.
etc/bind/maas/zone.maas:rectangular-structure IN A 192.168.120.8
etc/bind/maas/zone.maas:rectangular-structure IN AAAA 2001:4878:c1e0:603a:225:90ff:fe30:4b6c

I found it curious that MAAS would have the AAAA record, but not the corresponding PTR one, so I decided to file this bug about it.

Related branches

Andreas Hasenack (ahasenack) wrote :
tags: removed: kanban-cross-team
Andreas Hasenack (ahasenack) wrote :

rectangular-structure node

description: updated
LaMont Jones (lamont) on 2016-05-23
Changed in maas:
assignee: nobody → LaMont Jones (lamont)
LaMont Jones (lamont) wrote :

get_hostname_ip_mapping() treats ipv4 and ipv6 as completely separate things, when it tries to answer the question "what is the best IP address for this node?" This allows a discovered (and lonely) ipv6 address on a non-pxeboot interface to show up as a AAAA RR for a machine, while the A RR is AUTO or reserved or sticky.

My first thinking on this is that the two sets of records should be locked to either the same interface, or at least to the same preference order (don't provide a discovered IPv4/6 IP if there's one from DHCP of the other kind, for example.) But I want to think about it more and kick it about a little first.

summary: - Missing PTR record for IPv6 address
+ [2.0b5,1.9] DNS record created against IPv6 address when it is not on
+ the PXE interface
summary: - [2.0b5,1.9] DNS record created against IPv6 address when it is not on
- the PXE interface
+ [1.9] DNS record created against IPv6 address when it is not on the PXE
+ interface
Changed in maas:
milestone: none → 1.9.4
LaMont Jones (lamont) on 2016-05-25
summary: - [1.9] DNS record created against IPv6 address when it is not on the PXE
- interface
+ [2.0b5,1.9] DNS record added for non-boot interface when no address of
+ that family exists on the boot interface
summary: - [2.0b5,1.9] DNS record added for non-boot interface when no address of
- that family exists on the boot interface
+ [2.0b5,1.9] DNS record added for non-boot interface IP when no address
+ of that family exists on the boot interface
no longer affects: maas/2.0
Changed in maas:
milestone: 1.9.4 → 2.0.0
status: New → In Progress
importance: Undecided → Critical
Changed in maas:
status: In Progress → Fix Committed
Changed in maas:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers