Merge "Conditionally restore default route in setup_ipv6"
This commit is contained in:
commit
6a07960a70
@ -194,6 +194,7 @@ if [[ "$MANILA_SETUP_IPV6" == True ]]; then
|
|||||||
# regular Neutron DevStack configuration.
|
# regular Neutron DevStack configuration.
|
||||||
echo "NEUTRON_CREATE_INITIAL_NETWORKS=False" >> $localconf
|
echo "NEUTRON_CREATE_INITIAL_NETWORKS=False" >> $localconf
|
||||||
echo "IP_VERSION=4+6" >> $localconf
|
echo "IP_VERSION=4+6" >> $localconf
|
||||||
|
echo "MANILA_RESTORE_IPV6_DEFAULT_ROUTE=False" >> $localconf
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ "$DRIVER" == "generic"* ]]; then
|
if [[ "$DRIVER" == "generic"* ]]; then
|
||||||
|
@ -1013,8 +1013,12 @@ function install_libraries {
|
|||||||
|
|
||||||
function setup_ipv6 {
|
function setup_ipv6 {
|
||||||
|
|
||||||
|
# This will fail with multiple default routes and is not needed in CI
|
||||||
|
# but may be useful when developing with devstack locally
|
||||||
|
if [ $(trueorfalse False MANILA_RESTORE_IPV6_DEFAULT_ROUTE) == True ]; then
|
||||||
# save IPv6 default route to add back later after enabling forwarding
|
# save IPv6 default route to add back later after enabling forwarding
|
||||||
local default_route=$(ip -6 route | grep default | cut -d ' ' -f1,2,3,4,5)
|
local default_route=$(ip -6 route | grep default | cut -d ' ' -f1,2,3,4,5)
|
||||||
|
fi
|
||||||
|
|
||||||
# make sure those system values are set
|
# make sure those system values are set
|
||||||
sudo sysctl -w net.ipv6.conf.lo.disable_ipv6=0
|
sudo sysctl -w net.ipv6.conf.lo.disable_ipv6=0
|
||||||
@ -1137,12 +1141,16 @@ function setup_ipv6 {
|
|||||||
# log the systemd status
|
# log the systemd status
|
||||||
sudo systemctl status $QUAGGA_SERVICES
|
sudo systemctl status $QUAGGA_SERVICES
|
||||||
|
|
||||||
|
# This will fail with mutltiple default routes and is not needed in CI
|
||||||
|
# but may be useful when developing with devstack locally
|
||||||
|
if [ $(trueorfalse False MANILA_RESTORE_IPV6_DEFAULT_ROUTE) == True ]; then
|
||||||
# add default IPv6 route back
|
# add default IPv6 route back
|
||||||
if ! [[ -z $default_route ]]; then
|
if ! [[ -z $default_route ]]; then
|
||||||
# "replace" should ignore "RTNETLINK answers: File exists"
|
# "replace" should ignore "RTNETLINK answers: File exists"
|
||||||
# error if the route wasn't flushed by the bgp setup we did earlier.
|
# error if the route wasn't flushed by the bgp setup we did earlier.
|
||||||
sudo ip -6 route replace $default_route
|
sudo ip -6 route replace $default_route
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -210,6 +210,7 @@ MANILA_DATA_COPY_CHECK_HASH=${MANILA_DATA_COPY_CHECK_HASH:=True}
|
|||||||
|
|
||||||
# Manila IPv6 Setup flag
|
# Manila IPv6 Setup flag
|
||||||
MANILA_SETUP_IPV6=${MANILA_SETUP_IPV6:=False}
|
MANILA_SETUP_IPV6=${MANILA_SETUP_IPV6:=False}
|
||||||
|
MANILA_RESTORE_IPV6_DEFAULT_ROUTE=${MANILA_RESTORE_IPV6_DEFAULT_ROUTE:=True}
|
||||||
|
|
||||||
# Enable manila services
|
# Enable manila services
|
||||||
# ----------------------
|
# ----------------------
|
||||||
|
Loading…
Reference in New Issue
Block a user