Bug 486372 - dhcpd doesn't start if interface is controlled using NetworkManager
Summary: dhcpd doesn't start if interface is controlled using NetworkManager
Keywords:
Status: CLOSED INSUFFICIENT_DATA
Alias: None
Product: Fedora
Classification: Fedora
Component: dhcp
Version: 10
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Jiri Popelka
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-02-19 14:55 UTC by Stefan Smietanowski
Modified: 2010-07-16 18:43 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-06-16 19:23:52 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Stefan Smietanowski 2009-02-19 14:55:57 UTC
Description of problem:
The machine has two interfaces, one is dynamic (it gets an IP using dhcp) and the second one is static and on that interface I run a dhcpd server. After bootup the dhcpd doesn't start as it has no interface to attach to because NetworkManager hasn't enabled it yet. Inserting a few-seconds delay into /etc/rc.d/init.d/dhcpd "solves" it, but that's an ugly hack and not a solution.

I wonder if it's not related to the bug below?
https://bugzilla.redhat.com/show_bug.cgi?id=453254

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

How reproducible:
Every time

Steps to Reproduce:
1. Set up an interface using NetworkManager
2. Run dhcpd
  
Actual results:
dhcpd doesn't find any interfaces to bind to.

Expected results:
A working dhcpd :)

Additional info:

Comment 1 David Cantrell 2009-02-19 20:11:11 UTC
There is actually support in the NetworkManager init script to wait for the network to come online before reporting that service as started.

In /etc/sysconfig/network, put the following line:

NETWORKWAIT=yes

You can also provide a LINKDELAY parameter.  If you do not provide a LINKDELAY parameter (which is a number of seconds to wait), the default is 10.

Remove your patch to the dhcpd init script and add NETWORKWAIT=yes to /etc/sysconfig/network and see if that clears up the problem.

Comment 2 Stefan Smietanowski 2009-02-20 02:07:12 UTC
No dice.

Feb 20 02:57:10 DeepSpaceNine NetworkManager: <info>  DHCP: device eth1 state changed preinit -> bound
Feb 20 02:57:10 DeepSpaceNine NetworkManager: <info>  Activation (eth1) Stage 4 of 5 (IP Configure Get) scheduled...
Feb 20 02:57:10 DeepSpaceNine NetworkManager: <info>  Activation (eth1) Stage 4 of 5 (IP Configure Get) started...
Feb 20 02:57:10 DeepSpaceNine NetworkManager: <info>    address 1.2.3.4
Feb 20 02:57:10 DeepSpaceNine NetworkManager: <info>    prefix 25 (255.255.255.128)
Feb 20 02:57:10 DeepSpaceNine NetworkManager: <info>    gateway 1.2.3.0
Feb 20 02:57:10 DeepSpaceNine NetworkManager: <info>    nameserver '1.2.3.200'
Feb 20 02:57:10 DeepSpaceNine NetworkManager: <info>    nameserver '1.2.3.199'
Feb 20 02:57:10 DeepSpaceNine NetworkManager: <info>    domain name 'somedomain.com'
Feb 20 02:57:10 DeepSpaceNine NetworkManager: <info>  Activation (eth1) Stage 5 of 5 (IP Configure Commit) scheduled...
Feb 20 02:57:10 DeepSpaceNine NetworkManager: <info>  Activation (eth1) Stage 4 of 5 (IP Configure Get) complete.
Feb 20 02:57:10 DeepSpaceNine NetworkManager: <info>  Activation (eth1) Stage 5 of 5 (IP Configure Commit) started...
Feb 20 02:57:11 DeepSpaceNine NetworkManager: <info>  (eth1): device state change: 7 -> 8
Feb 20 02:57:11 DeepSpaceNine NetworkManager: <info>  Policy set 'System eth1' (eth1) as default for routing and DNS.
Feb 20 02:57:11 DeepSpaceNine NetworkManager: <info>  Activation (eth1) successful, device activated.
Feb 20 02:57:11 DeepSpaceNine NetworkManager: <info>  Activation (eth1) Stage 5 of 5 (IP Configure Commit) complete.
<snip ntpd, etc and other things>

