Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 1136337

Summary: Creation of bonds with similar names fails
Product: Red Hat Enterprise Linux 6 Reporter: Lukáš Nykrýn <lnykryn>
Component: initscriptsAssignee: Lukáš Nykrýn <lnykryn>
Status: CLOSED ERRATA QA Contact: Jan Ščotka <jscotka>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.6CC: extras-qa, jch, john.haxby, jonathan, jsvarova, lnykryn, psklenar, vpavlin, zbyszek
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: initscripts-9.03.47-1.el6 Doc Type: Bug Fix
Doc Text:
Fix: Yet another fix for detecting if the bonding device is already up.
Story Points: ---
Clone Of: 1136016 Environment:
Last Closed: 2015-07-22 07:18:37 UTC Type: Bug
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: 1136016, 1136339    
Bug Blocks:    

Description Lukáš Nykrýn 2014-09-02 11:28:56 UTC
+++ This bug was initially created as a clone of Bug #1136016 +++

Description of problem:


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

--- Additional comment from john.haxby on 2014-09-01 15:25:32 CEST ---

[I'm not sure how that initial empty description got created.  Sorry.]

Description of problem:

If you create a bond whose name is a substring of an existing bond, then the new bond will not be created.  This is because install_bonding_driver() in /etc/sysconfig/network-scripts/network-functions contains the test "grep -sq "$1" /sys/class/net/bonding_masters".

Version-Release number of selected component (if applicable):
    initscripts-9.51-2.fc20.x86_64


How reproducible: Always.  Easily reproduced with a slightly contrived example.


Steps to Reproduce:
1.  Create /etc/sysconfig/network-/scripts/ifcfg-bond1 and ifcfg-bond11 like this:

    DEVICE=bond1
    TYPE=Bond
    BONDING_MASTER=yes
    BOOTPROTO=none
    ONBOOT=yes
    BONDING_OPTS="miimon=100 mode=802.3ad"

ifcfg-bond11 is the same except that the DEVCIE is, of course, bond11.

2. ifup bond11
3. ifup bond1

Actual results:

bond11 comes up, bond1 reports errors:

./network-functions: line 439: /sys/class/net/bond1/bonding/slaves: No such file or directory
./network-functions: line 439: [: too many arguments
./network-functions: line 439: /sys/class/net/bond1/bonding/slaves: No such file or directory
./network-functions: line 439: [: too many arguments
ERROR    : [/etc/sysconfig/network-scripts/ifup-eth] Device bond1 does not seem to be present, delaying initialisation.


Expected results: both bonds come up


Additional info:

As I say, this is a contrived example.   Interfaces are normally brought up in lexical order so bond1 would come up first and bond11 afterwards.   The fix is easy and not even worth a patch file:   change "grep -sq" to "fgrep -sqx"

--- Additional comment from john.haxby on 2014-09-01 16:26:29 CEST ---

I noticed that commit e956710ffda24a569460688f99a1d410328bbc61 is a partial fix for this problem.  If uses "grep -sqw" but there's no reason why I shouldn't call my bonds bond1 and bond1.89fe (that's closer to the original problem I had).

Changing to fgrep -x both avoids that problem and the possible problem with regexp matches.

--- Additional comment from john.haxby on 2014-09-01 16:47:34 CEST ---

This is a patch against the git master rather than the current F20 version.   It doesn't need to change much to become a patch against F20.

Comment 1 John Haxby 2014-09-18 13:48:02 UTC
Note that the patch uses "fgrep" and not "grep" to avoid ambiguity between, for exmaple, "bond.1" and "bond11"

Comment 5 errata-xmlrpc 2015-07-22 07:18:37 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2015-1380.html