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 1020204 - netcf set BONDING_OPTS error, passing more single quote marks
Summary: netcf set BONDING_OPTS error, passing more single quote marks
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: netcf
Version: 7.0
Hardware: x86_64
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Laine Stump
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-10-17 09:32 UTC by Jincheng Miao
Modified: 2014-06-18 08:35 UTC (History)
6 users (show)

Fixed In Version: netcf-0.2.3-6.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-06-13 12:19:21 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Jincheng Miao 2013-10-17 09:32:23 UTC
Description of problem:
While define a nic bonding, libvirt will passing two more single quote marks to BONDING_OPTS in /etc/sysconfig/network-scripts/ifcfg-bond0.
It will cause ifup cann't set mode and primary in /sys/class/net/bond0/bonding/, in other word, bonding mode will not be set correctly.

Version-Release number of selected component (if applicable):
libvirt-1.1.1-9.el7.x86_64
qemu-kvm-rhev-1.5.3-7.el7.x86_64
netcf-0.2.3-4.el7.x86_64

How reproducible:
100%

Steps to Reproduce:

1. prepare a bond xml
# cat bond0.xml
<interface type='bond' name='bond0'>
   <start mode='onboot'/>
   <protocol family='ipv4'>
    <dhcp/>
   </protocol>
  <bond mode='active-backup'>
    <interface type='ethernet' name='em1'>
     </interface>
    <interface type='ethernet' name='em2'>
    </interface>
   </bond>
</interface>

2. define this nic bond
# virsh iface-define bond0.xml
Interface bond0 defined from bond0.xml

3. check BONDING_OPTS 
# cat /etc/sysconfig/network-scripts/ifcfg-bond0
DEVICE=bond0
ONBOOT=yes
BOOTPROTO=dhcp
BONDING_OPTS="'mode=active-backup primary=em1'" <=== look here

4. start bond
# virsh iface-start bond0
error: Failed to start interface bond0
error: internal error: failed to create (start) interface bond0: failed to execute external program - Running 'ifup bond0' failed with exit code 1: ./network-functions: line 460: /sys/class/net/bond0/bonding/'mode: No such file or directory
./network-functions: line 460: echo: write error: Invalid argument
./network-functions: line 460: /sys/class/net/bond0/bonding/'mode: No such file or directory
./network-functions: line 460: echo: write error: Invalid argument
./network-functions: line 460: /sys/class/net/bond0/bonding/'mode: No such file or directory
./network-functions: line 460: echo: write error: Invalid argument
./network-functions: line 460: /sys/class/net/bond0/bonding/'mode: No such file or directory
./network-functions: line 460: echo: write error: Invalid argument

Actual results:
ifup fails 

Expected results:
ifup successes

Comment 1 Laine Stump 2013-10-18 08:35:17 UTC
This bug had been reported against netcf for F19 and fixed upstream. Here is the upstream fix, which needs to be backported to the RHEL7 build of netcf:

commit 581ff3f252552cf5edc8e47c4a72667a39e133ba
Author: Satoru SATOH <ssato>
Date:   Wed Jul 3 13:17:27 2013 -0400

    remove extraneous quotes from BONDING_OPTS
    
    This fixes: https://bugzilla.redhat.com/show_bug.cgi?id=798851

Comment 5 Jincheng Miao 2014-01-24 08:22:32 UTC
# rpm -q netcf
netcf-0.2.3-6.el7.x86_64

# cat bond0.xml 
<interface type='bond' name='bond0'>
   <start mode='onboot'/>
   <protocol family='ipv4'>
    <dhcp/>
   </protocol>
  <bond mode='active-backup'>
    <interface type='ethernet' name='em4_1'>
     </interface>
    <interface type='ethernet' name='em4_2'>
    </interface>
   </bond>
</interface>

# ncftool define bond0.xml
Defined interface bond0

# cat /etc/sysconfig/network-scripts/ifcfg-bond0
DEVICE=bond0
ONBOOT=yes
BOOTPROTO=dhcp
BONDING_OPTS="mode=active-backup primary=em4_1"

The single quote marks are gone, the bug is fixed, so I change the status to VERIFEID

Comment 6 Ludek Smid 2014-06-13 12:19:21 UTC
This request was resolved in Red Hat Enterprise Linux 7.0.

Contact your manager or support representative in case you have further questions about the request.


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