Feb 20 02:57:12 DeepSpaceNine dhcpd: Internet Systems Consortium DHCP Server 4.0.0
Feb 20 02:57:12 DeepSpaceNine dhcpd: Copyright 2004-2007 Internet Systems Consortium.
Feb 20 02:57:12 DeepSpaceNine dhcpd: All rights reserved.
Feb 20 02:57:12 DeepSpaceNine dhcpd: For info, please visit http://www.isc.org/sw/dhcp/
Feb 20 02:57:12 DeepSpaceNine dhcpd: WARNING: Host declarations are global.  They are not limited to the scope you declared them in.
Feb 20 02:57:12 DeepSpaceNine dhcpd: Not searching LDAP since ldap-server, ldap-port and ldap-base-dn were not specified in the config file
Feb 20 02:57:12 DeepSpaceNine dhcpd: Wrote 0 deleted host decls to leases file.
Feb 20 02:57:12 DeepSpaceNine dhcpd: Wrote 0 new dynamic host decls to leases file.
Feb 20 02:57:12 DeepSpaceNine dhcpd: Wrote 0 leases to leases file.
Feb 20 02:57:12 DeepSpaceNine dhcpd:
Feb 20 02:57:12 DeepSpaceNine dhcpd: No subnet declaration for eth1 (1.2.3.4).
Feb 20 02:57:12 DeepSpaceNine dhcpd: ** Ignoring requests on eth1.  If this is not what
Feb 20 02:57:12 DeepSpaceNine dhcpd:    you want, please write a subnet declaration
Feb 20 02:57:12 DeepSpaceNine dhcpd:    in your dhcpd.conf file for the network segment
Feb 20 02:57:12 DeepSpaceNine dhcpd:    to which interface eth1 is attached. **
Feb 20 02:57:12 DeepSpaceNine dhcpd:
Feb 20 02:57:12 DeepSpaceNine dhcpd:
Feb 20 02:57:12 DeepSpaceNine dhcpd: Not configured to listen on any interfaces!
Feb 20 02:57:12 DeepSpaceNine dhcpd:
Feb 20 02:57:12 DeepSpaceNine dhcpd: This version of ISC DHCP is based on the release available
Feb 20 02:57:12 DeepSpaceNine dhcpd: on ftp.isc.org.  Features have been added and other changes
Feb 20 02:57:12 DeepSpaceNine dhcpd: have been made to the base software release in order to make
Feb 20 02:57:12 DeepSpaceNine dhcpd: it work better with this distribution.
Feb 20 02:57:12 DeepSpaceNine dhcpd:
Feb 20 02:57:12 DeepSpaceNine dhcpd: Please report for this software via the Red Hat Bugzilla site:
Feb 20 02:57:12 DeepSpaceNine dhcpd:     http://bugzilla.redhat.com
Feb 20 02:57:12 DeepSpaceNine dhcpd:
Feb 20 02:57:12 DeepSpaceNine dhcpd: exiting.

