Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 153669 - initscripts ignore ONBOOT=no at system boot, when further variables are defined
Summary: initscripts ignore ONBOOT=no at system boot, when further variables are defined
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: initscripts
Version: 4.0
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
: ---
Assignee: Bill Nottingham
QA Contact: Brock Organ
URL:
Whiteboard:
Depends On:
Blocks: 156320 156322
TreeView+ depends on / blocked
 
Reported: 2005-04-04 20:50 UTC by Robert Scheck
Modified: 2014-03-17 02:53 UTC (History)
6 users (show)

Fixed In Version: RHBA-2005-607
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2005-10-05 15:47:30 UTC


Attachments (Terms of Use)
patch for this issue (deleted)
2005-05-10 17:01 UTC, Bill Nottingham
no flags Details | Diff


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2005:606 qe-ready SHIPPED_LIVE initscripts/hotplug bug fix update 2005-09-28 04:00:00 UTC
Red Hat Product Errata RHBA-2005:607 qe-ready SHIPPED_LIVE initscripts and hotplug bug fix update 2005-10-05 04:00:00 UTC

Description Robert Scheck 2005-04-04 20:50:13 UTC
Description of problem:
initscripts ignore ONBOOT=no at system boot, when further network specific 
variables are defined.

Version-Release number of selected component (if applicable):
initscripts-7.93.11.EL-1

How reproducible:
Everytime, see below.

Steps to Reproduce:
1. /etc/sysconfig/network-scripts/ifcfg-eth0 should contain:
--- snipp ---
DEVICE=eth0
BOOTPROTO=static
BROADCAST=192.168.31.255
HWADDR=00:00:1A:19:65:C6
IPADDR=192.168.24.194
NETMASK=255.255.248.0
NETWORK=192.168.24.0
ONBOOT=no
TYPE=Ethernet
--- snapp ---

2. /etc/sysconfig/network-scripts/ifcfg-eth1 should contain:
--- snipp ---
DEVICE=eth1
BOOTPROTO=static
HWADDR=00:00:1A:19:65:C5
TYPE=Ethernet
ONBOOT=yes
IPADDR=10.208.225.47
NETMASK=255.255.225.0
NETWORK=10.208.225.0
BROADCAST=10.208.225.255
GATEWAY=10.208.225.3
--- snapp ---

3. Do a "service network restart" and review the result using "ip addr show";
   everything is okay, eth1 is set up.
4. Reboot the system and review it again, eth0 _and_ eth1 are set up (and this 
   is simply wrong)!
5. Do a further "service network restart" and review again - everything okay,
   as expected.

6. Replace the content of /etc/sysconfig/network-scripts/ifcfg-eth0 with (same 
   as at point 1 with some comments):
--- snipp ---
DEVICE=eth0
BOOTPROTO=static
#BROADCAST=192.168.31.255
HWADDR=00:00:1A:19:65:C6
#IPADDR=192.168.24.194
#NETMASK=255.255.248.0
#NETWORK=192.168.24.0
ONBOOT=no
TYPE=Ethernet
--- snapp ---

7. Reboot the system again and see, that everything is as expected (eth1 up).
8. Ask the question, why ONBOOT=no seems to be completely ignored, if network 
   specific values are set.

Actual results:
initscripts ignore ONBOOT=no at system boot, when further network specific 
variables are defined.

Expected results:
The initscripts shouldn't ignore ONBOOT=no, even if the configuration files 
are set up like (1) and (2). Could we please get a working update for our
customers and us?

Additional info:
This problem maybe also applies to Fedora Core Development.

Comment 1 Bill Nottingham 2005-04-05 18:19:10 UTC
What sorts of devices are these?

Comment 2 Robert Scheck 2005-04-05 20:46:06 UTC
device: eth0
driver: tg3
desc: "Broadcom Corporation NetXtreme BCM5704 Gigabit Ethernet"
network.hwaddr: 00:00:1A:19:65:C6
vendorId: 14e4
deviceId: 1648
subVendorId: 1022
subDeviceId: 36c0

device: eth1
driver: tg3
desc: "Broadcom Corporation NetXtreme BCM5704 Gigabit Ethernet"
network.hwaddr: 00:00:1A:19:65:C5
vendorId: 14e4
deviceId: 1648
subVendorId: 1022
subDeviceId: 36c0

Comment 3 Bill Nottingham 2005-04-06 03:30:01 UTC
Before any interfaces are brought up, if you load the module, is ...:C6 eth1,
and ...:C5 eth0?

Comment 4 Robert Scheck 2005-04-06 05:41:16 UTC
The system is a Red Hat Enterprise Linux 4 default installation.

From /etc/modprobe.conf:
alias eth0 tg3
alias eth1 tg3
[...]

Comment 5 Bill Nottingham 2005-04-06 17:15:11 UTC
Yes, I'm just curious if you turn off hotplug, bring down the network, unload
the module, and reload it, if the interfaces are reversed.

Comment 6 Robert Scheck 2005-04-07 14:03:12 UTC
Bill for comment #3: eth0 is ...:C6 and eth1 is ...:C5 further on and they 
don't switch. BTW, tell me what you like to see for "turn off hotplug", maybe
I made something wrong.

But testing this I got another way to reproduce my problem, maybe this helps 
you:

1. /etc/sysconfig/network-scripts/ifcfg-eth0 should contain:
--- snipp ---
DEVICE=eth0
BOOTPROTO=static
BROADCAST=192.168.31.255
HWADDR=00:00:1A:19:65:C6
IPADDR=192.168.24.194
NETMASK=255.255.248.0
NETWORK=192.168.24.0
ONBOOT=no
TYPE=Ethernet
--- snapp ---

2. /etc/sysconfig/network-scripts/ifcfg-eth1 should contain:
--- snipp ---
DEVICE=eth1
BOOTPROTO=static
HWADDR=00:00:1A:19:65:C5
TYPE=Ethernet
ONBOOT=yes
IPADDR=10.208.225.47
NETMASK=255.255.225.0
NETWORK=10.208.225.0
BROADCAST=10.208.225.255
GATEWAY=10.208.225.3
--- snapp ---

3. Do a "service network restart" and review the result using "ip addr show";
   everything is okay, eth1 is set up.
4. Do "rmmod tg3" and after that a "modprobe tg3"; review it again, eth0 and 
   eth1 are set up.
5. Do a further "service network restart" and review again - everything okay,
   as expected.

Comment 7 Bill Nottingham 2005-04-07 19:17:10 UTC
The interface being brought up on module re-load is due to hotplug. The network
script disables hotplug (echo /bin/true > /proc/sys/kernel/hotplug) while it's
running.

Comment 8 Robert Scheck 2005-04-12 17:43:26 UTC
Yes, I saw the difference between enabled and disabled hotplug. But ...:C6 
always was eth0 and ...:C5 was eth1 - they didn't change at any time.

Comment 9 Cove Schneider 2005-04-20 19:13:51 UTC
I am having what I believe is the same problem, where ONBOOT=no is ignored on my eth0:x aliases. If I 
have ifcfg-eth0 and ifcfg-eth0:0, where ifcfg-eth0:0 has ONBOOT=no set, eth0:0 is brought up anyway 
at boot. This is with initscripts-7.31.18.EL-1.

Comment 10 Bill Nottingham 2005-04-20 19:48:07 UTC
That's not the same issue... aliases use ONPARENT=(yes|no).

Comment 11 Cove Schneider 2005-04-20 21:03:02 UTC
I opened a new bug and reported it there instead. (bug 155497)

Comment 12 David Kewley 2005-04-29 19:32:35 UTC
Bill:

I do not have a problem with onboot, but I wanted to report what I see using the
"turn off hotplug & reload module" test you described.

I have two bugs open currently.  Bug 155522 describes problems that appear to be
related most closely to system-config-network-tui.  Bug 156402 describes a weird
ethernet device name, and the results of my test of the "hotplug off & reload" test.

As most directly relates to the present bug, the results of the "hotplug off &
reload" test were that eth0 got the first MAC and eth1 got the second MAC. 
Previously, eth0 got the second MAC and eth1 (misnamed, not "eth1") got the
first MAC.

So maybe the devices are getting misordered when hotplug is involved?  I also
saw misordering on another RHEL4 machine, but I was able to fix it manually
(editing the relevant files).

Comment 13 Bill Nottingham 2005-05-10 17:01:50 UTC
Created attachment 114210 [details]
patch for this issue

Try this. What I believe is happening is that the fix for token-ring (#90602,
#127984) causes link addresses to be found for more interface types. When the
sit0 interface initializes, it triggers a hotplug event, where it finds a
hwaddr of '0'; since that matches the beginning of the hwaddr for one of your
ethernet devices, that is brought up.

Comment 15 Robert Scheck 2005-05-18 07:15:27 UTC
Thank you Bill, this patch works for us. Is it now possible to get an official 
update of initscripts (maybe together with other fixes) or is RHEL4 U1 coming 
very soon?

Comment 16 Bill Nottingham 2005-05-18 15:18:50 UTC
This is currently scheduled for U2.

Comment 21 Bill Nottingham 2005-07-01 21:11:22 UTC
Fixed in 7.31.24.EL-1 for RHEL 3.

Comment 22 Bill Nottingham 2005-07-01 21:16:59 UTC
Fixed in 7.93.14.EL-1 for RHEL-4.

Comment 23 Bill Nottingham 2005-07-25 18:10:06 UTC
*** Bug 163073 has been marked as a duplicate of this bug. ***

Comment 24 Red Hat Bugzilla 2005-09-28 15:56:21 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2005-606.html


Comment 25 Red Hat Bugzilla 2005-10-05 15:47:30 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2005-607.html


Comment 26 Leroy van Logchem 2007-10-05 09:00:06 UTC
This type of behaviour still exists when using aliased interfaces:

http://bugs.centos.org/view.php?id=2363

Fix:

--- /etc/sysconfig/network-scripts/ifup-aliases.bug 2007-09-27
11:29:40.000000000 +0200
+++ /etc/sysconfig/network-scripts/ifup-aliases 2007-09-27 11:30:23.000000000 +0200
@@ -321,6 +321,7 @@ for FILE in ifcfg-${parent_device}:* ; d
        is_ignored_file "$FILE" && continue
        ini_env;
        . $FILE;
+ [ "${ONBOOT}" = "no" -o "${ONBOOT}" = "NO" ] && continue
        [ -z "$DEVICE" ] && DEVICE=${FILE##ifcfg-}
        [ "$ONPARENT" != "no" -a "$ONPARENT" != "NO" ] && new_interface;
        unset DEVICE




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