Possible to re-assign same static IP address
Bug #1338452 reported by
Julian Edwards
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
lp://staging/~julian-edwards/maas/dup-static-ip-bug-1338452
- Raphaël Badin (community): Approve
-
Diff: 41 lines (+19/-1)2 files modifiedsrc/maasserver/models/staticipaddress.py (+9/-1)
src/maasserver/models/tests/test_staticipaddress.py (+10/-0)
lp://staging/~rvb/maas/ipfield
- Gavin Panella (community): Approve
-
Diff: 694 lines (+445/-29)8 files modifiedsrc/maasserver/fields.py (+27/-0)
src/maasserver/migrations/0088_ip_to_custom_field.py (+377/-0)
src/maasserver/models/dhcplease.py (+5/-3)
src/maasserver/models/network.py (+3/-3)
src/maasserver/models/nodegroupinterface.py (+11/-11)
src/maasserver/models/staticipaddress.py (+3/-12)
src/maasserver/tests/models.py (+6/-0)
src/maasserver/tests/test_fields.py (+13/-0)
Changed in maas: | |
status: | New → Triaged |
importance: | Undecided → Critical |
milestone: | none → 1.6.0 |
Changed in maas: | |
status: | Triaged → Fix Committed |
Changed in maas: | |
assignee: | nobody → Julian Edwards (julian-edwards) |
Changed in maas: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
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.