#926208 Bad Dual-Stack initscript error handling

Package:
isc-dhcp-server
Source:
isc-dhcp
Description:
ISC DHCP server for automatic IP address assignment
Submitter:
Bernhard Schmidt
Date:
2025-04-03 23:39:02 UTC
Severity:
important
#926208#5
Date:
2019-04-01 22:44:33 UTC
From:
To:
Hi,

I don't really have a good non-intrusive idea to fix this. I also don't see
other reports about this (for code that was supposedly added before stretch),
so I wonder what I'm missing.

/etc/init.d/isc-dhcp-server tries to start both an IPv4 and an IPv6 server in
the default configuration (both INTERFACESv[46] empty). Or if you have both
set. If the IPv6 server does not start due to any reason (missing
configuration, typo in the configuration, misconfigured NIC) you end up with
some bad state.

root@opsvm:~# systemctl start isc-dhcp-server
Job for isc-dhcp-server.service failed because the control process exited with error code.
See "systemctl status isc-dhcp-server.service" and "journalctl -xe" for details.

Apr 01 22:37:29 opsvm isc-dhcp-server[3057]: Launching IPv4 server only.
Apr 01 22:37:29 opsvm dhcpd[3066]: Internet Systems Consortium DHCP Server 4.4.1
Apr 01 22:37:29 opsvm dhcpd[3066]: Copyright 2004-2018 Internet Systems Consortium.
Apr 01 22:37:29 opsvm dhcpd[3066]: All rights reserved.
Apr 01 22:37:29 opsvm dhcpd[3066]: For info, please visit https://www.isc.org/software/dhcp/
Apr 01 22:37:30 opsvm dhcpd[3069]: Internet Systems Consortium DHCP Server 4.4.1
Apr 01 22:37:30 opsvm dhcpd[3069]: Copyright 2004-2018 Internet Systems Consortium.
Apr 01 22:37:30 opsvm dhcpd[3069]: All rights reserved.
Apr 01 22:37:30 opsvm dhcpd[3069]: For info, please visit https://www.isc.org/software/dhcp/
Apr 01 22:37:30 opsvm dhcpd[3069]: Wrote 0 group decls to leases file.
Apr 01 22:37:30 opsvm dhcpd[3069]: Wrote 0 deleted host decls to leases file.
Apr 01 22:37:30 opsvm dhcpd[3069]: Wrote 0 new dynamic host decls to leases file.
Apr 01 22:37:30 opsvm dhcpd[3069]: Wrote 136 leases to leases file.
Apr 01 22:37:30 opsvm dhcpd[3069]: Server starting service.
Apr 01 22:37:32 opsvm isc-dhcp-server[3057]: Starting ISC DHCPv4 server: dhcpd.
Apr 01 22:37:32 opsvm isc-dhcp-server[3057]: Launching IPv6 server only.
Apr 01 22:37:32 opsvm dhcpd[3076]: Wrote 0 NA, 0 TA, 0 PD leases to lease file.
Apr 01 22:37:32 opsvm dhcpd[3076]:
Apr 01 22:37:32 opsvm dhcpd[3076]: No subnet6 declaration for ens18 (2001:1b10:100:3::53aa:12a).
Apr 01 22:37:32 opsvm dhcpd[3076]: ** Ignoring requests on ens18.  If this is not what
Apr 01 22:37:32 opsvm dhcpd[3076]:    you want, please write a subnet6 declaration
Apr 01 22:37:32 opsvm dhcpd[3076]:    in your dhcpd.conf file for the network segment
Apr 01 22:37:32 opsvm dhcpd[3076]:    to which interface ens18 is attached. **
Apr 01 22:37:32 opsvm dhcpd[3076]:
Apr 01 22:37:32 opsvm dhcpd[3076]:
Apr 01 22:37:32 opsvm dhcpd[3076]: Not configured to listen on any interfaces!
Apr 01 22:37:32 opsvm dhcpd[3076]:
Apr 01 22:37:32 opsvm dhcpd[3076]: If you think you have received this message due to a bug rather
Apr 01 22:37:32 opsvm dhcpd[3076]: than a configuration issue please read the section on submitting
Apr 01 22:37:32 opsvm dhcpd[3076]: bugs on either our web page at www.isc.org or in the README file
Apr 01 22:37:32 opsvm dhcpd[3076]: before submitting a bug.  These pages explain the proper
Apr 01 22:37:32 opsvm dhcpd[3076]: process and the information we find helpful for debugging.
Apr 01 22:37:32 opsvm dhcpd[3076]:
Apr 01 22:37:32 opsvm dhcpd[3076]: exiting.
Apr 01 22:37:34 opsvm isc-dhcp-server[3057]: Starting ISC DHCPv6 server: dhcpd6check syslog for diagnostics. ... failed!
Apr 01 22:37:34 opsvm isc-dhcp-server[3057]:  failed!


