Skip to content

Commit

Permalink
make volume size parametric in boot_from_volume
Browse files Browse the repository at this point in the history
Fixes bug #1090007

Change-Id: Ifa13b0b7b62be75805db2730cb7154406f0c1b94
  • Loading branch information
Armando Migliaccio committed Dec 13, 2012
1 parent 1bd2a1b commit b0d8a82
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions exerciserc
Original file line number Diff line number Diff line change
Expand Up @@ -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}
2 changes: 1 addition & 1 deletion exercises/boot_from_volume.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion exercises/volumes.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b0d8a82

Please sign in to comment.