From bc22e918d56dc620ae75b0d5571ef8c540e5972c Mon Sep 17 00:00:00 2001 From: Nikhil Manchanda Date: Wed, 7 May 2014 23:46:01 -0700 Subject: [PATCH] Use public gateway for Trove if neutron is enabled Fix Trove to use the PUBLIC_NETWORK_GATEWAY if neutron is enabled. This is needed since in this case the guestagent is able to reach the devstack host only via the public PUBLIC_NETWORK_GATEWAY and not via the private NETWORK_GATEWAY. Change-Id: I61ee707e16d0222e7f479369e769cbe7ef2de7d7 --- lib/trove | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/trove b/lib/trove index 42d22198f3..86314700bf 100644 --- a/lib/trove +++ b/lib/trove @@ -21,8 +21,11 @@ set +o xtrace # Defaults # -------- - -NETWORK_GATEWAY=${NETWORK_GATEWAY:-10.0.0.1} +if is_service_enabled neutron; then + TROVE_HOST_GATEWAY=${PUBLIC_NETWORK_GATEWAY:-172.24.4.1} +else + TROVE_HOST_GATEWAY=${NETWORK_GATEWAY:-10.0.0.1} +fi # Set up default configuration TROVE_DIR=$DEST/trove @@ -152,7 +155,7 @@ function configure_trove { iniset $TROVE_CONF_DIR/trove.conf DEFAULT swift_url http://$SERVICE_HOST:8080/v1/AUTH_ iniset $TROVE_LOCAL_CONF_DIR/trove-guestagent.conf.sample DEFAULT rabbit_password $RABBIT_PASSWORD - sed -i "s/localhost/$NETWORK_GATEWAY/g" $TROVE_LOCAL_CONF_DIR/trove-guestagent.conf.sample + sed -i "s/localhost/$TROVE_HOST_GATEWAY/g" $TROVE_LOCAL_CONF_DIR/trove-guestagent.conf.sample setup_trove_logging $TROVE_CONF_DIR/trove.conf setup_trove_logging $TROVE_LOCAL_CONF_DIR/trove-guestagent.conf.sample