Change in vdsm[ovirt-3.6.3]: network: skip non-existent devices in _restore_disable_ipv6
osvoboda at redhat.com
osvoboda at redhat.com
Tue Mar 8 15:40:15 UTC 2016
Hello Dan Kenigsberg, Francesco Romani,
I'd like you to do a code review. Please visit
https://gerrit.ovirt.org/54478
to review the following change.
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
Reviewed-on: https://gerrit.ovirt.org/54455
Continuous-Integration: Jenkins CI
Reviewed-by: Dan Kenigsberg <danken at redhat.com>
Reviewed-on: https://gerrit.ovirt.org/54457
Reviewed-by: Francesco Romani <fromani at redhat.com>
---
M vdsm/vdsm-restore-net-config
1 file changed, 7 insertions(+), 1 deletion(-)
git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/78/54478/1
diff --git a/vdsm/vdsm-restore-net-config b/vdsm/vdsm-restore-net-config
index 5d22dde..0673179 100755
--- a/vdsm/vdsm-restore-net-config
+++ b/vdsm/vdsm-restore-net-config
@@ -367,7 +367,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/54478
To unsubscribe, visit https://gerrit.ovirt.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I08fcd502093507b7ad5a080da181d0c88a442f1e
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: ovirt-3.6.3
Gerrit-Owner: Ondřej Svoboda <osvoboda at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani at redhat.com>
More information about the vdsm-patches
mailing list