Change in vdsm[ovirt-3.6]: net: use the correct dict with all the networks for disable_...

osvoboda at redhat.com osvoboda at redhat.com
Tue Feb 23 20:07:53 UTC 2016


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

Change subject: net: use the correct dict with all the networks for disable_ipv6 restoration
......................................................................

net: use the correct dict with all the networks for disable_ipv6 restoration

In a backport it was shown that using only the networks that require
restoration is not sufficient.

In this 3.6 version tobool() is used because unified persistence is not
stored and normalized as well as in 4.0.

Change-Id: If49f549d91c54cb7b3c31a23436008dc1c622682
Bug-Url: https://bugzilla.redhat.com/1219363
Signed-off-by: Ondřej Svoboda <osvoboda at redhat.com>
---
M vdsm/vdsm-restore-net-config
1 file changed, 5 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/42/53942/1

diff --git a/vdsm/vdsm-restore-net-config b/vdsm/vdsm-restore-net-config
index 1074d11..479d92e 100755
--- a/vdsm/vdsm-restore-net-config
+++ b/vdsm/vdsm-restore-net-config
@@ -38,7 +38,7 @@
 from vdsm.netconfpersistence import RunningConfig, PersistentConfig, \
     KernelConfig, CONF_PERSIST_DIR, BaseConfig
 from vdsm import sysctl
-from vdsm.utils import monotonic_time
+from vdsm.utils import monotonic_time, tobool
 import hostdev
 
 # Ifcfg persistence restoration
@@ -137,7 +137,7 @@
                       'and bond (%s).', nets, bonds)
         setupNetworks(nets, bonds, connectivityCheck=False, _inRollback=True)
     if ipv6_supported():
-        _restore_disable_ipv6(nets)
+        _restore_disable_ipv6(available_config.networks)
 
 
 def _verify_all_devices_are_up(owned_ifcfg_files):
@@ -353,8 +353,9 @@
     been restored. This is implemented for unified persistence only.
     """
     for net, net_attr in six.iteritems(networks):
-        if net_attr.get('bridged') and not net_attr.get('ipv6addr') and not (
-                net_attr.get('ipv6autoconf')) and not net_attr.get('dhcpv6'):
+        if tobool(net_attr.get('bridged')) and not net_attr.get('ipv6addr') \
+                and not tobool(net_attr.get('ipv6autoconf')) and not \
+                tobool(net_attr.get('dhcpv6')):
             # _wait_for_for_all_devices_up has already run, so assuming up
             sysctl.disable_ipv6(net)
 


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

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


More information about the vdsm-patches mailing list