I have a subnet, lets call it 172.1.2.0/24
that my company has a hard requirement that we will have multiple clusters of machines using that same subnet.
For clarity, imagine the following …
cluster 1 - 172.1.2.0/24
... machine-1 => 172.1.2.5
... machine-2 => 172.1.2.6
... more ... etc ....
cluster 2 - 172.1.2.0/24
(same network as cluster 1)
... machine-3 => 172.1.2.5 (same ip as machine-1 above)
... machine-4 => 172.1.2.6 (same ip as machine-2 above)
... more ... etc ....
cluster 3 - …same…
... same same ...
and this is all normal and desirable; says us :).
Some important points (restated in some case for clarity) …
- We are NOT using DHCP from MAAS. We have DHCP provided by in-place network hardware.
- We expect overlapping (or “duplicated” if you prefer) networks 172.1.2.0/24
- We expect our machines to have static ip’s assigned by our “just-in-time” cloud-init script provided at maas “deploy” time.
Now, my question/concern is motivated by my observation about table maasserver_staticipaddress
which has two uniqueness “contraints” expressed as
1.
constraint maasserver_staticipaddress_alloc_type_ip_8274db4c_uniq
unique (alloc_type, ip)
and 2.
create unique index maasserver_staticipaddress_discovered_uniq
on maasserver_staticipaddress (ip)
where (NOT (alloc_type = 6));
When I brought this up in another discussion with @r00ta, the suggestion was to set the IP mode of the boot interface of the machine to DHCP
Now, I did a test with two machines, one in each network (same network 172.1.2.0/24) and I’m concerned that this doesn’t resolve the potential issue.
- I deleted the machines (clear out the region to start fresh).
- I discovered both machines (interfaces end up in auto by default and populate maasserver_staticipaddress with two addresses in
172.1.2.0/24
)- one machine came up with ip ending in 250, the other 233
- maasserver_staticipaddress table has a row for both of those two addresses
- I change both interfaces from auto to dhcp as indicated in Custom cloud-init network configuration examples please? - #7 by alfred-stokespace
- I performed a commission of both (did not check “preserve network”)
- no change in machine ips, one ip ending in 250, the other 233
- maasserver_staticipaddress table has a row for both of those two addresses (no change)
- Again, changed both interfaces from auto to dhcp
- Deployed to both machines with our custom cloud-init (ie. w/static ip netplan assignments)
- I examine maasserver_staticipaddress table and the same two ip addresses 250 and 233 are still present.
And finally, my question…
If I keep discovering/commissioning/deploying new machines, will I eventually reach a failure point due to conflicts in maasserver_staticipaddress?
How should I be using MAAS when I have these multiple overlapping subnets?