From 36d5af85f4a99259dd4b4ab2365114b486586ca7 Mon Sep 17 00:00:00 2001 From: Roger Luethi Date: Sun, 14 Sep 2014 21:35:03 +0200 Subject: [PATCH] labs: make sysctl configuration survive reboots Sysctl configuration set with "sysctl -w" does not survive reboots. Edit /etc/sysctl.conf instead (and reload file with sysctl -p). Change-Id: Icf0191774e0d1b8f65345cc980460ec8f86d7153 --- labs/scripts/setup_neutron_compute.sh | 9 +++++++-- labs/scripts/setup_neutron_network.sh | 11 ++++++++--- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/labs/scripts/setup_neutron_compute.sh b/labs/scripts/setup_neutron_compute.sh index 76b52af0..7013c037 100755 --- a/labs/scripts/setup_neutron_compute.sh +++ b/labs/scripts/setup_neutron_compute.sh @@ -13,8 +13,13 @@ indicate_current_auto #------------------------------------------------------------------------------ echo "Disabling Reverse Path Forwarding filter (RFC 3704)." -sudo sysctl -w "net.ipv4.conf.all.rp_filter=0" -sudo sysctl -w "net.ipv4.conf.default.rp_filter=0" +cat << SYSCTL | sudo tee -a /etc/sysctl.conf +net.ipv4.conf.all.rp_filter=0 +net.ipv4.conf.default.rp_filter=0 +SYSCTL + +# Reload changed file +sudo sysctl -p echo "Installing neutron for compute node." sudo apt-get install -y neutron-common neutron-plugin-ml2 \ diff --git a/labs/scripts/setup_neutron_network.sh b/labs/scripts/setup_neutron_network.sh index 464b05be..f315c4d8 100755 --- a/labs/scripts/setup_neutron_network.sh +++ b/labs/scripts/setup_neutron_network.sh @@ -12,9 +12,14 @@ indicate_current_auto #------------------------------------------------------------------------------ echo "Disabling Reverse Path Forwarding filter (RFC 3704)." -sudo sysctl -w "net.ipv4.conf.all.rp_filter=0" -sudo sysctl -w "net.ipv4.conf.default.rp_filter=0" -sudo sysctl -w "net.ipv4.ip_forward=1" +cat << SYSCTL | sudo tee -a /etc/sysctl.conf +net.ipv4.conf.all.rp_filter=0 +net.ipv4.conf.default.rp_filter=0 +net.ipv4.ip_forward=1 +SYSCTL + +# Reload changed file +sudo sysctl -p echo "Installing neutron for network node." sudo apt-get install -y neutron-common neutron-plugin-ml2 \