Change in vdsm[master]: netconf: Skip source routing cfg files when restoring device...

wudxw at linux.vnet.ibm.com wudxw at linux.vnet.ibm.com
Mon Jul 22 14:07:56 UTC 2013


Mark Wu has uploaded a new change for review.

Change subject: netconf: Skip source routing cfg files when restoring devices
......................................................................

netconf: Skip source routing cfg files when restoring devices

_sortModifiedIfcfgs() uses the cfg files under '/etc/sysconfig/network-scripts'
to get the devices which should be stopped and started during rollback. But the
backed up files could also include source routing cfg files after the source routing
feature was added. So this patch skips those files when it gets the devices list.

Change-Id: I6f72bd29f5f9d4f5d02d8cd2e19675d00eac4600
Signed-off-by: Mark Wu <wudxw at linux.vnet.ibm.com>
---
M vdsm/netconf/ifcfg.py
1 file changed, 2 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/13/17213/1

diff --git a/vdsm/netconf/ifcfg.py b/vdsm/netconf/ifcfg.py
index 8e79301..c338722 100644
--- a/vdsm/netconf/ifcfg.py
+++ b/vdsm/netconf/ifcfg.py
@@ -320,6 +320,8 @@
                    'Slave': [],
                    'Other': []}
         for confFile, _ in self._backups.iteritems():
+            if not confFile.startswith(netinfo.NET_CONF_PREF):
+                continue
             try:
                 content = file(confFile).read()
             except IOError as e:


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

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6f72bd29f5f9d4f5d02d8cd2e19675d00eac4600
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Mark Wu <wudxw at linux.vnet.ibm.com>


More information about the vdsm-patches mailing list