Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 628920 - net-misc/dhcp-4.3.6 - dhcpd4 with systemd fails if network is not up yet
Summary: net-misc/dhcp-4.3.6 - dhcpd4 with systemd fails if network is not up yet
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2017-08-25 15:03 UTC by Sven Müller
Modified: 2020-11-18 17:09 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
fixed systemd-unit for dhcpd (dhcpd4.service,299 bytes, text/plain)
2017-08-25 15:03 UTC, Sven Müller
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sven Müller 2017-08-25 15:03:27 UTC
Created attachment 490546 [details]
fixed systemd-unit for dhcpd

Aug 25 16:36:07 nas dhcpd[205]: No subnet declaration for eth0 (no IPv4 addresses).
Aug 25 16:36:07 nas dhcpd[205]: ** Ignoring requests on eth0.  If this is not what
Aug 25 16:36:07 nas dhcpd[205]:    you want, please write a subnet declaration
Aug 25 16:36:07 nas dhcpd[205]:    in your dhcpd.conf file for the network segment
Aug 25 16:36:07 nas dhcpd[205]:    to which interface eth0 is attached. **
Aug 25 16:36:07 nas dhcpd[205]: 
Aug 25 16:36:07 nas dhcpd[205]: 
Aug 25 16:36:07 nas dhcpd[205]: Not configured to listen on any interfaces!
Aug 25 16:36:07 nas dhcpd[205]: 
Aug 25 16:36:07 nas dhcpd[205]: If you think you have received this message due to a bug rather
Aug 25 16:36:07 nas dhcpd[205]: than a configuration issue please read the section on submitting
Aug 25 16:36:07 nas dhcpd[205]: bugs on either our web page at www.isc.org or in the README file
Aug 25 16:36:07 nas dhcpd[205]: before submitting a bug.  These pages explain the proper
Aug 25 16:36:07 nas dhcpd[205]: process and the information we find helpful for debugging.
Aug 25 16:36:07 nas dhcpd[205]: 
Aug 25 16:36:07 nas dhcpd[205]: exiting.
Aug 25 16:36:07 nas systemd[1]: dhcpd4.service: Main process exited, code=exited, status=1/FAILURE
Aug 25 16:36:07 nas systemd[1]: dhcpd4.service: Unit entered failed state.
Aug 25 16:36:07 nas systemd[1]: dhcpd4.service: Failed with result 'exit-code'.

After the boot process has finished, dhcpd4 can be started manually without any problems. Inserting a rule to force dhcpd4 starting after the network is up solves the problem.
Comment 1 Leonid Kopylov 2020-09-28 11:01:32 UTC
just hit the same issue
Comment 2 Leonid Kopylov 2020-09-28 11:02:55 UTC
# emerge =net-misc/dhcp-4.4.2-r2 -qpv
[ebuild   R   ] net-misc/dhcp-4.4.2-r2  USE="client ipv6 ldap server ssl vim-syntax -libressl (-selinux)"
Comment 3 Leonid Kopylov 2020-11-18 12:50:03 UTC
Any news on this?
Comment 4 Mike Gilbert gentoo-dev 2020-11-18 16:47:06 UTC
There's really no simple way to know which interfaces must be configured before starting the daemon. I think this would need to be customized for every installation.
Comment 5 Larry the Git Cow gentoo-dev 2020-11-18 17:09:21 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9b7959a9776a912bdef36f4db14c3c7bb23ddf34

commit 9b7959a9776a912bdef36f4db14c3c7bb23ddf34
Author:     Mike Gilbert <floppym@gentoo.org>
AuthorDate: 2020-11-18 17:08:22 +0000
Commit:     Mike Gilbert <floppym@gentoo.org>
CommitDate: 2020-11-18 17:08:22 +0000

    net-misc/dhcp: pull in network-online.target in service units
    
    dhcpd refuses to start if there are no configured broadcast interfaces.
    
    Closes: https://bugs.gentoo.org/628920
    Signed-off-by: Mike Gilbert <floppym@gentoo.org>

 net-misc/dhcp/{dhcp-4.4.2-r2.ebuild => dhcp-4.4.2-r3.ebuild} | 0
 net-misc/dhcp/files/dhcpd4.service                           | 2 ++
 net-misc/dhcp/files/dhcpd6.service                           | 2 ++
 3 files changed, 4 insertions(+)