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
diff --git a/lib/trove b/lib/trove
index 42d2219..8631470 100644
--- a/lib/trove
+++ b/lib/trove
@@ -21,8 +21,11 @@
# 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 @@
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