Merge lp:~jtv/maas/resolve-mac-from-leases into lp:~maas-committers/maas/trunk
Proposed by
Jeroen T. Vermeulen
Status: | Rejected |
---|---|
Rejected by: | Andres Rodriguez |
Proposed branch: | lp:~jtv/maas/resolve-mac-from-leases |
Merge into: | lp:~maas-committers/maas/trunk |
Diff against target: |
368 lines (+190/-38) 6 files modified
src/provisioningserver/dhcp/leases.py (+32/-3) src/provisioningserver/dhcp/leases_parser.py (+14/-2) src/provisioningserver/dhcp/tests/test_leases.py (+61/-1) src/provisioningserver/dhcp/tests/test_leases_parser.py (+1/-1) src/provisioningserver/tasks.py (+32/-14) src/provisioningserver/tests/test_tasks.py (+50/-17) |
To merge this branch: | bzr merge lp:~jtv/maas/resolve-mac-from-leases |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
MAAS Maintainers | Pending | ||
Review via email: mp+217914@code.launchpad.net |
Commit message
Try harder to resolve a node's power IP address. Look not just at the ARP cache but the given IP address (if any) and parsed DHCP leases as well. This should enable cold boots of AMT nodes on MAAS-managed networks.
Description of the change
This should fix the problem where we can't power up nodes whose power addresses are not in the ARP cache — provided that the MAC got a DHCP lease from the cluster controller.
Jeroen
To post a comment you must log in.
Fwiw, I think the code is good.
However, I worry that it's going to be looking at a snapshot of leases that might be several minutes old, so we might still want a more immediate solution, e.g. nmap.
Also, we only ever ought to have one lease for a MAC address. This code is complicated because it has to consider multiple MAC addresses, but I'm not sure that's necessary or desirable. IMO, it should try the ARP cache then fall back to checking leases.
(This is somewhat related to something that has come up in review for lp:~allenap/maas/dhcp-leases-parsing. The new parser discards all but the last lease for each IP address then discards that if it has expired. The existing parser does the same operations but in reverse order: it discards all expired leases before choosing the most recent of those remaining. I'm still not 100% sure what the right behaviour should be, but I'm leaning towards the former.)