Bug 48620 - dhcpd fails to start when DHCP pool ranges are not disjunct
dhcpd fails to start when DHCP pool ranges are not disjunct
Status: REOPENED
Product: UCS
Classification: Unclassified
Component: DHCP
UCS 5.0
Other Linux
: P5 normal (vote)
: ---
Assigned To: UCS maintainers
UCS maintainers
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2019-02-06 12:13 CET by Moritz Bunkus
Modified: 2021-06-11 17:52 CEST (History)
3 users (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 5: Major Usability: Impairs usability in key scenarios
Who will be affected by this bug?: 2: Will only affect a few installed domains
How will those affected feel about the bug?: 3: A User would likely not purchase the product
User Pain: 0.171
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional):
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Moritz Bunkus 2019-02-06 12:13:43 CET
(A) Problem description

The DHCP server fails to start as soon as you have more than one DHCP pool for a DHCP subnet and at least one host with a fixed IP address mapping in the same subnet.

Error message from the journal:

Feb 06 11:59:22 master dhcpd[12008]: LDAP line 8: lease 10.191.1.106 is declared twice!
Feb 06 11:59:22 master dhcpd[12008]: range 10.191.1.100 10.191.1.110;
Feb 06 11:59:22 master dhcpd[12008]:                                 ^


(B) How to reproduce


1. Create a DHCP service, subnet & DHCP host
2. Create two DHCP pools within that subnet, assign any range from the subnet to the pools
3. Create a computer object (e.g. "IP managed client"), assign an IP address & a hardware address, configure a fixed DHCP lease for the service created in 1.

Now observe the journal on the DHCP host configured in step 1.


(C) Version information

[0 root@master ~] ucr search --brief '^version/'
version/erratalevel: 411
version/patchlevel: 3
version/releasename: Neustadt
version/version: 4.3


(D) Other information

Corresponding thread from the forum: https://help.univention.com/t/dhcp-keine-neuen-informationen-aus-ldap/11138
Comment 1 Markus Kohn 2019-02-06 13:21:58 CET
After a certain time the expected functionality will be performed by the dhcp  but the error is still reproducable.
Comment 2 Ingo Steuwer univentionstaff 2021-05-14 15:43:29 CEST
This issue has been filed against UCS 4.3.

UCS 4.3 is out of maintenance and many UCS components have changed in later releases. Thus, this issue is now being closed.

If this issue still occurs in newer UCS versions, please use "Clone this bug" or reopen it and update the UCS version. In this case please provide detailed information on how this issue is affecting you.
Comment 3 Philipp Hahn univentionstaff 2021-06-11 17:52:41 CEST
LB=$(ucr get ldap/base)
IP='172.16.22'
srv=$(udm dhcp/service list|sed -ne 's/^DN: //p;T;q')
udm dhcp/subnet create --superordinate "$srv" --set subnet="$IP.0" --set subnetmask=24
net=$(udm dhcp/subnet list --filter subnet="$IP.0" | sed -ne 's/^DN: //p;T;q')
udm dhcp/pool create --superordinate $net --set name=1st --set range="$IP.2 $IP.20"

# Scenario 1: overlapping IP ranges
udm dhcp/pool create --superordinate $net --set name=2nd --set range="$IP.2 $IP.22"
tail /var/log/daemon.log
# ERROR
udm dhcp/pool remove --dn "cn=2nd,$net"

# Scenario 2: host and 2 pools with disjunct ranges
udm dhcp/pool create --superordinate $net --set name=2nd --set range="$IP.30 $IP.39"
udm dhcp/host create --superordinate "$srv" --set host=test --set hwaddress='ethernet 00:11:22:33:44:55' --set fixedaddress="$IP.20"
tail /var/log/daemon.log
# OKAY