Bug 1269175 - nic removed from bond can not be bound to another bond
nic removed from bond can not be bound to another bond
Status: CLOSED CURRENTRELEASE
Product: vdsm
Classification: oVirt
Component: SuperVDSM (Show other bugs)
4.14.0
Unspecified Unspecified
unspecified Severity low (vote)
: ovirt-4.0.0-alpha
: 4.17.999
Assigned To: Marcin Mirecki
Meni Yakove
:
: 1283528 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2015-10-06 10:08 EDT by Marcin Mirecki
Modified: 2016-07-05 03:59 EDT (History)
7 users (show)

See Also:
Fixed In Version: ovirt 4.0.0 alpha1
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-07-05 03:59:25 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: Network
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
rule-engine: ovirt‑4.0.0+
rule-engine: planning_ack+
rule-engine: devel_ack+
rule-engine: testing_ack+


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
oVirt gerrit 50596 master MERGED setupNetworks: moving nics between bonds 2016-02-04 04:10 EST

  None (edit)
Description Marcin Mirecki 2015-10-06 10:08:17 EDT
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 06:00:39 EDT
Stacktrace:
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 03:49:30 EDT
Marcin, Alona, is the problem in the engine logic or vdsm ?
Comment 3 Dan Kenigsberg 2015-11-23 05:51:46 EST
*** Bug 1283528 has been marked as a duplicate of this bug. ***
Comment 4 Marcin Mirecki 2015-12-16 08:52:54 EST
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. 
Example: 
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 08:36:48 EDT
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 03:59:25 EDT
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.