jsmartin/raidformer — pull request #5 by e0d (2013-12-11 01:58:30+00:00)
Title: Adds check for volume creation status

This pull ensures that newly created volumes are in the available status before attempting to attach them, which results in an error.

```
Traceback (most recent call last):
File "./raidformer.py", line 168, in
ec2conn.attach_volume(vol.id, instance_data['instance-id'], device)
File "/usr/lib/python2.7/dist-packages/boto/ec2/connection.py", line 1369, in attach_volume
return self.get_status('AttachVolume', params, verb='POST')
File "/usr/lib/python2.7/dist-packages/boto/connection.py", line 935, in get_status
raise self.ResponseError(response.status, response.reason, body)
boto.exception.EC2ResponseError: EC2ResponseError: 400 Bad Request

IncorrectStatevol-c92fa384 is not 'available'.97f9ecf4-1b41-4c58-8254-63fc725057c8
```