Change in vdsm[master]: network: skip non-existent devices in _restore_disable_ipv6

osvoboda at redhat.com osvoboda at redhat.com
Tue Mar 8 09:01:52 UTC 2016


Ondřej Svoboda has uploaded a new change for review.

Change subject: network: skip non-existent devices in _restore_disable_ipv6
......................................................................

network: skip non-existent devices in _restore_disable_ipv6

Broken networks are handled gracefully by other parts of the restoration flow
(and covered by testRestoreNetworksOnlyRestoreUnchangedDevices). Let's follow
suit and don't try to disable_ipv6 on missing devices.

Change-Id: I08fcd502093507b7ad5a080da181d0c88a442f1e
Signed-off-by: Ondřej Svoboda <osvoboda at redhat.com>
Bug-Url: https://bugzilla.redhat.com/1219363
Backport-To: 3.6.3
---
M vdsm/vdsm-restore-net-config
1 file changed, 7 insertions(+), 1 deletion(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/55/54455/1

diff --git a/vdsm/vdsm-restore-net-config b/vdsm/vdsm-restore-net-config
index 977f6fc..62a7122 100755
--- a/vdsm/vdsm-restore-net-config
+++ b/vdsm/vdsm-restore-net-config
@@ -371,7 +371,13 @@
     for filename in _owned_ifcfg_files():
         device = _ifcfg_dev_name(filename)
         if not _ipv6_ifcfg(device):
-            sysctl.disable_ipv6(device)
+            try:
+                sysctl.disable_ipv6(device)
+            except IOError as e:
+                if e.errno == errno.ENOENT:
+                    pass  # the network is broken, but we have to handle it
+                else:
+                    raise
 
 
 def _owned_ifcfg(link_name):


-- 
To view, visit https://gerrit.ovirt.org/54455
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I08fcd502093507b7ad5a080da181d0c88a442f1e
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Ondřej Svoboda <osvoboda at redhat.com>


More information about the vdsm-patches mailing list