Merge lp://staging/~mpontillo/maas/ip-allocation-bugs-1.9 into lp://staging/maas/1.9

Proposed by Mike Pontillo
Status: Merged
Approved by: Mike Pontillo
Approved revision: no longer in the source branch.
Merged at revision: 4520
Proposed branch: lp://staging/~mpontillo/maas/ip-allocation-bugs-1.9
Merge into: lp://staging/maas/1.9
Diff against target: 935 lines (+533/-60)
13 files modified
.idea/encodings.xml (+3/-1)
.idea/vcs.xml (+0/-6)
src/maasserver/api/devices.py (+17/-7)
src/maasserver/api/tests/test_devices.py (+125/-11)
src/maasserver/models/interface.py (+96/-18)
src/maasserver/models/node.py (+5/-1)
src/maasserver/models/nodegroupinterface.py (+37/-3)
src/maasserver/models/staticipaddress.py (+9/-4)
src/maasserver/models/subnet.py (+8/-1)
src/maasserver/models/tests/test_interface.py (+114/-4)
src/maasserver/models/tests/test_nodegroupinterface.py (+35/-0)
src/maasserver/testing/factory.py (+14/-4)
utilities/remote-reinstall (+70/-0)
To merge this branch: bzr merge lp://staging/~mpontillo/maas/ip-allocation-bugs-1.9
Reviewer Review Type Date Requested Status
Blake Rouse (community) Approve
Review via email: mp+278925@code.staging.launchpad.net

Commit message

Clean up the claiming of AUTO IP addresses.

 * In the case of an UNMANAGED subnet which could not be linked to its NodeGroupInterface at migration time (for example, due to the lack of having a subnet mask), add a query to check if any NodeGroupInterface has static or dynamic ranges within the subnet we are about to allocate for.
 * Throw an error if a NodeGroupInterface being deployed with an AUTO IP address has a dynamic range without a static range. (this means the user needs to define a static range, or select a different IP allocation method.) Note that subnets can still be fully MAAS-managed if no dynamic range is defined.
 * Throw an error if the linked Subnet for an AUTO IP address cannot be found. (this should not happen, but if it does, we want a nicer error.)
 * Run the algorithm to determine ancillary IP addresses on a subnet before handing out an AUTO IP address on a managed or unmanaged subnet. (this fixes the issue where a known router address will be used on a fully unmanaged network)
 * Add logging in maas.log for when an AUTO IP address is allocated.
 * Fix typo in function name (dyanamic -> dynamic)
 * Add a utility script (remote-reinstall) to easily overwrite an installed version of MAAS on a remote host with a development version of MAAS. Requires SSH access to the root account on that host. (This greatly speeds development when iterative manual testing is required.)

To post a comment you must log in.
Revision history for this message
Mike Pontillo (mpontillo) wrote :

I'm going to put this up for review feedback even though I haven't done the unit tests, because I've spent most of the afternoon manually testing and iterating on this.

This will have unit tests before I land it.

Revision history for this message
Mike Pontillo (mpontillo) wrote :

Also, I plan to test and review this on 1.9 first. But I will merge and land this on trunk before landing this on 1.9.

Revision history for this message
Blake Rouse (blake-rouse) wrote :

Looks good. Just a few comments that need looking at. Please change the WebUI adjustment before landing.

Also make sure that you land this in trunk as well. We need to be very sure that every branch we land in 1.9 without going through trunk first also lands in trunk. Without it, it means a regression in the next release of MAAS. I would prefer to see this land in trunk first.

review: Approve
Revision history for this message
Blake Rouse (blake-rouse) wrote :

Ah just hit me right after I set it to approved. You have not added any tests, so this needs to have unit tests before this can land. Silly me.

review: Needs Fixing
Revision history for this message
Mike Pontillo (mpontillo) wrote :

Thanks for the review. Yeah, I'll get those tests in so this can land. (but first I want to finish triaging that juju issue)

Revision history for this message
Mike Pontillo (mpontillo) wrote :

Blake, I've added some unit tests. I think this is ready for another look. Thanks!

Revision history for this message
Blake Rouse (blake-rouse) wrote :

Looks good. Don't forget to land this in trunk as well.

review: Approve
Revision history for this message
Mike Pontillo (mpontillo) wrote :

It looks like the juju bug may need further triage work; I'm going to land this now so I can base any additional fixes on top of this.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches