Escalated to Bugzilla from IssueTracker
Event posted on 2009-11-17 16:20 GMT by james.masson There is a bug in the RHEL 5.4 networking scripts where by a network bond will not be created if a bond that includes the new bond name already exists. For example, you will not be able to create bond20 if bond200 exists. Example, creating bond200 before bond20: [root@localhost ~]# ifup bond200 [root@localhost ~]# ifup bond20 Error for wireless request "Set Encode" (8B2A) : SET failed on device bond20 ; Invalid argument. SIOCGIFFLAGS: No such device Creating bond20 before bond200: [root@localhost ~]# ifup bond20 [root@localhost ~]# ifup bond200 This is caused by /etc/sysconfig/network-scripts/network-functions:217 215: is_available () 216: { 217: LC_ALL= LANG= ip -o link | grep -q $1 218: [ "$?" = "1" ] || return 0 If bond200 exists, this will be matched by grep for bond20 and the bond will not be created. A more accurate way of testing for the existance of the bond would be to: if [ -d "/sys/class/net/$1" ]; then return 0 ; fi Patch: — /etc/sysconfig/network-scripts/network-functions 2007-06-22 21:14:42.000000000 +0000 +++ ./network-functions 2009-11-17 14:37:26.000000000 +0000 @@ -214,8 +214,9 @@ # Sets $alias to the device module if $? != 0 is_available () { - LC_ALL= LANG= ip -o link | grep -q $1 - [ “$?” = “1″ ] || return 0 + if [ -d “/sys/class/net/$1″ ]; then + return 0 ; + fi alias=$(modprobe -c | awk \ ‘BEGIN { alias = “”; } This event sent from IssueTracker by mpoole [Support Engineering Group] issue 366695
Event posted on 2009-11-19 15:34 GMT by mpoole A quick review of the network-functions script suggests that are at least a couple of extra places where this issue could occur. I will escalate this to BZ for engineering review since the potential for further unintended consequences after change is high. This event sent from IssueTracker by mpoole [Support Engineering Group] issue 366695
In addition to the specific line mentioned there are at least two other unbound search attempt in the network-functions script. The first is at the end of the same is_available script. Given the identical nature of the code whichever is the correct fix is probably a candidate for a sub-function. The other candidate I can see would be the use of the ifconfig -a | grep in the check_device_down () function since this could also erroneously trigger with a short search matching a long name. A related thought here being why not call the ifconfig with the device parameter directly rather than taking all the output ?
Fixed upstream at http://git.fedorahosted.org/git/?p=initscripts.git;a=commitdiff;h=fd6c8abcfab9a555ab2805850c091a94cfc82a72
This request was evaluated by Red Hat Product Management for inclusion in a Red Hat Enterprise Linux maintenance release. Product Management has requested further review of this request by Red Hat Engineering, for potential inclusion in a Red Hat Enterprise Linux Update release for currently deployed products. This request is not yet committed for inclusion in an Update release.
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 therefore 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-2011-0075.html