Project

General

Profile

Bug #8120

Unable to disable DHCP Server on interface when DNS Resolver "DHCP Registration" is enabled

Added by Braden McGrath over 1 year ago. Updated 8 months ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
DHCP Server
Target version:
Start date:
11/23/2017
Due date:
% Done:

100%

Estimated time:
Affected Version:
2.4.2
Affected Architecture:
All

Description

Subject covers this pretty clearly I think, but I'll elaborate with my repro steps. I chose "all" for affected arch because this smells like a "universal" bug, but I'm running on amd64.

  1. Start with a running 2-interface system, typical WAN/LAN configuration. LAN has DHCP Server enabled, and DNS Resolver is configured with both "DHCP Registration" and "Static DHCP" options enabled. (Not sure if the "Static DHCP" matters, but that's what I had so including for completeness.)
  2. Now, add a new interface, I'll use the default "OPT1" name here.
  3. Add Static IPv4 address to OPT1.
  4. DHCP Server was automatically enabled for OPT1 for me. I don't like this behavior, but that might belong in another bug report? It may also be due to stale config remnants, as I have had an OPT1 interface in the past but it has been gone for quite a while.
  5. Attempt to disable DHCP server, and get an error that "DHCP Registration must be disabled from DNS Resolver page before disabling DHCP server". This is super confusing, since I don't want to disable DHCP Registration at all... I just want to shut off DHCP on one interface.

I was able to work-around by disabling the suggested option in DNS Resolver and Saving but not "Applying" it, then going back over to DHCP Server, disabled on OPT1 and Saved, and then went back and fixed DNS config...
I would expect to be able to disable DHCP on a single interface without DNS being upset about that and requiring other changes. I could understand it complaining if I was disabling the last DHCP pool on the system, but that was not the case here.

Associated revisions

Revision 9477c170 (diff)
Added by Jim Pingle 8 months ago

Correct the DHCP DNS reg check. Fixes #8120

Now allows all but one DHCP server to be disabled, rather than denying
all of them.

History

#1 Updated by Michael SanAngelo 8 months ago

Braden McGrath wrote:

Subject covers this pretty clearly I think, but I'll elaborate with my repro steps. I chose "all" for affected arch because this smells like a "universal" bug, but I'm running on amd64.

  1. Start with a running 2-interface system, typical WAN/LAN configuration. LAN has DHCP Server enabled, and DNS Resolver is configured with both "DHCP Registration" and "Static DHCP" options enabled. (Not sure if the "Static DHCP" matters, but that's what I had so including for completeness.)
  2. Now, add a new interface, I'll use the default "OPT1" name here.
  3. Add Static IPv4 address to OPT1.
  4. DHCP Server was automatically enabled for OPT1 for me. I don't like this behavior, but that might belong in another bug report? It may also be due to stale config remnants, as I have had an OPT1 interface in the past but it has been gone for quite a while.
  5. Attempt to disable DHCP server, and get an error that "DHCP Registration must be disabled from DNS Resolver page before disabling DHCP server". This is super confusing, since I don't want to disable DHCP Registration at all... I just want to shut off DHCP on one interface.

I was able to work-around by disabling the suggested option in DNS Resolver and Saving but not "Applying" it, then going back over to DHCP Server, disabled on OPT1 and Saved, and then went back and fixed DNS config...
I would expect to be able to disable DHCP on a single interface without DNS being upset about that and requiring other changes. I could understand it complaining if I was disabling the last DHCP pool on the system, but that was not the case here.

Can confirm. This is still an issue in v2.4.3.

#2 Updated by Jim Pingle 8 months ago

  • Status changed from New to Assigned
  • Assignee set to Jim Pingle
  • Target version set to 2.4.4

#3 Updated by Jim Pingle 8 months ago

In step #4 you must have had an old/stale opt1 config. DHCP is disabled by default for new interfaces.

I can reproduce the bug otherwise, though. Fix incoming.

#4 Updated by Jim Pingle 8 months ago

  • Status changed from Assigned to Feedback
  • % Done changed from 0 to 100

#5 Updated by Azamat Khakimyanov 8 months ago

Works OK for me on latest 2.4.4-DEV snap
1) I created OPT1 interface with static ip
2) DHCP Server on OPT1 didn't start automatically, I enabled it manually
3) I applied "DHCP Registration" for DNS Resolver

- On 2.4.4-dev 20180730 I wasn't able to disable DHCP Server on OPT1 because of "DHCP Registration must be disabled from DNS Resolver page before disabling DHCP server"
- after upgrade up to '2.4.4-DEVELOPMENT (amd64) built on Wed Aug 01 01:14:40 EDT 2018' I can disable DHCP Server on OPT1 without any error

#6 Updated by Jim Pingle 8 months ago

There is one more case to test there yet: Were you able to disable DHCP on LAN after disabling it on OPT1?
It should error out if you try to disable the last enabled DHCP interface. So if you had DHCP on OPT1 and LAN, you should be able to disable either one of those, but not both.

#7 Updated by James Dekker 8 months ago

On 2.4.4.a.20180802.1755 (gitsync'd to master):

Followed the same steps as Azamat, but was unable to disable LAN DHCP server, the following message was shown:

The following input errors were detected:

    DHCP Registration features in the DNS Resolver are active and require at least one enabled DHCP Server.

#8 Updated by James Dekker 8 months ago

  • Status changed from Feedback to Resolved

Also available in: Atom PDF