Comment 13 for bug 1367482

Revision history for this message
Raphaƫl Badin (rvb) wrote : Re: 1.7: maas handed out incorrect address

Next time this happens, it would be great to get the content of the DHCPLease and the StaticIPAddress tables.

A node's IP addresses are: the static addresses allocated to it if it has some (StaticIPAddress: static IP allocated during deployment), the dynamic IP addresses otherwise (DHCPLease: dynamic IP gathered from the leases file).

Here is how to collect that info:

$ sudo maas-region-admin shell

>>> from maasserver.models.staticipaddress import StaticIPAddress
>>> from maasserver.models.dhcplease import DHCPLease
>>> from maasserver.models.nodegroup import NodeGroup

>>> ng = NodeGroup.objects.all()[0]
>>> DHCPLease.objects.get_hostname_ip_mapping(ng)
>>> StaticIPAddress.objects.get_hostname_ip_mapping(ng)

This will help us diagnose the problem: it will allow us to make sure a static address was assigned to the node.