Merge "Run Neutron migrations after creating schema"

This commit is contained in:
Jenkins 2013-08-06 17:14:10 +00:00 committed by Gerrit Code Review
commit aa9274fe08
2 changed files with 7 additions and 8 deletions

View File

@ -367,7 +367,9 @@ function create_neutron_initial_network() {
# init_neutron() - Initialize databases, etc.
function init_neutron() {
:
recreate_database $Q_DB_NAME utf8
# Run Neutron db migrations
$NEUTRON_BIN_DIR/neutron-db-manage --config-file $NEUTRON_CONF --config-file /$Q_PLUGIN_CONF_FILE upgrade head
}
# install_neutron() - Collect source and prepare
@ -614,12 +616,6 @@ function _configure_neutron_service() {
cp $NEUTRON_DIR/etc/api-paste.ini $Q_API_PASTE_FILE
cp $NEUTRON_DIR/etc/policy.json $Q_POLICY_FILE
if is_service_enabled $DATABASE_BACKENDS; then
recreate_database $Q_DB_NAME utf8
else
die $LINENO "A database must be enabled in order to use the $Q_PLUGIN Neutron plugin."
fi
# Update either configuration file with plugin
iniset $NEUTRON_CONF DEFAULT core_plugin $Q_PLUGIN_CLASS

View File

@ -939,7 +939,10 @@ if is_service_enabled neutron; then
echo_summary "Configuring Neutron"
configure_neutron
init_neutron
# Run init_neutron only on the node hosting the neutron API server
if is_service_enabled $DATABASE_BACKENDS && is_service_enabled q-svc; then
init_neutron
fi
fi
# Some Neutron plugins require network controllers which are not