Change in vdsm[ovirt-3.6]: config: Resolve crash when IPv6 disabled in kernel
Francesco Romani has submitted this change and it was merged. Change subject: config: Resolve crash when IPv6 disabled in kernel .. config: Resolve crash when IPv6 disabled in kernel The configuration for creating the management bridge attempts to do some things with IPv6 which causes an uncaught exception when IPv6 is disabled at the kernel level with `ipv6.disable=1`. This patch checks that IPv6 is actually available before attempting to do anything with it. Change-Id: I774cac868ddee08ac072adf2104a811594779052 Bug-Url: https://bugzilla.redhat.com/1277204 Backport-To: 3.6 Signed-off-by: Ollie ArmstrongSigned-off-by: Ondřej Svoboda Reviewed-on: https://gerrit.ovirt.org/47978 Continuous-Integration: Jenkins CI Reviewed-by: Ido Barkan Reviewed-by: Dan Kenigsberg Reviewed-on: https://gerrit.ovirt.org/50457 Reviewed-by: Francesco Romani --- M lib/vdsm/netinfo.py M vdsm/network/configurators/ifcfg.py M vdsm/network/configurators/iproute2.py 3 files changed, 14 insertions(+), 2 deletions(-) Approvals: Ido Barkan: Looks good to me, but someone else must approve Ondřej Svoboda: Verified Jenkins CI: Passed CI tests Dan Kenigsberg: Looks good to me, approved Francesco Romani: Looks good to me, approved -- To view, visit https://gerrit.ovirt.org/50457 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: I774cac868ddee08ac072adf2104a811594779052 Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: ovirt-3.6 Gerrit-Owner: Ondřej Svoboda Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Francesco Romani Gerrit-Reviewer: Ido Barkan Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Ondřej Svoboda Gerrit-Reviewer: gerrit-hooks ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[ovirt-3.6]: config: Resolve crash when IPv6 disabled in kernel
gerrit-hooks has posted comments on this change. Change subject: config: Resolve crash when IPv6 disabled in kernel .. Patch Set 2: * #1277204::Update tracker: OK * Set MODIFIED::bug 1277204#1277204OK -- To view, visit https://gerrit.ovirt.org/50457 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I774cac868ddee08ac072adf2104a811594779052 Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: ovirt-3.6 Gerrit-Owner: Ondřej SvobodaGerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Francesco Romani Gerrit-Reviewer: Ido Barkan Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Ondřej Svoboda Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[ovirt-3.6]: config: Resolve crash when IPv6 disabled in kernel
Francesco Romani has posted comments on this change. Change subject: config: Resolve crash when IPv6 disabled in kernel .. Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.ovirt.org/50457 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I774cac868ddee08ac072adf2104a811594779052 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: ovirt-3.6 Gerrit-Owner: Ondřej SvobodaGerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Francesco Romani Gerrit-Reviewer: Ido Barkan Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Ollie Armstrong Gerrit-Reviewer: Ondřej Svoboda Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[ovirt-3.6]: config: Resolve crash when IPv6 disabled in kernel
Dan Kenigsberg has posted comments on this change. Change subject: config: Resolve crash when IPv6 disabled in kernel .. Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.ovirt.org/50457 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I774cac868ddee08ac072adf2104a811594779052 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: ovirt-3.6 Gerrit-Owner: Ondřej SvobodaGerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Ido Barkan Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Ollie Armstrong Gerrit-Reviewer: Ondřej Svoboda Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[ovirt-3.6]: config: Resolve crash when IPv6 disabled in kernel
Ondřej Svoboda has posted comments on this change. Change subject: config: Resolve crash when IPv6 disabled in kernel .. Patch Set 1: Verified+1 Tested just like the patch from master: Booted up with ipv6.disabled=1 and succeeded to set up a bridged network with no IPv6 configuration. -- To view, visit https://gerrit.ovirt.org/50457 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I774cac868ddee08ac072adf2104a811594779052 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: ovirt-3.6 Gerrit-Owner: Ondřej SvobodaGerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Ido Barkan Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Ollie Armstrong Gerrit-Reviewer: Ondřej Svoboda Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[ovirt-3.6]: config: Resolve crash when IPv6 disabled in kernel
Ido Barkan has posted comments on this change. Change subject: config: Resolve crash when IPv6 disabled in kernel .. Patch Set 1: Code-Review+1 -- To view, visit https://gerrit.ovirt.org/50457 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I774cac868ddee08ac072adf2104a811594779052 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: ovirt-3.6 Gerrit-Owner: Ondřej SvobodaGerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Ido Barkan Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Ollie Armstrong Gerrit-Reviewer: Ondřej Svoboda Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[ovirt-3.6]: config: Resolve crash when IPv6 disabled in kernel
gerrit-hooks has posted comments on this change. Change subject: config: Resolve crash when IPv6 disabled in kernel .. Patch Set 1: * #1277204::Update tracker: OK * Check Bug-Url::OK * Check Public Bug::#1277204::OK, public bug * Check Product::#1277204::OK, Correct classification oVirt * Check TM::#1277204::OK, correct target milestone ovirt-3.6.2 * Check merged to previous::OK, change not open on any previous branch -- To view, visit https://gerrit.ovirt.org/50457 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I774cac868ddee08ac072adf2104a811594779052 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: ovirt-3.6 Gerrit-Owner: Ondřej SvobodaGerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Ido Barkan Gerrit-Reviewer: Ollie Armstrong Gerrit-Reviewer: gerrit-hooks Gerrit-HasComments: No ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches
Change in vdsm[ovirt-3.6]: config: Resolve crash when IPv6 disabled in kernel
Hello Ido Barkan, Ollie Armstrong, Dan Kenigsberg, I'd like you to do a code review. Please visit https://gerrit.ovirt.org/50457 to review the following change. Change subject: config: Resolve crash when IPv6 disabled in kernel .. config: Resolve crash when IPv6 disabled in kernel The configuration for creating the management bridge attempts to do some things with IPv6 which causes an uncaught exception when IPv6 is disabled at the kernel level with `ipv6.disable=1`. This patch checks that IPv6 is actually available before attempting to do anything with it. Change-Id: I774cac868ddee08ac072adf2104a811594779052 Bug-Url: https://bugzilla.redhat.com/1277204 Backport-To: 3.6 Signed-off-by: Ollie ArmstrongSigned-off-by: Ondřej Svoboda Reviewed-on: https://gerrit.ovirt.org/47978 Continuous-Integration: Jenkins CI Reviewed-by: Ido Barkan Reviewed-by: Dan Kenigsberg --- M lib/vdsm/netinfo.py M vdsm/network/configurators/ifcfg.py M vdsm/network/configurators/iproute2.py 3 files changed, 14 insertions(+), 2 deletions(-) git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/57/50457/1 diff --git a/lib/vdsm/netinfo.py b/lib/vdsm/netinfo.py index f1932ee..fd5b209 100644 --- a/lib/vdsm/netinfo.py +++ b/lib/vdsm/netinfo.py @@ -337,6 +337,18 @@ return ipv4addr, ipv4netmask, ipv4addrs, ipv6addrs +@memoized +def ipv6_supported(): +""" +Check if IPv6 is disabled by kernel arguments (or even compiled out). +""" +try: +socket.socket(socket.AF_INET6, socket.SOCK_DGRAM) +except socket.error: +return False +return True + + def gethwaddr(dev): with open('/sys/class/net/%s/address' % dev) as addr: return addr.read().strip() diff --git a/vdsm/network/configurators/ifcfg.py b/vdsm/network/configurators/ifcfg.py index 3990212..12b0b14 100644 --- a/vdsm/network/configurators/ifcfg.py +++ b/vdsm/network/configurators/ifcfg.py @@ -100,7 +100,7 @@ self._addSourceRoute(bridge) _ifup(bridge) if not bridge.ipv6.address and not bridge.ipv6.ipv6autoconf and ( -not bridge.ipv6.dhcpv6): +not bridge.ipv6.dhcpv6 and netinfo.ipv6_supported()): wait_for_device(bridge.name) sysctl.disable_ipv6(bridge.name) diff --git a/vdsm/network/configurators/iproute2.py b/vdsm/network/configurators/iproute2.py index 4f58fba..ffc69ad 100644 --- a/vdsm/network/configurators/iproute2.py +++ b/vdsm/network/configurators/iproute2.py @@ -76,7 +76,7 @@ DynamicSourceRoute.addInterfaceTracking(bridge) self.configApplier.setIfaceConfigAndUp(bridge) if not bridge.ipv6.address and not bridge.ipv6.ipv6autoconf and ( -not bridge.ipv6.dhcpv6): +not bridge.ipv6.dhcpv6 and netinfo.ipv6_supported()): wait_for_device(bridge.name) sysctl.disable_ipv6(bridge.name) self._addSourceRoute(bridge) -- To view, visit https://gerrit.ovirt.org/50457 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I774cac868ddee08ac072adf2104a811594779052 Gerrit-PatchSet: 1 Gerrit-Project: vdsm Gerrit-Branch: ovirt-3.6 Gerrit-Owner: Ondřej Svoboda Gerrit-Reviewer: Dan Kenigsberg Gerrit-Reviewer: Ido Barkan Gerrit-Reviewer: Ollie Armstrong ___ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches