Skip to content

Commit

Permalink
fix: check ipv6 requirement before start
Browse files Browse the repository at this point in the history
(cherry picked from commit 5b973a8)
  • Loading branch information
oilbeater committed Nov 25, 2020
1 parent 186d90c commit cf4c412
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 0 deletions.
19 changes: 19 additions & 0 deletions dist/images/start-db.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,25 @@
#!/bin/bash
set -eo pipefail

# https://bugs.launchpad.net/neutron/+bug/1776778
if grep -q "3.10.0-862" /proc/version
then
echo "kernel version 3.10.0-862 has a nat related bug that will affect ovs function, please update to a version greater than 3.10.0-898"
exit 1
fi

# https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1794232
if [ ! -f "/proc/net/if_inet6" ] && grep -q "3.10" /proc/version ; then
echo "geneve requires ipv6, please add ipv6.disable=0 to kernel follow the instruction below:"
echo "
vi /etc/default/grub
find GRUB_CMDLINE_LINUX= and change ipv6.disable=1 to ipv6.disable=0
grub2-mkconfig -o /boot/grub2/grub.cfg
reboot
cat /proc/cmdline"
exit 1
fi

DB_NB_ADDR=${DB_NB_ADDR:-::}
DB_NB_PORT=${DB_NB_PORT:-6641}
DB_SB_ADDR=${DB_SB_ADDR:-::}
Expand Down
13 changes: 13 additions & 0 deletions dist/images/start-ovs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,26 @@ set -euo pipefail

HW_OFFLOAD=${HW_OFFLOAD:-false}
ENABLE_SSL=${ENABLE_SSL:-false}

# https://bugs.launchpad.net/neutron/+bug/1776778
if grep -q "3.10.0-862" /proc/version
then
echo "kernel version 3.10.0-862 has a nat related bug that will affect ovs function, please update to a version greater than 3.10.0-898"
exit 1
fi

# https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1794232
if [ ! -f "/proc/net/if_inet6" ] && grep -q "3.10" /proc/version ; then
echo "geneve requires ipv6, please add ipv6.disable=0 to kernel follow the instruction below:"
echo "
vi /etc/default/grub
find GRUB_CMDLINE_LINUX= and change ipv6.disable=1 to ipv6.disable=0
grub2-mkconfig -o /boot/grub2/grub.cfg
reboot
cat /proc/cmdline"
exit 1
fi

# wait for ovn-sb ready
function wait_ovn_sb {
if [[ -z "${OVN_SB_SERVICE_HOST}" ]]; then
Expand Down
2 changes: 2 additions & 0 deletions docs/install.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,12 @@ Kube-OVN includes two parts:
- Kubernetes >= 1.11
- Docker >= 1.12.6
- OS: CentOS 7.5/7.6/7.7, Ubuntu 16.04/18.04
- Kernel boot with `ipv6.disable=0`

*NOTE*
1. Ubuntu 16.04 users should build the related ovs-2.11.1 kernel module to replace the kernel built-in module
2. CentOS users should make sure kernel version is greater than 3.10.0-898 to avoid a kernel conntrack bug, see [here](https://bugs.launchpad.net/neutron/+bug/1776778)
3. Kernel must boot with ipv6 enabled, otherwise geneve tunnel will not be established due to a kernel bug, see [here](https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1794232)

## To Install

Expand Down

0 comments on commit cf4c412

Please sign in to comment.