Bug 1263013 - diskless boot configuration not naming bond as defined
diskless boot configuration not naming bond as defined
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: dracut (Show other bugs)
x86_64 Linux
high Severity high
: rc
: 6.6
Assigned To: Harald Hoyer
Release Test Team
Depends On:
Blocks: 1270825
  Show dependency treegraph
Reported: 2015-09-14 18:00 EDT by Joe Wright
Modified: 2016-05-10 21:09 EDT (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2016-05-10 21:09:43 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Joe Wright 2015-09-14 18:00:59 EDT
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:

Steps to Reproduce:

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
            # %{value:0:1} is replaced with non-bash specific construct
            if [ "${key}" = "arp_ip_target" -a "${#value}" != "0" -a "+${value%%+*}" != "+" ]; then
                for arp_ip in $value; do
                    echo +$arp_ip > /sys/class/net/${netif}/bonding/$key
                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 12:28:00 EDT
CCing customer Steven Frank on this bug
Comment 7 Jan Stodola 2016-02-25 12:30:14 EST
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:@ 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 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 brd 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-10 21:09:43 EDT
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.


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