Two nodes with IP address yet only one CNAME

Bug #1064227 reported by Julian Edwards
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
Fix Released
Critical
Jeroen T. Vermeulen

Bug Description

I added a node that got the address 10.0.0.200 and a CNAME of 10-0-0-200.master. I then added another node which got the address 10.0.0.204 and hence name of 10-0-0-204.master.

The zone file then only contained the CNAME for the new node, the -200 one disappeared.

Related branches

Changed in maas:
status: New → Triaged
importance: Undecided → Critical
Revision history for this message
Raphaël Badin (rvb) wrote :

I tried to recreate the problem in a test but everything seems fine: http://paste.ubuntu.com/1268870/.

I think we need to investigate how the config-writing tasks were dispatched/executed: this will add some useful debugging: http://paste.ubuntu.com/1268873/

Changed in maas:
status: Triaged → Fix Released
status: Fix Released → Fix Committed
Revision history for this message
Francis J. Lacoste (flacoste) wrote :

The problem seems to be related to the -200 address' lease being expired. The cause of this expired lease is still undetermined.

Changed in maas:
status: Fix Committed → Incomplete
Changed in maas:
milestone: none → 12.10
Revision history for this message
Julian Edwards (julian-edwards) wrote :

It is perfectly valid for a lease to expire (while a host is down).

Changed in maas:
status: Incomplete → Triaged
Revision history for this message
Julian Edwards (julian-edwards) wrote :

Also I don't think it had expired when I saw the problem, it only expired after I let rvb ssh into my test box.

Revision history for this message
Julian Edwards (julian-edwards) wrote :

I have some more data. Poking into the leases file shows for one host:

host 10.0.0.200 {
  dynamic;
  hardware ethernet e4:11:5b:13:8f:74;
  fixed-address 10.0.0.200;
}

lease 10.0.0.200 {
  starts 2 2012/10/09 05:19:48;
  ends 2 2012/10/09 09:25:10; # ← this time has passed
  tstp 2 2012/10/09 09:25:10;
  cltt 2 2012/10/09 05:19:48;
  binding state free;
  hardware ethernet e4:11:5b:13:8f:74;
}

IOW, the lease has expired but the DHCPD doesn't care, it happily re-assigns the same IP to that MAC even though the expired lease is kept around. I restarted the DHCPD and this expired lease stays in the leases file.

I think this is because we successfully poked in a host map. I need to re-read what effect this is having in the server.

Revision history for this message
Julian Edwards (julian-edwards) wrote :

I am reasonably convinced that the presence of the host map makes the DHCP server hold the expired lease in the config forever. This is going to confuse the lease parsing code quite badly. The fix is to make it look for host maps and consider whether they exist when deciding that a lease is really expired.

Revision history for this message
Jeroen T. Vermeulen (jtv) wrote :

A "host" block in the leases file looks, for our purposes, just like a "lease" block without an expiry date. Which is effectively what it is to us. That could be very easy to arrange in the parser (though ordering won't be quite as simple as it was) but next we'll want to know what a deleted host entry looks like.

Changed in maas:
assignee: nobody → Jeroen T. Vermeulen (jtv)
status: Triaged → In Progress
Revision history for this message
Jeroen T. Vermeulen (jtv) wrote :

Found it: for a deleted host entry, the last-written "host" block with that address will have the "deleted" statement inside:

host 10.0.0.200 {
    deleted;
}

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  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.