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.
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
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
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.
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