Merge "Revert "Exit after printing error about RPC config""
diff --git a/lib/cinder b/lib/cinder
index 1bc6ddd..08f5874 100644
--- a/lib/cinder
+++ b/lib/cinder
@@ -393,6 +393,10 @@
             fi
 
             if type init_cinder_backend_${be_type} >/dev/null 2>&1; then
+                # Always init the default volume group for lvm.
+                if [[ "$be_type" == "lvm" ]]; then
+                    init_default_lvm_volume_group
+                fi
                 init_cinder_backend_${be_type} ${be_name}
             fi
         done
diff --git a/lib/lvm b/lib/lvm
index 4ef260d..ed24487 100644
--- a/lib/lvm
+++ b/lib/lvm
@@ -117,6 +117,25 @@
     _clean_lvm_volume_group $vg
 }
 
+# Sentinal value to ensure that init of default lvm volume group is
+# only performed once across calls of init_default_lvm_volume_group.
+_DEFAULT_LVM_INIT=${_DEFAULT_LVM_INIT:-0}
+
+# init_default_lvm_volume_group() initializes a default volume group
+# intended to be shared between cinder and nova.  It is idempotent;
+# the init of the default volume group is guaranteed to be performed
+# only once so that either or both of the dependent services can
+# safely call this function.
+#
+# Usage: init_default_lvm_volume_group()
+function init_default_lvm_volume_group {
+    if [[ "$_DEFAULT_LVM_INIT" = "0" ]]; then
+        init_lvm_volume_group $DEFAULT_VOLUME_GROUP_NAME $VOLUME_BACKING_FILE_SIZE
+        _DEFAULT_LVM_INIT=1
+    fi
+}
+
+
 # Restore xtrace
 $MY_XTRACE
 
diff --git a/lib/nova b/lib/nova
index 76212ed..a4b1bb1 100644
--- a/lib/nova
+++ b/lib/nova
@@ -640,6 +640,10 @@
 
     create_nova_cache_dir
     create_nova_keys_dir
+
+    if [[ "$NOVA_BACKEND" == "LVM" ]]; then
+        init_default_lvm_volume_group
+    fi
 }
 
 # install_novaclient() - Collect source and prepare
diff --git a/stack.sh b/stack.sh
index 5b56972..198a347 100755
--- a/stack.sh
+++ b/stack.sh
@@ -352,6 +352,10 @@
 LOGDAYS=${LOGDAYS:-7}
 CURRENT_LOG_TIME=$(date "+$TIMESTAMP_FORMAT")
 
+if [[ -n ${LOGDIR:-} ]]; then
+    mkdir -p $LOGDIR
+fi
+
 if [[ -n "$LOGFILE" ]]; then
     # Clean up old log files.  Append '.*' to the user-specified
     # ``LOGFILE`` to match the date in the search template.
@@ -914,10 +918,6 @@
 # A better kind of sysstat, with the top process per time slice
 start_dstat
 
-# Initialize default LVM volume group
-# -----------------------------------
-init_lvm_volume_group $DEFAULT_VOLUME_GROUP_NAME $VOLUME_BACKING_FILE_SIZE
-
 # Start Services
 # ==============