Extract create_nova_conf() from init_nova()
Allows creating a new nova.conf without wiping the database,
say, during an upgrade.
Change-Id: I7703b54bc3a32485b3cdab8d6185f93a6675040d
diff --git a/lib/nova b/lib/nova
index 333695e..378b1db 100644
--- a/lib/nova
+++ b/lib/nova
@@ -12,6 +12,7 @@
#
# install_nova
# configure_nova
+# create_nova_conf
# init_nova
# start_nova
# stop_nova
@@ -274,8 +275,8 @@
fi
}
-# init_nova() - Initialize databases, etc.
-function init_nova() {
+# create_nova_conf() - Create a new nova.conf file
+function create_nova_conf() {
# Remove legacy ``nova.conf``
rm -f $NOVA_DIR/bin/nova.conf
@@ -352,7 +353,10 @@
# Attempt to convert flags to options
add_nova_opt ${I//--}
done
+}
+# init_nova() - Initialize databases, etc.
+function init_nova() {
# Nova Database
# -------------
diff --git a/stack.sh b/stack.sh
index 118c2ef..35da935 100755
--- a/stack.sh
+++ b/stack.sh
@@ -1728,6 +1728,8 @@
if is_service_enabled nova; then
echo_summary "Configuring Nova"
+ # Rebuild the config file from scratch
+ create_nova_conf
init_nova
fi