Change in vdsm[master]: ifcfg: perform blocking dhcp when in rollback

asegurap at redhat.com asegurap at redhat.com
Thu Jun 19 10:36:01 UTC 2014


Antoni Segura Puimedon has uploaded a new change for review.

Change subject: ifcfg: perform blocking dhcp when in rollback
......................................................................

ifcfg: perform blocking dhcp when in rollback

When rolling back configuration, be it on boot or due to loss of
connectivity, it is best to know if something goes wrong as early as
possible. One important part of this is knowing if ifup (and
specially its dhclient component) succeeded.

Change-Id: I5b9614ed8fb2404ccfffb72e08be4f76eb366db9
Signed-off-by: Antoni S. Puimedon <asegurap at redhat.com>
---
M vdsm/network/configurators/ifcfg.py
1 file changed, 4 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/35/28935/1

diff --git a/vdsm/network/configurators/ifcfg.py b/vdsm/network/configurators/ifcfg.py
index 7a97736..5064c95 100644
--- a/vdsm/network/configurators/ifcfg.py
+++ b/vdsm/network/configurators/ifcfg.py
@@ -82,13 +82,13 @@
         if bridge.port:
             bridge.port.configure(**opts)
         self._addSourceRoute(bridge)
-        ifup(bridge.name, bridge.ipConfig.async)
+        ifup(bridge.name, False if self._inRollback else bridge.ipConfig.async)
 
     def configureVlan(self, vlan, **opts):
         self.configApplier.addVlan(vlan, **opts)
         vlan.device.configure(**opts)
         self._addSourceRoute(vlan)
-        ifup(vlan.name, vlan.ipConfig.async)
+        ifup(vlan.name, False if self._inRollback else vlan.ipConfig.async)
 
     def configureBond(self, bond, **opts):
         self.configApplier.addBonding(bond, **opts)
@@ -98,7 +98,7 @@
         for slave in bond.slaves:
             slave.configure(**opts)
         self._addSourceRoute(bond)
-        ifup(bond.name, bond.ipConfig.async)
+        ifup(bond.name, False if self._inRollback else bond.ipConfig.async)
         if self.unifiedPersistence:
             self.runningConfig.setBonding(
                 bond.name, {'options': bond.options,
@@ -151,7 +151,7 @@
         if nic.bond is None:
             if not netinfo.isVlanned(nic.name):
                 ifdown(nic.name)
-            ifup(nic.name, nic.ipConfig.async)
+            ifup(nic.name, False if self._inRollback else nic.ipConfig.async)
 
     def removeBridge(self, bridge):
         DynamicSourceRoute.addInterfaceTracking(bridge)


-- 
To view, visit http://gerrit.ovirt.org/28935
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5b9614ed8fb2404ccfffb72e08be4f76eb366db9
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Antoni Segura Puimedon <asegurap at redhat.com>


More information about the vdsm-patches mailing list