Fixes bug #1090007
Change-Id: Ifa13b0b7b62be75805db2730cb7154406f0c1b94
... | ... |
@@ -26,3 +26,7 @@ export VOLUME_TIMEOUT=${VOLUME_TIMEOUT:-30} |
26 | 26 |
|
27 | 27 |
# Max time to wait for a euca-delete command to propogate |
28 | 28 |
export VOLUME_DELETE_TIMEOUT=${SNAPSHOT_DELETE_TIMEOUT:-60} |
29 |
+ |
|
30 |
+# The size of the volume we want to boot from; some storage back-ends |
|
31 |
+# do not allow a disk resize, so it's important that this can be tuned |
|
32 |
+export DEFAULT_VOLUME_SIZE=${DEFAULT_VOLUME_SIZE:-1} |
... | ... |
@@ -117,7 +117,7 @@ if ! timeout $ASSOCIATE_TIMEOUT sh -c "while ! nova floating-ip-list | grep -q $ |
117 | 117 |
fi |
118 | 118 |
|
119 | 119 |
# Create the bootable volume |
120 |
-cinder create --display_name=$VOL_NAME --image-id $IMAGE 1 |
|
120 |
+cinder create --display_name=$VOL_NAME --image-id $IMAGE $DEFAULT_VOLUME_SIZE |
|
121 | 121 |
|
122 | 122 |
# Wait for volume to activate |
123 | 123 |
if ! timeout $ACTIVE_TIMEOUT sh -c "while ! cinder list | grep $VOL_NAME | grep available; do sleep 1; done"; then |
... | ... |
@@ -142,7 +142,7 @@ if [[ -n "`cinder list | grep $VOL_NAME | head -1 | get_field 2`" ]]; then |
142 | 142 |
fi |
143 | 143 |
|
144 | 144 |
# Create a new volume |
145 |
-cinder create --display_name $VOL_NAME --display_description "test volume: $VOL_NAME" 1 |
|
145 |
+cinder create --display_name $VOL_NAME --display_description "test volume: $VOL_NAME" $DEFAULT_VOLUME_SIZE |
|
146 | 146 |
if [[ $? != 0 ]]; then |
147 | 147 |
echo "Failure creating volume $VOL_NAME" |
148 | 148 |
exit 1 |