Bug 462049
Summary: | /etc/sysconfig/network-scripts/ifup-eth make the slave interface disabled | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 5 | Reporter: | Jason Luo <jason.luo> |
Component: | initscripts | Assignee: | initscripts Maintenance Team <initscripts-maint-list> |
Status: | CLOSED DUPLICATE | QA Contact: | Brock Organ <borgan> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 5.2 | CC: | joe.jin, notting |
Target Milestone: | rc | ||
Target Release: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2008-09-12 13:54:47 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: |
Description
Jason Luo
2008-09-12 08:15:13 UTC
In the scripts /etc/sysconfig/network-scripts/ifup-eth, it use /sbin/ip to disable the slave interface(eth2 or eth3), then attach the interface to the bonding interface(bond0), but, slave eth0 is already enslaved! so kernel wouldn't do anything for it(now,the interface is disabled). this patch will resolve it. --- initscripts-8.45.19.EL/sysconfig/network-scripts/ifup-eth.orig 2008-09-12 15:19:12.000000000 +0800 +++ initscripts-8.45.19.EL/sysconfig/network-scripts/ifup-eth 2008-09-12 15:57:57.000000000 +0800 @@ -105,6 +105,14 @@ # slave device? if [ "${SLAVE}" = yes -a "${ISALIAS}" = no -a "${MASTER}" != "" ]; then + if LC_ALL=C grep "${DEVICE}" /sys/class/net/${MASTER}/bonding/slaves > /dev/null 2>&1 ; then + if /sbin/ip -o link show up ${DEVICE} | grep UP > /dev/null 2>&1; then + exit 0 + fi + echo "-${DEVICE}" > /sys/class/net/${MASTER}/bonding/slaves 2>/dev/null + sleep 2 + fi + /sbin/ip link set dev ${DEVICE} down echo "+${DEVICE}" > /sys/class/net/${MASTER}/bonding/slaves 2>/dev/null *** This bug has been marked as a duplicate of bug 440077 *** Sorry I could not check bug 440077, is the patch like below? --- a/sysconfig/network-scripts/ifup-eth 2008-03-12 05:48:05.000000000 +0800 +++ b/sysconfig/network-scripts/ifup-eth 2008-04-04 23:40:30.000000000 +0800 @@ -117,9 +117,10 @@ # slave device? if [ "${SLAVE}" = yes -a "${ISALIAS}" = no -a "${MASTER}" != "" ]; then - /sbin/ip link set dev ${DEVICE} down - echo "+${DEVICE}" > /sys/class/net/${MASTER}/bonding/slaves 2>/dev/null - + grep -wq "${DEVICE}" /sys/class/net/${MASTER}/bonding/slaves || { + /sbin/ip link set dev ${DEVICE} down + echo "+${DEVICE}" > /sys/class/net/${MASTER}/bonding/slaves 2>/dev/null + } if [ -n "$ETHTOOL_OPTS" ] ; then /sbin/ethtool -s ${REALDEVICE} $ETHTOOL_OPTS fi If yes, I have checked the latest initscripts and found the patch have merged, but the patch could not solved the bug, with Jason's patch would solved the bug. Would you please add me to CC list of bug 440077? Thanks. It's essentially like that, yes. |