Speed up volume modifications on AWS

Volume becomes reusable after it reached optimizing state
This commit is contained in:
Hemant Kumar 2018-07-27 16:19:16 -04:00
parent 2630d09c84
commit d0c2d3fe89

View File

@ -1796,7 +1796,9 @@ func (d *awsDisk) modifyVolume(requestGiB int64) (int64, error) {
return false, err return false, err
} }
if aws.StringValue(volumeModification.ModificationState) == ec2.VolumeModificationStateCompleted { // According to https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/monitoring_mods.html
// Size changes usually take a few seconds to complete and take effect after a volume is in the Optimizing state.
if aws.StringValue(volumeModification.ModificationState) == ec2.VolumeModificationStateOptimizing {
return true, nil return true, nil
} }
return false, nil return false, nil