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 1263013 - diskless boot configuration not naming bond as defined
Summary: diskless boot configuration not naming bond as defined
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: dracut
Version: 6.6
Hardware: x86_64
OS: Linux
high
high
Target Milestone: rc
: 6.6
Assignee: Harald Hoyer
QA Contact: Release Test Team
URL:
Whiteboard:
Depends On:
Blocks: 1270825
TreeView+ depends on / blocked
 
Reported: 2015-09-14 22:00 UTC by Joe Wright
Modified: 2019-08-15 05:25 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-05-11 01:09:43 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:0954 0 normal SHIPPED_LIVE dracut bug fix and enhancement update 2016-05-10 22:56:39 UTC

Description Joe Wright 2015-09-14 22:00:59 UTC
Description of problem:
- Bond interface designated 'bond1' is being named 'bond0'
- In 97parse-bond.sh

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


How reproducible:
100%

Steps to Reproduce:
1.
2.
3.

Actual results:

In that script the main work is done in the if/then statement that begins at line 45.  it performs a getarg and then calls the routine parsebond(). In that routine, there is a case statement that parses based on the number of positional arguments.  If the bond name were passed correctly to that routine, it should parse out bondname=bond1, bondslaves=eth4,eth5 and bondoptions="mode=1"

Instead it appears to parse bondslaves and bondoptions correctly but not bondname.  It defaults to bondname=bond0 since $bondname is null.


Looking at /sbin/ifup:
------------------------------------------
# start bond if needed
if [ -e /tmp/bond.info ]; then
    . /tmp/bond.info

    if [ "$netif" = "$bondname" ] && [ ! -e /tmp/net.$bondname.up ] ; then # We are master bond device
        modprobe bonding          <<============= bond0 is created automatically
        ip link set $netif down

        # Stolen from ifup-eth
        # add the bits to setup driver parameters here
        for arg in $bondoptions ; do
            key=${arg%%=*};
            value=${arg##*=};
            # %{value:0:1} is replaced with non-bash specific construct
            if [ "${key}" = "arp_ip_target" -a "${#value}" != "0" -a "+${value%%+*}" != "+" ]; then
                OLDIFS=$IFS;
                IFS=',';
                for arp_ip in $value; do
                    echo +$arp_ip > /sys/class/net/${netif}/bonding/$key
                done
                IFS=$OLDIFS;
            else
                echo $value > /sys/class/net/${netif}/bonding/$key <<===== It tries to set the bonding option here.
${netif} is the value of bondname in /tmp/bond.info. It's bond1. But, /sys/class/net/bond1 is not available, and it failed.


If the following command is done in advance, bond1 should have created in /sys/class/net

   echo +bond1 >/sys/class/net/bonding_masters

But, it's not executed in it. So, you cannot use the name 'bond1'.


Expected results:
- Unsure- what is the expected behavior based on looking at the two functions? - The desired end result would be to name the interface 'bond1'
- Are the 'consistent naming' rules in udev also at play here?

Additional info:
The desired end result is to have a system booting diskless to take the following network configuration:

- bond1
  - interfaces eth4 and 5
  - mode: active-backup
  - interface named 'bond1'

What we need is:
1: Is naming a bond a specific name possible in the diskless boot environment?
2: If so, how is this done? Are we encountering a bug?

Comment 2 Joe Wright 2015-09-24 16:28:00 UTC
CCing customer Steven Frank on this bug

Comment 7 Jan Stodola 2016-02-25 17:30:14 UTC
Reproduced on RHEL-6.7.
Verified with dracut-004-399.el6, system booted using bond1 network device:

[root@localhost ~]# cat /proc/cmdline 
ro root=UUID=d8896235-e354-42f6-8938-0c8c0504b287 rd_NO_LUKS iscsi_initiator=iqn.2005-03.org.open-iscsi:client rd_NO_LVM LANG=en_US.UTF-8 netroot=iscsi:@192.168.122.228::3260::iqn.2003-01.org.linux-iscsi:test rd_NO_MD SYSFONT=latarcyrheb-sun16  KEYBOARDTYPE=pc KEYTABLE=us bond=bond1:eth0,eth1:mode=1 ip=bond1:dhcp rd_NO_DM
[root@localhost ~]# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN 
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master bond1 state UP qlen 1000
    link/ether 52:54:00:91:ac:b1 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::5054:ff:fe91:acb1/64 scope link 
       valid_lft forever preferred_lft forever
3: eth1: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master bond1 state UP qlen 1000
    link/ether 52:54:00:91:ac:b1 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::5054:ff:fe91:acb1/64 scope link 
       valid_lft forever preferred_lft forever
4: bond0: <BROADCAST,MULTICAST,MASTER> mtu 1500 qdisc noop state DOWN 
    link/ether 9a:f4:40:3f:d1:48 brd ff:ff:ff:ff:ff:ff
5: bond1: <BROADCAST,MULTICAST,MASTER,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP 
    link/ether 52:54:00:91:ac:b1 brd ff:ff:ff:ff:ff:ff
    inet 192.168.122.98/24 brd 192.168.122.255 scope global bond1
    inet6 fe80::5054:ff:fe91:acb1/64 scope link tentative dadfailed 
       valid_lft forever preferred_lft forever
[root@localhost ~]# cat /sys/class/net/bond1/bonding/slaves 
eth0 eth1
[root@localhost ~]#

Moving to VERIFIED.

Comment 9 errata-xmlrpc 2016-05-11 01:09:43 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-2016-0954.html


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