[2.5] MAAS uses observed IP address that doesn't exist in a controller to configure internal DNS

Bug #1797632 reported by Andres Rodriguez on 2018-10-12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mike Pontillo

Bug Description

MAAS is running in a VM with two interfaces. One of which doesn't have any ip addresses:

root@autopkgtest:/etc/bind/maas# ip addr sh
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: ens3: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
    link/ether 52:54:00:12:34:56 brd ff:ff:ff:ff:ff:ff
3: ens4: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether de:ad:be:ef:6b:b3 brd ff:ff:ff:ff:ff:ff
    inet brd scope global ens4
       valid_lft forever preferred_lft forever
    inet6 fe80::dcad:beff:feef:6bb3/64 scope link
       valid_lft forever preferred_lft forever

However, one IP is added for the internal domain that doesn't exist:

root@autopkgtest:/etc/bind/maas# cat zone.maas-internal
; Zone file modified: 2018-10-12 20:44:32.390833.
$TTL 15
@ IN SOA maas-internal. nobody.example.com. (
              0000000127 ; serial
              600 ; Refresh
              1800 ; Retry
              604800 ; Expire
              15 ; NXTTL

@ 15 IN NS maas.
10-245-136-0--21 15 IN A
10-245-136-0--21 15 IN A

If we look at the db shell, we see:

autopkgtest | 1 | ens3 | physical | 52:54:00:12:34:56 | | DISCOVERED | | 0 | fabric-0
autopkgtest | 2 | ens4 | physical | de:ad:be:ef:6b:b3 | | STICKY | | 0 | fabric-0

********* A ver interesting thing, is that there's another machine in the subnet, with potentially the same hostname ?

Related branches

Andres Rodriguez (andreserl) wrote :
Changed in maas:
milestone: none → 2.5.0rc1
importance: Undecided → Medium
importance: Medium → Critical
status: New → Triaged
Andres Rodriguez (andreserl) wrote :
description: updated
description: updated
Mike Pontillo (mpontillo) wrote :

This is an unusual case. Usually when MAAS has a DHCP IP address for a controller, it's accurate. In this situation, we seem to have a case where a machine with a duplicate MAC (elsewhere in the network, but the same as the controller?) has acquired an IP address. MAAS then associates that DHCP IP address with the controller.

It seems that one possible solution to this issue might be to change the IP address selection algorithm so that if it sees two types of IP addresses in the same subnet for the controller, it should always prefer the non-DHCP address.

The other possible solution is to remove the machine that is requesting the rogue IP address for the controller's MAC. ;-)

Changed in maas:
assignee: nobody → Mike Pontillo (mpontillo)
Changed in maas:
status: Triaged → Fix Committed
Changed in maas:
milestone: 2.5.0rc1 → 2.5.0beta4
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