gateway reappears after reconfiguring dhcp
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
MAAS |
Fix Released
|
Medium
|
Unassigned | ||
maas-ui |
Fix Released
|
Unknown
|
Bug Description
MAAS version: 2.8.2
Package: snap and deb
If we have MAAS running with any subnet where we are providing dhcp, MAAS will automatically add a gateway IP address if the subnet is reconfigured and the Reconfigure DHCP button is pressed.
Steps to re-produce:
1. Click Subnets
2. Add a new subnet, name "test" -> CIDR "10.0.6.0/24" -> "Add subnet"
3. Click on the vlan associated with the new subnet
4. Click on "Reconfigure DHCP"
5. Choose the subnet and Start IP Address: 10.0.6.101, End IP Address: 10.0.6.199, blank out the Gateway IP. Click "Reconfigure DHCP"
6. On the new page, click 10.0.6.0/25 under the "Subnets on this VLAN". We will see that the Gateway IP has not been set
7. Go back click on "Reconfigure DHCP" and on the new page click "Reconfigure DHCP"
8. On the new page, click 10.0.6.0/25 under the "Subnets on this VLAN". We will see that the Gateway IP has now been set to 10.0.6.1
If we set the Start IP address to 10.0.6.1, then the Gateway IP is also set, but now to 10.0.6.254 instead of 10.0.6.1, as that is now being used.
We are also able to see the same updates in /var/lib/
We should not expect the gateway to be set, if the gateway is blank in the UI.
Changed in maas: | |
status: | New → Triaged |
importance: | Undecided → Medium |
milestone: | none → 2.9.x |
Changed in maas-ui: | |
importance: | Undecided → Unknown |
Changed in maas-ui: | |
status: | New → Fix Released |
Changed in maas: | |
status: | Triaged → Fix Released |
milestone: | 2.9.x → 2.9.1 |
This seems like a UI bug.
The UI passes the "gateway" parameter when enabling DHCP if it's not set on the subnet, and doesn't pass it wht it is.
Also, in the configure dhcp form, it seems the ranges table seems to have the "Gateway IP" column only when the gateway is not set (and the column is of course empty). When it is, the column is not there.