Bug 1269175 - nic removed from bond can not be bound to another bond
Summary: nic removed from bond can not be bound to another bond
Alias: None
Product: vdsm
Classification: oVirt
Component: SuperVDSM
Version: 4.14.0
Hardware: Unspecified
OS: Unspecified
Target Milestone: ovirt-4.0.0-alpha
: 4.17.999
Assignee: Marcin Mirecki
QA Contact: Meni Yakove
: 1283528 (view as bug list)
Depends On:
TreeView+ depends on / blocked
Reported: 2015-10-06 14:08 UTC by Marcin Mirecki
Modified: 2016-07-05 07:59 UTC (History)
7 users (show)

Fixed In Version: ovirt 4.0.0 alpha1
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2016-07-05 07:59:25 UTC
oVirt Team: Network
rule-engine: ovirt-4.0.0+
rule-engine: planning_ack+
rule-engine: devel_ack+
rule-engine: testing_ack+

Attachments (Terms of Use)

System ID Private Priority Status Summary Last Updated
oVirt gerrit 50596 0 master MERGED setupNetworks: moving nics between bonds 2020-10-23 13:31:24 UTC

Description Marcin Mirecki 2015-10-06 14:08:17 UTC
Description of problem:
In host setup networks dialog:
When a nic is removed from a bond and added to a new bond, an error is shown: "Error while executing action HostSetupNetworks: Interface already in use"

Steps to Reproduce:
1. Create a bond with 3 slaves. Submit
2. Open setupnetworks dialog.
3. Remove one nic from the bond.
4. Use this nic to create another bond
5. Submit -> Error

Comment 1 Marcin Mirecki 2015-10-13 10:00:39 UTC
Traceback (most recent call last):
  File "/usr/share/vdsm/supervdsmServer", line 111, in wrapper
    res = func(*args, **kwargs)
  File "/usr/share/vdsm/supervdsmServer", line 218, in setupNetworks
    return setupNetworks(networks, bondings, **options)
  File "/usr/share/vdsm/network/api.py", line 899, in setupNetworks
    _handleBondings(bondings, configurator, in_rollback)
  File "/usr/share/vdsm/network/api.py", line 646, in _handleBondings
    destroyOnMasterRemoval='remove' in attrs)
  File "/usr/share/vdsm/network/models.py", line 279, in objectivize
    mtu, _netinfo)
  File "/usr/share/vdsm/network/models.py", line 268, in _objectivizeSlaves
    (nic, nicVlans or nicNet or nicBond))
ConfigNetworkError: (24, u'nic ens11 already used by bond0')

Comment 2 Barak 2015-10-15 07:49:30 UTC
Marcin, Alona, is the problem in the engine logic or vdsm ?

Comment 3 Dan Kenigsberg 2015-11-23 10:51:46 UTC
*** Bug 1283528 has been marked as a duplicate of this bug. ***

Comment 4 Marcin Mirecki 2015-12-16 13:52:54 UTC
This happened because removing, editing and adding of slaves to a bond was done bond by bond, so if a nic was added to a bond which was handled before the bond from which the nic was removed the operation failed. 
bond0: nic0, nic1 => nic2, nic3 
bond1: nic2, nic3 => nic0, nic1 
In this situation first bond0 is processed: nic0 and nic1 will be removed, but nic2 and nic3 can not yet be removed as they are part of bond1 (validation fails). Processing of bond1 will introduce errors, as nic2 and nic3 will be removed (already assigned to bond0), which will in effect reset their ifcfg files, and cause the previous attachment to bond0 to be undone.

Comment 5 Michael Burman 2016-04-10 12:36:48 UTC
Verified on - 4.0.0-0.0.master.20160404161620.git4ffd5a4.el7.centos and vdsm-4.17.999-900.giteba4b25.el7.centos.noarch

Comment 6 Sandro Bonazzola 2016-07-05 07:59:25 UTC
oVirt 4.0.0 has been released, closing current release.

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