From bb352da3024844b71dcaacb866c3b464c50408a6 Mon Sep 17 00:00:00 2001 From: Sheng Yang Date: Wed, 19 Nov 2014 14:25:57 -0800 Subject: [PATCH] CLOUDSTACK-7944: Ensure ipv6 is enabled in sysctl.conf The booting sequence result in change of IPv6 related sysctl options was overrided by sysctl.conf which is loaded later. So this patch would patch sysctl.conf in VR as well, ensure IPv6 would be enabled during booting period otherwise the network setup may not work, result in IPv6 VM deployment failure. --- .../patches/debian/config/etc/init.d/cloud-early-config | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/systemvm/patches/debian/config/etc/init.d/cloud-early-config b/systemvm/patches/debian/config/etc/init.d/cloud-early-config index 9942f2df0d5..11d0612beab 100755 --- a/systemvm/patches/debian/config/etc/init.d/cloud-early-config +++ b/systemvm/patches/debian/config/etc/init.d/cloud-early-config @@ -398,12 +398,16 @@ setup_interface_ipv6() { sysctl net.ipv6.conf.all.disable_ipv6=0 sysctl net.ipv6.conf.all.forwarding=1 sysctl net.ipv6.conf.all.accept_ra=1 - + + sed -i "s/net.ipv6.conf.all.disable_ipv6 =.*$/net.ipv6.conf.all.disable_ipv6 = 0/" /etc/sysctl.conf + sed -i "s/net.ipv6.conf.all.forwarding =.*$/net.ipv6.conf.all.forwarding = 1/" /etc/sysctl.conf + sed -i "s/net.ipv6.conf.all.accept_ra =.*$/net.ipv6.conf.all.accept_ra = 1/" /etc/sysctl.conf + local intfnum=$1 local ipv6="$2" local prelen="$3" local intf=eth${intfnum} - + echo "iface $intf inet6 static" >> /etc/network/interfaces echo " address $ipv6 " >> /etc/network/interfaces echo " netmask $prelen" >> /etc/network/interfaces