amazon.aws icon indicating copy to clipboard operation
amazon.aws copied to clipboard

add wait_for_modify_volume_complete option

Open mschurenko opened this issue 1 year ago • 15 comments

SUMMARY
ISSUE TYPE
  • Feature Pull Request
COMPONENT NAME

ec2_vol

ADDITIONAL INFORMATION

I ran into the following issue when trying to modify an unattached volume:

boto3_version: 1.26.122
  botocore_version: 1.29.122
  error:
    code: OperationNotPermitted
    message: 'Cannot attach volume vol-02f06b9e2f1e6d1e0 when it is in modification state: MODIFYING'
  msg: 'Error while attaching EBS volume: An error occurred (OperationNotPermitted) when calling the AttachVolume operation: Cannot attach volume vol-02f06b9e2f1e6d1e0 when it is in modification state: MODIFYING'

There seems to be no waiter, but if we poll describe_volumes_modifications we can wait until ModificationState is complete.

mschurenko avatar May 19 '23 01:05 mschurenko