Skip to content

Wait for volume state #4

@e0d

Description

@e0d

raidformer doesn't seem to wait for EBS volumes to become available before attempting to attach them. If there are not in the right state the following error occurs. I see this error nearly every time I run raidformer, even with small volumes. I can create a PR unless I'm missing something obvious.

Traceback (most recent call last):
  File "./raidformer.py", line 168, in <module>
    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
<?xml version="1.0" encoding="UTF-8"?>
<Response><Errors><Error><Code>IncorrectState</Code><Message>vol-c92fa384 is not 'available'.</Message></Error></Errors><RequestID>97f9ecf4-1b41-4c58-8254-63fc725057c8</RequestID></Response>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions