Bug 481078

Summary: mkinitrd dhclient fails to DHCP
Product: [Fedora] Fedora Reporter: Warren Togami <wtogami>
Component: mkinitrdAssignee: Peter Jones <pjones>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: rawhideCC: dcantrell, hdegoede, katzj, pjones, wtogami
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-02-03 10:49:32 UTC Type: ---
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: 188611, 446452    

Description Warren Togami 2009-01-22 01:58:49 UTC
mkinitrd-6.0.75-1.fc11
dhcp-4.1.0-5.fc11

mkinitrd/nash/network.c:
if (execl(DHCLIENT, DHCLIENT, "-4", "-1", "-n", NULL) == -1)

http://people.redhat.com/wtogami/temp/f11-netboot-failure.png
It seems that -4 is an invalid parameter, because dhclient 4.0.0 and 4.1.0 both print syntax help when you use it.

dhcp-4.1.0-5.fc11
=================
dhclient -v -1 -n eth0
[outputs the syntax help]

dhclient -v -1 -n
[snip]
execve (/sbin/dhclient-script, ...): No such file or directory
No broadcast interfaces found - exiting.

Bringing up the eth0 interface manually before dhclient makes no apparent difference in dhclient's behavior.

dhcp-4.0.0-34.fc11
==================
dhclient -v -1 -n eth0
Sending on   Socket/fallback
receive_packet failed on eth0: Network is down
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 5
send_packet: Network is down

ifconfig eth0 up
dhclient -v -1 -n eth0
[This works!  Although it complains about dhclient-script not existing.  nash segfaults during parsing its output though.]

Bugs
====
1. /var/run should be created by mkinitrd.
2. -4 parameter to dhclient is invalid.  dhclient's man page is wrong, or bug?
3. eth0 should be brought up before dhclient?
4. dhcp-4.1.0 dhclient is broken in some way compared to 4.0.0?
5. nash segfaults because it cannot handle parsing the output of dhclient's output.  (Or maybe the output of dhcp 4.0.0 is different from 4.1.0.)
6. dhclient shouldn't complain about missing dhclient-script??

Comment 1 Hans de Goede 2009-02-03 10:49:32 UTC
A patch fixing this has been committed to mkinitrd's git, so this will be fixed in the next rawhide build, closing.