Antoni Segura Puimedon has uploaded a new change for review.
Change subject: Fix editing a bond with a nic when no ifcfg files exist
..
Fix editing a bond with a nic when no ifcfg files exist
With the previous ordering, if bond0 existed (modprobe bonding
creates bond0 for example) and we had to remove a nic from it
it, initscripts would fail to ifup the removed nic due to missing
ifcfg-bond0. This addresses the issue.
Change-Id: I619680ac3846e317e269d46d722a39e9cbf3c36b
Signed-off-by: Antoni S. Puimedon asegu...@redhat.com
---
M vdsm/netconf/ifcfg.py
1 file changed, 4 insertions(+), 4 deletions(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/07/20107/1
diff --git a/vdsm/netconf/ifcfg.py b/vdsm/netconf/ifcfg.py
index 248d077..193c3c8 100644
--- a/vdsm/netconf/ifcfg.py
+++ b/vdsm/netconf/ifcfg.py
@@ -103,10 +103,6 @@
currentNics = frozenset(_netinfo.getNicsForBonding(bond.name))
nicsToAdd = nicsToSet - currentNics
-for nic in currentNics - nicsToSet:
-ifdown(nic) # So that no users will be detected for it.
-Nic(nic, self, _netinfo=_netinfo).remove()
-
# Create bond configuration in case it was a non ifcfg controlled bond.
# Needed to be before slave configuration for initscripts to add slave
# to bond.
@@ -120,6 +116,10 @@
self.configApplier.addBonding(bond)
bondIfcfgWritten = True
+for nic in currentNics - nicsToSet:
+ifdown(nic) # So that no users will be detected for it.
+Nic(nic, self, _netinfo=_netinfo).remove()
+
for slave in bond.slaves:
if slave.name in nicsToAdd:
ifdown(slave.name) # nics must be down to join a bond
--
To view, visit http://gerrit.ovirt.org/20107
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I619680ac3846e317e269d46d722a39e9cbf3c36b
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Antoni Segura Puimedon asegu...@redhat.com
___
vdsm-patches mailing list
vdsm-patches@lists.fedorahosted.org
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches