Bug 714080

Summary: debug option for bonding can not be used in BONDING_OPTS in /etc/sysconfig/network-scripts/ifcfg-bondX
Product: Red Hat Enterprise Linux 5 Reporter: Julio Entrena Perez <jentrena>
Component: doc-Deployment_GuideAssignee: Jaromir Hradilek <jhradile>
Status: CLOSED ERRATA QA Contact: ecs-bugs
Severity: medium Docs Contact:
Priority: medium    
Version: 5.6CC: cww, jentrena, mhideo
Target Milestone: rcKeywords: Documentation
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-02-21 05:19:22 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 668957, 719046    

Description Julio Entrena Perez 2011-06-17 10:32:17 UTC
> Description of problem:

Documentation states that all bonding options should be used in BONDING_OPTS in the corresponding /etc/sysconfig/network-scripts/ifcfg-bondX file:

* /usr/share/doc/kernel-doc-2.6.18/Documentation/networking/bonding.txt :

"The options specified in BONDING_OPTS are identical to the bonding module parameters except for the arp_ip_target field when using versions of initscripts older than and 8.57 (Fedora 8) and 8.45.19 (Red Hat Enterprise Linux 5.2).  When using older versions each target should be included as a separate option and should be preceded by a '+' to indicate it should be added to the list of queried targets,".

* http://docs.redhat.com/docs/en-US/Red_Hat_Enterprise_Linux/5/html/Deployment_Guide/s2-networkscripts-interfaces-chan.html :

"Important: put all bonding module parameters in ifcfg-bondN files
Parameters for the bonding kernel module must be specified as a space-separated list in the BONDING_OPTS="<bonding parameters>" directive in the ifcfg-bond<N> interface file. They should not be placed in /etc/modprobe.conf. For further instructions and advice on configuring the bonding module and to view the list of bonding parameters, refer to Section 42.5.2, “The Channel Bonding Module”.".

But the debug=1 option for the bonding kernel module can not be specified on a per interface basis.

> Version-Release number of selected component (if applicable):
* kernel-doc 2.6.18-238.12.1.el5 (/usr/share/doc/kernel-doc-2.6.18/Documentation/networking/bonding.txt).
and
* RHEL5 Deployment Guide (15.2.3. Channel Bonding Interfaces).

> How reproducible:
Always.

> Steps to Reproduce:
1. Include the "debug=1" option in BONDING_OPTS of any /etc/sysconfig/network-scripts/ifcfg-bondX.
2. Restart the network service:
#service network restart
  
> Actual results:
# service network restart
Shutting down interface bond0: [ OK ]
Shutting down interface bond1: [ OK ]
Shutting down loopback interface: [ OK ]
Bringing up loopback interface: [ OK ]
Bringing up interface bond0: /etc/sysconfig/network-scripts/ifup-eth: line 126: /sys/class/net/bond0/bonding/debug: Permission denied
[ OK ]
Bringing up interface bond1: [ OK ] 

The documentation is wrong about every bonding module option being in BONDING_OPTS in /etc/sysconfig/network-scripts/ifcfg-bondX, since this is not the case for the debug option.

> Expected results:
# service network restart
Shutting down interface bond0: [ OK ]
Shutting down interface bond1: [ OK ]
Shutting down loopback interface: [ OK ]
Bringing up loopback interface: [ OK ]
Bringing up interface bond0: [ OK ]
Bringing up interface bond1: [ OK ] 

The documentation should mention that the debug option can only be specified at /etc/modprobe.conf as "options bonding debug=1" and can not be used on a per interface basis.

> Additional info:
/etc/sysconfig/network-scripts/ifup-eth expects every option in BONDING_OPTS to have its corresponding entry in /sys/class/net/bondX/bonding/:

114     # add the bits to setup driver parameters here
115     for arg in $BONDING_OPTS ; do
116         key=${arg%%=*};
117         value=${arg##*=};
118         if [ "${key}" = "arp_ip_target" -a "${value:0:1}" != "+" ]; then
119             OLDIFS=$IFS;
120             IFS=',';
121             for arp_ip in $value; do
122                 echo +$arp_ip > /sys/class/net/${DEVICE}/bonding/$key
123             done
124             IFS=$OLDIFS;
125         else
126             echo $value > /sys/class/net/${DEVICE}/bonding/$key
127         fi
128     done

But debug doesn't have a /sys/class/net/bondX/bonding/debug entry because it can not be specified on a per interface basis, nor it can be enabled or disabled on the fly, but only at module load time.

The debug option for bonding should be specified in /etc/modprobe.conf as "options bonding debug=1" instead.

Comment 1 Michael Hideo 2011-08-11 21:18:36 UTC
Jaromir, can you please action this.

Comment 2 Jaromir Hradilek 2011-08-22 10:38:19 UTC
Many thanks for reporting this. I am going to fix this as soon as possible.

Comment 7 errata-xmlrpc 2012-02-21 05:19:22 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.

http://rhn.redhat.com/errata/RHBA-2012-0178.html