strato: [Cloud Block Service] AWS Volume shows status available. On modifying throws error cannot be modified when state is MODIFYING or OPTIMIZING.
Issue/Feature Description: When a volume that is newly created is modified the status is shown as available. After the status is shown available if another modify request is sent the backend throws an error which has no information (panic error). On checking the docker logs the below error is shown.
On trying to modify a volume which is in MODIFYING or OPTIMIZING state the API throws an error.
These states can be fetched from the cloud backend and returned in the API to give the user correct information
[2020-09-28T21:49:21+05:30] [ERROR] [/root/gopath/src/github.com/sodafoundation/multi-cloud/contrib/datastore/block/aws/aws.go] [aws.(*AwsAdapter).UpdateVolume():318] [PID:1] Error in updating volume: {
Iops: 0,
Size: 600,
VolumeId: "vol-08986585387cd1eff",
VolumeType: "st1"
}%!(EXTRA *awserr.requestError=IncorrectModificationState: Volume vol-08986585387cd1eff cannot be modified in modification state MODIFYING
status code: 400, request id: 7e2390e5-7d2c-415b-af3a-9bd49857b5bd)
[2020-09-28T21:49:21+05:30] [ERROR] [/root/gopath/src/github.com/sodafoundation/multi-cloud/contrib/datastore/block/aws/aws.go] [aws.(*AwsAdapter).UpdateVolume():322] [PID:1] IncorrectModificationState: Volume vol-08986585387cd1eff cannot be modified in modification state MODIFYING
Why this issue to fixed / feature is needed(give scenarios or use cases): If the state is shown as available then the user will try to modify. we are already showing creating and updating as intermediate states wherein a user will expect some change. Similarly showing the state as modifying or optimizing as per the cloud vendor will give more accurate information to the user and will also help in preventing making API calls to the backend when certain states do not allow it.
How to reproduce, in case of a bug:
Other Notes / Environment Information: (Please give the env information, log link or any useful information for this issue)
About this issue
- Original URL
- State: open
- Created 4 years ago
- Comments: 15 (14 by maintainers)
Should be fixed in next release. Reason for not fixing in Greenland release Less chances that so frequent modification will be done in actual/production environment