Merge "Use latin1 character set when creating the nova database"
diff --git a/lib/cinder b/lib/cinder
index 5b38719..119cc91 100644
--- a/lib/cinder
+++ b/lib/cinder
@@ -93,11 +93,10 @@
         # volume group, create your own volume group called ``stack-volumes`` before
         # invoking ``stack.sh``.
         #
-        # By default, the backing file is 2G in size, and is stored in ``/opt/stack/data``.
+        # By default, the backing file is 5G in size, and is stored in ``/opt/stack/data``.
 
         if ! sudo vgs $VOLUME_GROUP; then
             VOLUME_BACKING_FILE=${VOLUME_BACKING_FILE:-$DATA_DIR/${VOLUME_GROUP}-backing-file}
-            VOLUME_BACKING_FILE_SIZE=${VOLUME_BACKING_FILE_SIZE:-2052M}
             # Only create if the file doesn't already exists
             [[ -f $VOLUME_BACKING_FILE ]] || truncate -s $VOLUME_BACKING_FILE_SIZE $VOLUME_BACKING_FILE
             DEV=`sudo losetup -f --show $VOLUME_BACKING_FILE`
diff --git a/stack.sh b/stack.sh
index 27b0eb5..5d4ce9f 100755
--- a/stack.sh
+++ b/stack.sh
@@ -1683,11 +1683,10 @@
     # volume group, create your own volume group called ``stack-volumes`` before
     # invoking ``stack.sh``.
     #
-    # By default, the backing file is 2G in size, and is stored in ``/opt/stack/data``.
+    # By default, the backing file is 5G in size, and is stored in ``/opt/stack/data``.
 
     if ! sudo vgs $VOLUME_GROUP; then
         VOLUME_BACKING_FILE=${VOLUME_BACKING_FILE:-$DATA_DIR/${VOLUME_GROUP}-backing-file}
-        VOLUME_BACKING_FILE_SIZE=${VOLUME_BACKING_FILE_SIZE:-2052M}
         # Only create if the file doesn't already exists
         [[ -f $VOLUME_BACKING_FILE ]] || truncate -s $VOLUME_BACKING_FILE_SIZE $VOLUME_BACKING_FILE
         DEV=`sudo losetup -f --show $VOLUME_BACKING_FILE`
@@ -2011,7 +2010,7 @@
     # launch keystone and wait for it to answer before continuing
     screen_it key "cd $KEYSTONE_DIR && $KEYSTONE_DIR/bin/keystone-all --config-file $KEYSTONE_CONF $KEYSTONE_LOG_CONFIG -d --debug"
     echo "Waiting for keystone to start..."
-    if ! timeout $SERVICE_TIMEOUT sh -c "while http_proxy= wget -O- $KEYSTONE_AUTH_PROTOCOL://$SERVICE_HOST:$KEYSTONE_API_PORT/v2.0/ 2>&1 | grep -q 'refused'; do sleep 1; done"; then
+    if ! timeout $SERVICE_TIMEOUT sh -c "while ! http_proxy= curl -s $KEYSTONE_AUTH_PROTOCOL://$SERVICE_HOST:$KEYSTONE_API_PORT/v2.0/ >/dev/null; do sleep 1; done"; then
       echo "keystone did not start"
       exit 1
     fi
diff --git a/stackrc b/stackrc
index 3a19cdb..badde68 100644
--- a/stackrc
+++ b/stackrc
@@ -120,3 +120,6 @@
 if [ -f $RC_DIR/localrc ]; then
     source $RC_DIR/localrc
 fi
+
+# 5Gb default volume backing file size
+VOLUME_BACKING_FILE_SIZE=${VOLUME_BACKING_FILE_SIZE:-5130M}
diff --git a/unstack.sh b/unstack.sh
index 641d34e..6a55a0a 100755
--- a/unstack.sh
+++ b/unstack.sh
@@ -63,3 +63,8 @@
         stop_service mysql
     fi
 fi
+
+# Quantum dhcp agent runs dnsmasq
+if is_service_enabled q-dhcp; then
+    sudo kill -9 $(ps aux | awk '/[d]nsmasq.+interface=tap/ { print $2 }')
+fi