summaryrefslogtreecommitdiff
path: root/devstack
diff options
context:
space:
mode:
authorAmrith Kumar <amrith@tesora.com>2015-06-03 11:28:48 -0400
committerAmrith Kumar <amrith@tesora.com>2015-06-03 12:00:54 -0400
commit19c088b5e0160155ef974a0e1e46a60e781fe225 (patch)
treeba7ebffddab347ee53ee6f74f4c9e4e045a83899 /devstack
parent040511900f0c1acd6367e6fda1c998b94305b190 (diff)
downloadtrove-19c088b5e0160155ef974a0e1e46a60e781fe225.tar.gz
Update devstack to handle Trove/Neutron setups
Default Trove configuration (for task manager and service) don't reflect the settings required for Neutron. Trove requires a configuration that can only be done after neutron is up. This introduces a new function called just before starting trove services. Change-Id: I197ec2d3975f7b551590cf1f6c7d2cb42d479e25 Closes-Bug: #1435612
Diffstat (limited to 'devstack')
-rw-r--r--devstack/plugin.sh26
1 files changed, 26 insertions, 0 deletions
diff --git a/devstack/plugin.sh b/devstack/plugin.sh
index 60028fb7..ec0800d3 100644
--- a/devstack/plugin.sh
+++ b/devstack/plugin.sh
@@ -191,6 +191,22 @@ function init_trove {
$TROVE_MANAGE datastore_update "Inactive_Datastore" ""
}
+# finalize_trove_network() - do the last thing(s) before starting Trove
+function finalize_trove_network {
+ management_network_id=$(neutron --os-tenant-name admin --os-username admin --os-password $ADMIN_PASSWORD net-list | grep $PRIVATE_NETWORK_NAME | awk '{print $2}')
+
+ echo "finalize_trove_network: found network id $management_network_id"
+
+ iniset $TROVE_CONF DEFAULT network_label_regex .*
+ iniset $TROVE_CONF DEFAULT ip_regex .*
+ iniset $TROVE_CONF DEFAULT blacklist_regex ^10.0.1.*
+ iniset $TROVE_CONF DEFAULT default_neutron_networks $management_network_id
+ iniset $TROVE_CONF DEFAULT network_driver trove.network.neutron.NeutronDriver
+
+ iniset $TROVE_TASKMANAGER_CONF DEFAULT network_driver trove.network.neutron.NeutronDriver
+ iniset $TROVE_TASKMANAGER_CONF mysql tcp_ports 22,3306
+}
+
# start_trove() - Start running processes, including screen
function start_trove {
run_process tr-api "$TROVE_BIN_DIR/trove-api --config-file=$TROVE_CONF --debug"
@@ -226,6 +242,16 @@ if is_service_enabled trove; then
# Initialize trove
init_trove
+ # finish the last step in trove network configuration
+ echo_summary "Finalizing Trove Network Configuration"
+
+ if is_service_enabled neutron; then
+ echo "finalize_trove_network: Neutron is enabled."
+ finalize_trove_network
+ else
+ echo "finalize_trove_network: Neutron is not enabled. Nothing to do."
+ fi
+
# Start the trove API and trove taskmgr components
echo_summary "Starting Trove"
start_trove