Bug 1120656

Summary: dhcp fails to start and seems to need network-online.target
Product: [Fedora] Fedora Reporter: Ian Chapman <packages>
Component: dhcpAssignee: Jiri Popelka <jpopelka>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 20CC: jpopelka, petr.tuma, psimerda, thozza
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: dhcp-4.2.7-2.fc20 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-08-27 01:33:10 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1119787    

Description Ian Chapman 2014-07-17 11:18:55 UTC
Description of problem:

Dhcpd fails to start saying there are no interfaces with IPv4 addresses assigned. It appears to be started before the network interface configuration has been completed.

Version-Release number of selected component (if applicable):

dhcp-4.2.6-5.fc20.x86_64

How reproducible:

Steps to Reproduce:
1. Install dhcp
2. Configure and enabled it 
3. Reboot server

Actual results:

Dhcpd fails to start as mentioned above

Expected results:

Dhcpd should start and serve out addresses.

Additional info:

Copying the dhcpd.service file to /etc/systemd/system/ and editing the file so that the line After line is changed from:

After=network.target

to

After=network-online.target

seems to resolve the issue. Note, I'm using a bridged setup using the traditional 'network' service and not NetworkManager

Comment 1 Pavel Šimerda (pavlix) 2014-07-17 14:11:36 UTC
(In reply to Ian Chapman from comment #0)
> Copying the dhcpd.service file to /etc/systemd/system/ and editing the file
> so that the line After line is changed from:
> 
> After=network.target
> 
> to
> 
> After=network-online.target

To work univerally, you also need to pull in network-online.target e.g. using Wants. Otherwise you're relying on another service to pull it in, which is wrong.

An alternative would be to avoid the dependency entirely using tools that the operating system provides, but that may not be easy for dhcpd in particular.

Comment 2 Fedora Update System 2014-08-12 09:42:30 UTC
dhcp-4.2.7-1.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/FEDORA-2014-8287/dhcp-4.2.7-1.fc20

Comment 3 Fedora Update System 2014-08-15 02:48:24 UTC
Package dhcp-4.2.7-1.fc20:
* should fix your issue,
* was pushed to the Fedora 20 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing dhcp-4.2.7-1.fc20'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-8287/dhcp-4.2.7-1.fc20
then log in and leave karma (feedback).

Comment 4 Fedora Update System 2014-08-16 00:29:48 UTC
Package dhcp-4.2.7-2.fc20:
* should fix your issue,
* was pushed to the Fedora 20 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing dhcp-4.2.7-2.fc20'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-8287/dhcp-4.2.7-2.fc20
then log in and leave karma (feedback).

Comment 5 Fedora Update System 2014-08-27 01:33:10 UTC
dhcp-4.2.7-2.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.