Merge lp:~mpontillo/maas/fix-1486505 into lp:~maas-committers/maas/trunk

Proposed by Mike Pontillo
Status: Merged
Approved by: Mike Pontillo
Approved revision: no longer in the source branch.
Merged at revision: 4208
Proposed branch: lp:~mpontillo/maas/fix-1486505
Merge into: lp:~maas-committers/maas/trunk
Diff against target: 12 lines (+1/-1)
1 file modified
src/maasserver/models/interface.py (+1/-1)
To merge this branch: bzr merge lp:~mpontillo/maas/fix-1486505
Reviewer Review Type Date Requested Status
Andres Rodriguez (community) Approve
Blake Rouse (community) Approve
Review via email: mp+268534@code.launchpad.net

Commit message

Use old model temporarily to fix LP#1486505.

This is a temporary fix for #1486505, to use the old networking model until the new model is fully in-place. This will be obsoleted in the very near future, since the mac.ip_addresses attribute (and backing table) is going away.

Description of the change

Currently being tested by the CI.

Validated locally; this fixes allocation of IP addresses and deployment of nodes for me.

To post a comment you must log in.
Revision history for this message
Blake Rouse (blake-rouse) wrote :

I assume this is only to get 1.9 alpha 1 out the door. I really don't like this, because we should be dropping the old model as quick as possible.

No test needs to be modified? Then this was not test very well.

review: Approve
Revision history for this message
Andres Rodriguez (andreserl) wrote :

Yup, this is only to get alpha1 out the door. I'd like to get something out nowish so people can start testing 1.9.

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

Yes, this is just to get 1.9 out the door. I'm curious why the tests pass too. My current theory is that the tests are looking at the old model data to determine that they passed. (That's why I am removing the old model in the next branch I'll be doing, which forces all those tests to fail.) I've already fixed hundreds of tests in that branch.

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

*1.9alpha1 that is

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/maasserver/models/interface.py'
2--- src/maasserver/models/interface.py 2015-08-18 13:30:00 +0000
3+++ src/maasserver/models/interface.py 2015-08-19 18:59:57 +0000
4@@ -318,7 +318,7 @@
5 interface: None
6 for interface in cluster_interfaces
7 }
8- for sip in self.ip_addresses.all():
9+ for sip in self.mac.ip_addresses.all():
10 interface = find_cluster_interface_responsible_for_ip(
11 cluster_interfaces, IPAddress(sip.ip))
12 if interface is not None: