Hide Forgot
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
# 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
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.