diff --git a/lib/database b/lib/database index 7940cf2208..78563f6f6d 100644 --- a/lib/database +++ b/lib/database @@ -89,6 +89,10 @@ function initialize_database_backends { DATABASE_PASSWORD=$MYSQL_PASSWORD fi + return 0 +} + +function define_database_baseurl { # We configure Nova, Horizon, Glance and Keystone to use MySQL as their # database server. While they share a single server, each has their own # database and tables. @@ -100,8 +104,6 @@ function initialize_database_backends { # NOTE: Don't specify ``/db`` in this string so we can use it for multiple services BASE_SQL_CONN=${BASE_SQL_CONN:-$(get_database_type_$DATABASE_TYPE)://$DATABASE_USER:$DATABASE_PASSWORD@$DATABASE_HOST} - - return 0 } # Recreate a given database diff --git a/stack.sh b/stack.sh index a10e6eff25..6b5625e922 100755 --- a/stack.sh +++ b/stack.sh @@ -691,6 +691,8 @@ if initialize_database_backends; then # Last chance for the database password. This must be handled here # because read_password is not a library function. read_password DATABASE_PASSWORD "ENTER A PASSWORD TO USE FOR THE DATABASE." + + define_database_baseurl else echo "No database enabled" fi