Browse code

Ensure that ip_forwarding is always enabled for compute and network

Libvirt gets this in most cases, but it can be disabled. This is
belts + suspenders + super glue...

Fixes bug 885274

Change-Id: Ifb8d627689800b23cce02a623caa525cd17e507d

Dean Troyer authored on 2012/03/08 07:47:56
Showing 1 changed files
... ...
@@ -886,6 +886,9 @@ if is_service_enabled n-cpu; then
886 886
     # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
887 887
     apt_get install libvirt-bin
888 888
 
889
+    # Force IP forwarding on, just on case
890
+    sudo sysctl -w net.ipv4.ip_forward=1
891
+
889 892
     # attempt to load modules: network block device - used to manage qcow images
890 893
     sudo modprobe nbd || true
891 894
 
... ...
@@ -967,6 +970,9 @@ if is_service_enabled n-net; then
967 967
     clean_iptables
968 968
     rm -rf $NOVA_DIR/networks
969 969
     mkdir -p $NOVA_DIR/networks
970
+
971
+    # Force IP forwarding on, just on case
972
+    sudo sysctl -w net.ipv4.ip_forward=1
970 973
 fi
971 974
 
972 975
 # Storage Service