Bug 157872
Summary: | DHCP client fails on boot, successful when invoked manually | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Nathaniel McAuliffe <mcau1> | ||||||
Component: | kernel | Assignee: | Kernel Maintainer List <kernel-maint> | ||||||
Status: | CLOSED INSUFFICIENT_DATA | QA Contact: | Brian Brock <bbrock> | ||||||
Severity: | medium | Docs Contact: | |||||||
Priority: | medium | ||||||||
Version: | 3 | CC: | jvdias, mattdm, wtogami | ||||||
Target Milestone: | --- | ||||||||
Target Release: | --- | ||||||||
Hardware: | i386 | ||||||||
OS: | Linux | ||||||||
Whiteboard: | |||||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||||
Doc Text: | Story Points: | --- | |||||||
Clone Of: | Environment: | ||||||||
Last Closed: | 2008-02-11 18:29:05 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: | |||||||||
Attachments: |
|
Description
Nathaniel McAuliffe
2005-05-16 17:03:37 UTC
Please supply some further information . Do you have SELinux enabled ? Have you used system-config-network (or neat) to setup your interfaces ? What are the contents of your /etc/sysconfig/network-scripts/ifcfg-eth0 file ? In order for an interface X to be brought up during boot with DHCP, you must put the following in your /etc/sysconfig/network-scripts/ifcfg-X file: " DEVICE=X BOOTPROTO=DHCP ONBOOT=yes " where X is the name of the interface (eg. "eth0") . I cannot duplicate this problem - with dhcp-3.0.1-42_FC3 on FC3 with SELinux enabled, all my DHCP interfaces are brought up fine during boot - so your help in diagnosing the problem in your case would be appreciated. SELinux is enabled. eth0 was set up automatically during the install. I used system-config-network to manually delete the connection and the NIC. I then recreated everything manually. Contents of ifcgf-eth0: DEVICE=eth0 BOOTPROTO=dhcp ONBOOT=yes TYPE=Ethernet DHCP_HOSTNAME=fsucacti.ferris.edu USERCTL=no PEERDNS=yes IPV6INIT=no The card reports as a 3Com 3c980. Does the DHCP interface configuration succeed during boot if you boot with the kernel argument "selinux=no" ? ( you can set this from the initial boot grub screen, press <ESC> and then 'a', and then type 'selinux=no', and press return ). If so, please boot without the "selinux=no" argument, reproducing the problem, and run # audit2allow < /var/log/messages > /tmp/selinux_avc.log and append the /tmp/selinux_avc.log to this bug. If not, please check: - do you have "NETWORKING=yes" in /etc/sysconfig/network ? When you say DHCP configuration succeeds when dhclient is run manually, do you mean you ran the "/sbin/dhclient" command, or the "ifup eth0" command ? Does DHCP configuration succeed when you run the command "ifup eth0" as root ? The same things happen when I add "selinux=no" to the kernel arguments. Here is the output of selinux_avc.log: allow httpd_sys_script_t binfmt_misc_fs_t:filesystem getattr; allow httpd_sys_script_t devpts_t:filesystem getattr; allow httpd_sys_script_t httpd_log_t:file ioctl; allow httpd_sys_script_t proc_t:filesystem getattr; allow httpd_sys_script_t sysfs_t:filesystem getattr; allow httpd_sys_script_t tmpfs_t:filesystem getattr; allow httpd_sys_script_t usbfs_t:filesystem getattr; allow httpd_sys_script_t var_lib_nfs_t:dir search; allow httpd_sys_script_t var_t:dir getattr; allow mysqld_t var_log_t:file append; "NETWORKING=yes" in /etc/sysconfig/network does exist. ifup eth0 does not work. It produces the same results as boot. I still need to run dhclient afterwords. I am running the dhclient command. Created attachment 114463 [details]
debugging dhclient-script
Great! Thanks for the information. We've narrowed it down to a networks scripts problem . Please do the following. 1. Download the attached 'dhclient-script-dbg' debugging dhclient script file. 2. Install it: # mv /sbin/dhclient-script /sbin/dhclient-script-real # mv dhclient-script-dbg /sbin/dhclient-script # restorecon /sbin/dhclient-script # mkdir /tmp/dhcp # chcon /tmp/dhcp dhcpc_t 3. Run "ifup eth0" in debugging mode: (first bring it down): # ifdown eth0 # pkill dhclient # bash -xf /sbin/ifup eth0 2>&1 | tee /tmp/dhcp_ifup.log Whoops! I pressed return too soon. As I was saying: Once the ifup completes: # pkill dhclient # tar -xpvf - /tmp/dhcp* | gzip > dhcp_dbg.tar.gz Then please append the dhcp_dbg.tar.gz to this bug. (You can omit the "chcon" command above). And then don't forget to move /sbin/dhclient-script-real back to /sbin/dhclient-script ! Created attachment 114469 [details]
dhclient debugging results
Aha! We've found the problem : ethtool is failing to detect your ethernet card settings, while it is evident that there is no problem with your ethernet card or kernel driver module, as dhclient can bring it up fine if given the chance to run. I'm moving this bug to ethtool. This "ifup eth0" -x debug output shows ethtool is failing to detect the card (a 3Com 3c980 ?) status correctly : + echo -n 'Determining IP information for eth0...' Determining IP information for eth0...+ check_link_down eth0 + '[' -x /sbin/mii-tool -o -x /sbin/ethtool ']' + LC_ALL=C + ip link show dev eth0 + grep -q UP + ip link set dev eth0 up + timeout=0 + '[' 0 -le 10 ']' + check_mii_tool eth0 + '[' -x /sbin/mii-tool ']' ++ LC_ALL=C ++ mii-tool eth0 + output='eth0: 10 Mbit, half duplex, no link' + echo eth0: 10 Mbit, half duplex, no link + LC_ALL=C + grep -q 'link ok' + echo eth0: 10 Mbit, half duplex, no link + LC_ALL=C + grep -q 'no link' + return 0 + m=0 + check_ethtool eth0 + '[' -x /sbin/ethtool ']' ++ LC_ALL=C ++ ethtool eth0 + output='Settings for eth0: No data available' + echo Settings for eth0: No data available + LC_ALL=C + grep -q 'Link detected: yes' + echo Settings for eth0: No data available ... repeats I double checked the card itself and it is a 3c980B. Thanks! Do you have any udates? Fedora Core 3 is now maintained by the Fedora Legacy project for security updates only. If this problem is a security issue, please reopen and reassign to the Fedora Legacy product. If it is not a security issue and hasn't been resolved in the current FC5 updates or in the FC6 test release, reopen and change the version to match. Thank you! Fedora Core 3 is not maintained anymore. Setting status to "INSUFFICIENT_DATA". If you can reproduce this bug in the current Fedora release, please reopen this bug and assign it to the corresponding Fedora version. |