Bug 1410675 - Can't create bond if copying configuration from ethernet in virt-manager
Summary: Can't create bond if copying configuration from ethernet in virt-manager
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux Advanced Virtualization
Classification: Red Hat
Component: netcf
Version: 8.0
Hardware: x86_64
OS: Unspecified
medium
medium
Target Milestone: rc
: ---
Assignee: Laine Stump
QA Contact: chhu
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-01-06 04:30 UTC by mxie@redhat.com
Modified: 2020-11-09 21:24 UTC (History)
7 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-11-09 21:24:35 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
bond-copy (10.74 KB, text/plain)
2017-01-06 04:30 UTC, mxie@redhat.com
no flags Details
bond-dhcp (5.32 KB, text/plain)
2017-01-06 04:30 UTC, mxie@redhat.com
no flags Details

Description mxie@redhat.com 2017-01-06 04:30:22 UTC
Created attachment 1237855 [details]
bond-copy

Description of problem:
Can't create bond if copying configuration from ethernet in virt-manager

Version-Release number of selected component (if applicable):
virt-manager-0.9.0-33.el6.x86_64
libvirt-0.10.2-62.el6.x86_64
python-virtinst-0.600.0-30.el6.noarch
qemu-kvm-rhev-0.12.1.2-2.499.el6.x86_64


How reproducible:
100%

Steps to Reproduce:

1.Stop NetworkManager service
# service NetworkManager stop
2. Launch virt-manager  and click Edit->connection details
3.Click Network Interfaces tab ,make sure that there are active eth1 and eth2 in the device list 
4.Click "+" to create a new bond, select "bond" in interface type, start mode as 'onboot', enable activate now,choose eth1 and eth2 to bond, at this time ,IP setting will be setted as "copy configuration from eth1"
5.Click "Forward" and "Finish" button,then will fail to create bond0 with below error. details pls refer to log "bond-copy"

"Error creating interface: 'Could not create interface: internal error failed to create (start) interface bond0: failed to execute external program - Running 'ifup bond0' failed with exit code 1: Determining if ip address 10.66.4.177 is already in use for device bond0...
Error, some other host (00:1B:21:39:8B:18) already uses address 10.66.4.177."

Actual results:
Can't create bond if copying configuration from ethernet in virt-manager

Expected results:
Can create bond successfully when copying configuration from ethernet in virt-manager

Additional info :
1.If setting IP setting as "DHCP" at step4, will create bond0 successfully, pls refer to log "bond-dhcp"
2.Can't reproduce this problem on rhel7.3

Comment 1 mxie@redhat.com 2017-01-06 04:30:53 UTC
Created attachment 1237856 [details]
bond-dhcp

Comment 3 Pavel Hrdina 2017-01-09 12:26:27 UTC
That error message comes from netcf so moving to that component.

This happens only if the eth1/eth2 used to configure the bond interface is up.

Comment 4 Laine Stump 2017-01-09 16:51:10 UTC
This is due to the fact that netcf is being told to ifup the bond without being told to ifdown the individual ethernet interfaces first.

In the case of creating a bridge, this happens to work because the underlying infrastructure (initscripts) doesn't ifup the attached devices (e.g. the physical ethernet) when it ifup's the bridge, so netcf has to ifup the attached devices itself - this means that the ethernet device is already ifup'ed without its old IP address by the netcf separate ifup's the bridge device.

But for a bond device, initscripts treats the entire set of devices as a single unit, so all that netcf does is ifup the bond itself; apparently initscripts tries to set the IP address of the bond prior to reconfiguring the ethernet devices (or maybe it doesn't remove the IP address of the ethernet device as part of the ifup for the ethernet).

It's possible this could be solved within netcf by forcing an ifdown of all the slaves of a bond prior to ifup'ing the bond. If not, (or if that creates unwanted side effects) then I think this will be outside the scope of what netcf can do.

Comment 5 Jaroslav Suchanek 2017-01-23 16:51:54 UTC
Lets address this in next rhel7 release.


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