Feb 20 02:57:12 DeepSpaceNine NetworkManager: <info>  (eth0): carrier now ON (device state 2)
Feb 20 02:57:12 DeepSpaceNine NetworkManager: <info>  (eth0): device state change: 2 -> 3
Feb 20 02:57:12 DeepSpaceNine NetworkManager: <info>  Activation (eth0) starting connection 'System eth0'
Feb 20 02:57:12 DeepSpaceNine NetworkManager: <info>  (eth0): device state change: 3 -> 4
Feb 20 02:57:12 DeepSpaceNine NetworkManager: <info>  Activation (eth0) Stage 1 of 5 (Device Prepare) scheduled...
Feb 20 02:57:12 DeepSpaceNine NetworkManager: <info>  Activation (eth0) Stage 1 of 5 (Device Prepare) started...
Feb 20 02:57:12 DeepSpaceNine NetworkManager: <info>  Activation (eth0) Stage 2 of 5 (Device Configure) scheduled...
Feb 20 02:57:12 DeepSpaceNine NetworkManager: <info>  Activation (eth0) Stage 1 of 5 (Device Prepare) complete.
Feb 20 02:57:12 DeepSpaceNine NetworkManager: <info>  Activation (eth0) Stage 2 of 5 (Device Configure) starting...
Feb 20 02:57:12 DeepSpaceNine NetworkManager: <info>  (eth0): device state change: 4 -> 5
Feb 20 02:57:12 DeepSpaceNine NetworkManager: <info>  Activation (eth0) Stage 2 of 5 (Device Configure) successful.
Feb 20 02:57:12 DeepSpaceNine NetworkManager: <info>  Activation (eth0) Stage 3 of 5 (IP Configure Start) scheduled.
Feb 20 02:57:12 DeepSpaceNine NetworkManager: <info>  Activation (eth0) Stage 2 of 5 (Device Configure) complete.
Feb 20 02:57:12 DeepSpaceNine NetworkManager: <info>  Activation (eth0) Stage 3 of 5 (IP Configure Start) started...
Feb 20 02:57:12 DeepSpaceNine NetworkManager: <info>  (eth0): device state change: 5 -> 7
Feb 20 02:57:12 DeepSpaceNine NetworkManager: <info>  Activation (eth0) Stage 4 of 5 (IP Configure Get) scheduled...
Feb 20 02:57:12 DeepSpaceNine NetworkManager: <info>  Activation (eth0) Stage 3 of 5 (IP Configure Start) complete.
Feb 20 02:57:12 DeepSpaceNine NetworkManager: <info>  Activation (eth0) Stage 4 of 5 (IP Configure Get) started...
Feb 20 02:57:12 DeepSpaceNine NetworkManager: <info>  Activation (eth0) Stage 5 of 5 (IP Configure Commit) scheduled...
Feb 20 02:57:12 DeepSpaceNine NetworkManager: <info>  Activation (eth0) Stage 4 of 5 (IP Configure Get) complete.
Feb 20 02:57:12 DeepSpaceNine NetworkManager: <info>  Activation (eth0) Stage 5 of 5 (IP Configure Commit) started...
Feb 20 02:57:13 DeepSpaceNine NetworkManager: <info>  Policy set 'System eth1' (eth1) as default for routing and DNS.
Feb 20 02:57:13 DeepSpaceNine NetworkManager: <info>  (eth0): device state change: 7 -> 8
Feb 20 02:57:13 DeepSpaceNine NetworkManager: <info>  Activation (eth0) successful, device activated.
Feb 20 02:57:13 DeepSpaceNine NetworkManager: <info>  Activation (eth0) Stage 5 of 5 (IP Configure Commit) complete.

So it a) configures eth1 (via dhcp) b) starts dhcpd which doesn't work since it only runs on eth0 and it's not up yet c) configures eth0.

This is with NETWORKWAIT=yes in /etc/sysconfig/network.

Comment 3 yrtimiD 2009-03-21 17:07:57 UTC
For me adding NETWORKWAIT=yes fixed the problem. Thanks.

Comment 4 Stefan Smietanowski 2009-04-02 13:13:56 UTC
Still no go, fully latest everything. Log similar to above.

Comment 5 David Cantrell 2009-04-17 01:47:19 UTC
(In reply to comment #4)
> Still no go, fully latest everything. Log similar to above.  

Can you post your dhcpd.conf file?

Comment 6 David Cantrell 2009-06-16 19:23:52 UTC
These lines in your log indicate your dhcpd.conf file is not set up correctly:

Feb 20 02:57:12 DeepSpaceNine dhcpd: No subnet declaration for eth1 (1.2.3.4).
Feb 20 02:57:12 DeepSpaceNine dhcpd: ** Ignoring requests on eth1.  If this is
not what
Feb 20 02:57:12 DeepSpaceNine dhcpd:    you want, please write a subnet
declaration
Feb 20 02:57:12 DeepSpaceNine dhcpd:    in your dhcpd.conf file for the network
segment
Feb 20 02:57:12 DeepSpaceNine dhcpd:    to which interface eth1 is attached. **
Feb 20 02:57:12 DeepSpaceNine dhcpd:
Feb 20 02:57:12 DeepSpaceNine dhcpd:
Feb 20 02:57:12 DeepSpaceNine dhcpd: Not configured to listen on any
interfaces!

Without seeing your dhcpd.conf, I cannot determine the problem.  If you can provide a copy of your dhcpd.conf file, please attach it to the bug and reopen.

Comment 7 Edward J. Huff 2010-07-16 17:43:37 UTC
For a workaround (still required for Fedora 13), see

https://bugzilla.redhat.com/show_bug.cgi?id=565921#c8


Note You need to log in before you can comment on or make changes to this bug.