root@opsvm:~# systemctl status isc-dhcp-server
● isc-dhcp-server.service - LSB: DHCP server
   Loaded: loaded (/etc/init.d/isc-dhcp-server; generated)
   Active: failed (Result: exit-code) since Mon 2019-04-01 22:37:34 UTC; 9s ago

root      3069  0.0  0.2  13632  9376 ?        Ss   22:37   0:00 /usr/sbin/dhcpd -4 -q -cf /etc/dhcp/dhcpd.conf ens18 moni123 mgmt100

So there is the IPv4 daemon running, but systemd thinks the whole service has
failed.

This leads to various weird things. You cannot stop the daemon using systemctl

root@opsvm:~# systemctl stop isc-dhcp-server
root@opsvm:~# systemctl status isc-dhcp-server
● isc-dhcp-server.service - LSB: DHCP server
   Loaded: loaded (/etc/init.d/isc-dhcp-server; generated)
   Active: failed (Result: exit-code) since Mon 2019-04-01 22:37:34 UTC; 2min 35s ago
     Docs: man:systemd-sysv-generator(8)
  Process: 3057 ExecStart=/etc/init.d/isc-dhcp-server start (code=exited, status=1/FAILURE)
    Tasks: 1 (limit: 4696)
   Memory: 6.5M
   CGroup: /system.slice/isc-dhcp-server.service
           └─3069 /usr/sbin/dhcpd -4 -q -cf /etc/dhcp/dhcpd.conf ens18 moni123 mgmt100

root      3069  0.0  0.2  13632  8860 ?        Ss   22:37   0:00 /usr/sbin/dhcpd -4 -q -cf /etc/dhcp/dhcpd.conf ens18 moni123 mgmt100

You cannot start or restart it, because it would then just try starting the
daemon again

Apr 01 22:40:54 opsvm isc-dhcp-server[3599]: Starting ISC DHCPv4 server: dhcpddhcpd service already running (pid file /var/run/dhcpd.pid currenty exists) ... failed!

And even after manually killing the untracked dhcpd the pidfile still exists
and blocks restarting the daemon (Bug#868240).

Bernhard

#926208#10
Date:
2019-09-19 14:08:18 UTC
From:
To:
Dear Maintainer,

this happens when dhcpd6.conf does not contain a valied configuration
because the admin does not intend to use it.

One solution is to define INTERFACESv4 in /etc/default/isc-dhcp-server.

The cleaner solution would be to split the systemd unit into two, one
for IPv4 and one for IPv6. The fact the /etc/init.d/isc-dhcp-server
tries to start two daemons at once is not very good, IMHO.

#926208#15
Date:
2019-09-19 15:09:05 UTC
From:
To:
Hi,

more details about systemd units can be found in bug #792894

Regards

#926208#20
Date:
2025-04-03 06:49:07 UTC
From:
To:
There have been ongoing issues of IPv4 vs IPv6 for years, this bug is from
2019 and #792894 is from 2015.

Could we just split the package?  Then if someone doesn't want IPv6
functionality they just don't install that package.

IPv4 has limited addresses and needs different management methods to IPv6 so
using the same package for both will often not be the desired option.

#926208#25
Date:
2025-04-03 22:15:32 UTC
From:
To:
ISC DHCP is EOL upstream. I would find packaging changes like that a
bit surprising at this time.

just my 2 cents,
Chris

#926208#30
Date:
2025-04-03 23:37:43 UTC
From:
To:
Fair enough.  I've filed a bug report requesting that the description of the
package be changed to note that it is EOL upstream.  I was unaware of this
fact and there are probably many people using it who are also unaware.