Permalink
Browse files

make volume size parametric in boot_from_volume

Fixes bug #1090007

Change-Id: Ifa13b0b7b62be75805db2730cb7154406f0c1b94
  • Loading branch information...
1 parent 1bd2a1b commit b0d8a8288be6ad23114563c4bf62338c79766501 Armando Migliaccio committed Dec 13, 2012
Showing with 6 additions and 2 deletions.
  1. +4 −0 exerciserc
  2. +1 −1 exercises/boot_from_volume.sh
  3. +1 −1 exercises/volumes.sh
View
4 exerciserc
@@ -26,3 +26,7 @@ export VOLUME_TIMEOUT=${VOLUME_TIMEOUT:-30}
# 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}
View
2 exercises/boot_from_volume.sh
@@ -117,7 +117,7 @@ if ! timeout $ASSOCIATE_TIMEOUT sh -c "while ! nova floating-ip-list | grep -q $
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
View
2 exercises/volumes.sh
@@ -142,7 +142,7 @@ if [[ -n "`cinder list | grep $VOL_NAME | head -1 | get_field 2`" ]]; then
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

0 comments on commit b0d8a82

Please sign in to comment.