make volume size parametric in boot_from_volume

Fixes bug #1090007

Change-Id: Ifa13b0b7b62be75805db2730cb7154406f0c1b94
diff --git a/exerciserc b/exerciserc
index 82c74b7..c26ec2c 100644
--- a/exerciserc
+++ b/exerciserc
@@ -26,3 +26,7 @@
 
 # Max time to wait for a euca-delete command to propogate
 export VOLUME_DELETE_TIMEOUT=${SNAPSHOT_DELETE_TIMEOUT:-60}
+
+# The size of the volume we want to boot from; some storage back-ends
+# do not allow a disk resize, so it's important that this can be tuned
+export DEFAULT_VOLUME_SIZE=${DEFAULT_VOLUME_SIZE:-1}
diff --git a/exercises/boot_from_volume.sh b/exercises/boot_from_volume.sh
index 5ebdecc..5ada237 100755
--- a/exercises/boot_from_volume.sh
+++ b/exercises/boot_from_volume.sh
@@ -117,7 +117,7 @@
 fi
 
 # Create the bootable volume
-cinder create --display_name=$VOL_NAME --image-id $IMAGE 1
+cinder create --display_name=$VOL_NAME --image-id $IMAGE $DEFAULT_VOLUME_SIZE
 
 # Wait for volume to activate
 if ! timeout $ACTIVE_TIMEOUT sh -c "while ! cinder list | grep $VOL_NAME | grep available; do sleep 1; done"; then
diff --git a/exercises/volumes.sh b/exercises/volumes.sh
index 42f9cb4..48a976e 100755
--- a/exercises/volumes.sh
+++ b/exercises/volumes.sh
@@ -142,7 +142,7 @@
 fi
 
 # Create a new volume
-cinder create --display_name $VOL_NAME --display_description "test volume: $VOL_NAME" 1
+cinder create --display_name $VOL_NAME --display_description "test volume: $VOL_NAME" $DEFAULT_VOLUME_SIZE
 if [[ $? != 0 ]]; then
     echo "Failure creating volume $VOL_NAME"
     exit 1