Change in vdsm[master]: supervdsm: moving nics between bonds
edwardh at redhat.com
edwardh at redhat.com
Tue Dec 22 21:51:01 UTC 2015
Edward Haas has posted comments on this change.
Change subject: supervdsm: moving nics between bonds
......................................................................
Patch Set 6:
(3 comments)
https://gerrit.ovirt.org/#/c/50596/6/lib/vdsm/network/api.py
File lib/vdsm/network/api.py:
Line 715: _calculate_slaves_removed_from_bond(
: _netinfo.bondings[name]['slaves'],
: attrs.get('nics'))
I would directly use set(..) - set(..) here, less lines.
But it is your call.
Line 718: for removed_nic in deleted_slaves:
: removed_slaves.append(removed_nic)
removed_slaves |= deleted_slaves
* Some renaming is needed here..
* Assumes removed_slaves is a set.
https://gerrit.ovirt.org/#/c/50596/6/lib/vdsm/network/configurators/iproute2.py
File lib/vdsm/network/configurators/iproute2.py:
Line 191: self.configApplier.ifdown(bonding)
Line 192: else:
Line 193: self._setNewMtu(bonding, vlans.vlan_devs_for_iface(bonding.name))
Line 194:
Line 195: def removeNic(self, nic, force=False):
Looks like what works for ifcfg does not work here.
On ifcfg, removing a nic also removes it from the bond.
Here this is not the case, we need to remove it from the bond explicitly. (using removeBondSlave())
Maybe we should fix it in a following patch..
Line 196: toBeRemoved = not ifaceUsed(nic.name) or force
Line 197:
Line 198: if toBeRemoved:
Line 199: if nic.master is None:
--
To view, visit https://gerrit.ovirt.org/50596
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: Ia43fbfe90d1335ed4a740a1bc4f09610da2ecdce
Gerrit-PatchSet: 6
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Marcin Mirecki <mmirecki at redhat.com>
Gerrit-Reviewer: Alona Kaplan <alkaplan at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Edward Haas <edwardh at redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Ido Barkan <ibarkan at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Marcin Mirecki <mmirecki at redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>
Gerrit-HasComments: Yes
More information about the vdsm-patches
mailing list