Cannot disable DHCP if you remove the subnet first ("Cannot configure DHCP: At least one dynamic range is required.")

Bug #1583392 reported by Trent Lloyd on 2016-05-19
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
MAAS
Critical
Mike Pontillo

Bug Description

You cannot disable DHCP on a VLAN which no longer has a subnet.

The following error occurs if you attempt to do so:
Cannot configure DHCP: At least one dynamic range is required

Steps to reproduce

 (1) Install MAAS
 (2) Setup DHCP on the default vlan/subnet
 (3) Delete the subnet
 (4) Optionally: Add the subnet under a new vlan, attempt to enable DHCP and notice that the rack controller cannot be selected
 (5) Select "Disable DHCP" from the VLAN page

Related branches

Trent Lloyd (lathiat) wrote :

Version: xenial/main 2.0.0~beta3+bzr4941-0ubuntu1

Trent Lloyd (lathiat) wrote :

Other notes: I actually moved the only active subnets into another fabric and space, so this fabric/space had no subnets left at all.

Workaround steps:
 (1) Add a subnet back into the VLAN
 (2) Select Reconfigure DHCP to set a dynamic range
 (3) Now you can disable DHCP

Changed in maas:
milestone: none → 2.0.0
importance: Undecided → Critical
Gavin Panella (allenap) on 2016-05-25
Changed in maas:
status: New → Triaged
Changed in maas:
assignee: nobody → Mike Pontillo (mpontillo)
Mike Pontillo (mpontillo) wrote :

I think the safest way to fix this at the moment is to disallow deletion of subnets which are currently being used for DHCP. You'll have to disable DHCP (or delete the dynamic range) before deleting them.

We could automatically disable DHCP, if only one rack is servicing the VLAN and the subnet's dynamic range was the last one being serviced from that VLAN.

But I think it's best to keep it simple and just disallow this for now.

Changed in maas:
status: Triaged → Fix Committed
Changed in maas:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers