From 7a7fb49b155c6efa5c5545ffe2a66f5f5e116f02 Mon Sep 17 00:00:00 2001 From: Christian Berendt Date: Mon, 7 Apr 2014 13:31:07 +0000 Subject: [PATCH] only remove network states from Nova when n-net is enabled When n-net is not enabled but q-dhcp is enabled then it's not necessary to remove the states directory of nova-network. Change-Id: Ib4b37aa7df2b3cda3048b278ddad24e87e3744c9 --- stack.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/stack.sh b/stack.sh index c715a8526b..4de79bb0eb 100755 --- a/stack.sh +++ b/stack.sh @@ -1001,9 +1001,13 @@ if is_service_enabled n-net q-dhcp; then fi clean_iptables - rm -rf ${NOVA_STATE_PATH}/networks - sudo mkdir -p ${NOVA_STATE_PATH}/networks - safe_chown -R ${USER} ${NOVA_STATE_PATH}/networks + + if is_service_enabled n-net; then + rm -rf ${NOVA_STATE_PATH}/networks + sudo mkdir -p ${NOVA_STATE_PATH}/networks + safe_chown -R ${USER} ${NOVA_STATE_PATH}/networks + fi + # Force IP forwarding on, just in case sudo sysctl -w net.ipv4.ip_forward=1 fi