Possible to re-assign same static IP address

Bug #1338452 reported by Julian Edwards
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MAAS
Fix Released
Critical
Julian Edwards

Bug Description

When starting a node, you might get this:

ValidationError: {'ip': [u'Static IP Address with this Ip already exists.']}

A Django bug means < and > operators fail to work on IP because the query is generated with HOST(), which means the operators are used alphabetically rather than with an IP field.

Related branches

Changed in maas:
status: New → Triaged
importance: Undecided → Critical
milestone: none → 1.6.0
Changed in maas:
status: Triaged → Fix Committed
Raphaël Badin (rvb)
Changed in maas:
assignee: nobody → Julian Edwards (julian-edwards)
Revision history for this message
Christian Reis (kiko) wrote :

Was the second patch really worth the effort? I kind of wonder if having a custom field just to deal with the Django bug is not going to hurt us in maintainability in the long run.

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

Yes it was worth it, because it removes a trap for future developers who don't know about the bug and inadvertently do a bad comparison.

It's also trivial to remove the hack once Django's bug is fixed.

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.