[2.2] DISCOVERED IP addresses uniqueness should not be enfored with respect to other types
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MAAS |
Fix Released
|
High
|
Mike Pontillo |
Bug Description
I'm hijacking this bug report to change it to describe the problem we discussed this morning. ;-)
If an IP address in MAAS of type DISCOVERED falls outside of a dynamic range, that is most likely an indicator that a commissioning node is picking up an address by means of a non-MAAS DHCP server.
If such a rogue DHCP server happens to fall outside of a MAAS dynamic range, that doesn't make it any less rogue. In addition, dynamic ranges can be changed, so it's difficult to ensure that all DISCOVERED addresses will always be inside a dynamic range.
Therefore, the bug to be fixed is the fact that a static IP addresses cannot coexist with a discovered address of the same value. Both are distinct points of data, and DISCOVERED addresses could arguably move to another table, but that would be a significant change (especially for this late in the cycle).
Previous Description
=======
When DHCP is turned on a VLAN, all discovered IP addresses should only fall with in the configured dynamic ranges. If DHCP is turned on (say comming for using an external DHCP), to any of the dynamic ranges change then all DISCOVERED IP addresses should be removed that do not fit in those ranges.
Related branches
- Blake Rouse (community): Approve
-
Diff: 106 lines (+77/-1)3 files modifiedsrc/maasserver/migrations/builtin/maasserver/0121_relax_staticipaddress_unique_constraint.py (+36/-0)
src/maasserver/models/staticipaddress.py (+2/-1)
src/maasserver/models/tests/test_staticipaddress.py (+39/-0)
Changed in maas: | |
milestone: | 2.2.0rc3 → 2.2.0rc4 |
summary: |
- [2.2] DISCOVERED IP addresses should never exist outside of the dynamic - range + [2.2] DISCOVERED IP addresses uniqueness should not be enforeced with + respect to other types |
description: | updated |
Changed in maas: | |
status: | Triaged → Fix Committed |
summary: |
- [2.2] DISCOVERED IP addresses uniqueness should not be enforeced with + [2.2] DISCOVERED IP addresses uniqueness should not be enfored with respect to other types |
Changed in maas: | |
assignee: | nobody → Mike Pontillo (mpontillo) |
Changed in maas: | |
status: | Fix Committed → Fix Released |
Since it's impossible to predict where dynamic ranges fall, such as if an IP address is discovered via an external DHCP server, or dynamic ranges change, I'm looking at fixing this by relaxing the unique constraint, so that DISCOVERED IP addresses can exist at the same time as the same static or automatic IP address assignment.