Bug #8120
closed
Unable to disable DHCP Server on interface when DNS Resolver "DHCP Registration" is enabled
Added by Braden McGrath almost 7 years ago.
Updated over 6 years ago.
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.
- 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.)
- Now, add a new interface, I'll use the default "OPT1" name here.
- Add Static IPv4 address to OPT1.
- 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.
- 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.
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.
- 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.)
- Now, add a new interface, I'll use the default "OPT1" name here.
- Add Static IPv4 address to OPT1.
- 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.
- 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.
- Status changed from New to Assigned
- Assignee set to Jim Pingle
- Target version set to 2.4.4
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.
- Status changed from Assigned to Feedback
- % Done changed from 0 to 100
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
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.
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.
- Status changed from Feedback to Resolved
Also available in: Atom
PDF