Hack to parallelize AMI copying
This commit is contained in:
parent
d06fdade6f
commit
9008c9cd5f
@ -191,15 +191,17 @@ for type in hvm pv; do
|
|||||||
ami=$(cat $amiFile)
|
ami=$(cat $amiFile)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "waiting for AMI..."
|
if [ -z "$NO_WAIT" -o -z "$prevAmi" ]; then
|
||||||
while true; do
|
echo "waiting for AMI..."
|
||||||
status=$(ec2-describe-images "$ami" --region "$region" | head -n1 | cut -f 5)
|
while true; do
|
||||||
if [ "$status" = available ]; then break; fi
|
status=$(ec2-describe-images "$ami" --region "$region" | head -n1 | cut -f 5)
|
||||||
sleep 10
|
if [ "$status" = available ]; then break; fi
|
||||||
done
|
sleep 10
|
||||||
|
done
|
||||||
|
|
||||||
ec2-modify-image-attribute \
|
ec2-modify-image-attribute \
|
||||||
--region "$region" "$ami" -l -a all
|
--region "$region" "$ami" -l -a all
|
||||||
|
fi
|
||||||
|
|
||||||
echo "region = $region, type = $type, store = $store, ami = $ami"
|
echo "region = $region, type = $type, store = $store, ami = $ami"
|
||||||
if [ -z "$prevAmi" ]; then
|
if [ -z "$prevAmi" ]; then
|
||||||
|
Loading…
x
Reference in New Issue
Block a user