Bugzilla (bugzilla.redhat.com) will be under maintenance for infrastructure upgrades and will not be unavailable on July 31st between 12:30 AM - 05:30 AM UTC. We appreciate your understanding and patience. You can follow status.redhat.com for details.
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
Alias: None
Product: Red Hat Enterprise Linux Advanced Virtualization
Classification: Red Hat
Component: netcf
Version: 8.0
Hardware: x86_64
OS: Unspecified
Target Milestone: rc
: ---
Assignee: Laine Stump
QA Contact: chhu
Depends On:
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:
Last Closed: 2020-11-09 21:24:35 UTC
Type: Bug
Target Upstream Version:

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]

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

Version-Release number of selected component (if applicable):

How reproducible:

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 is already in use for device bond0...
Error, some other host (00:1B:21:39:8B:18) already uses address"

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]

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.