-
Notifications
You must be signed in to change notification settings - Fork 372
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix error code on wrong snapshot ID or topology #412
Fix error code on wrong snapshot ID or topology #412
Conversation
This change LGTM. I think we also need to add one more here, which is |
When CreateVolumeRequest finds out that a volume to be created already exists and it was restored from a *different* snapshot or is available at different topology than requested, it should return ALREADY_EXISTS.
968bbe4
to
116df61
Compare
Added |
spec.md
Outdated
@@ -1119,7 +1119,7 @@ The CO MUST implement the specified error recovery behavior when it encounters t | |||
|-----------|-----------|-------------|-------------------| | |||
| Source incompatible or not supported | 3 INVALID_ARGUMENT | Besides the general cases, this code MUST also be used to indicate when plugin supporting CREATE_DELETE_VOLUME cannot create a volume from the requested source (`SnapshotSource` or `VolumeSource`). Failure MAY be caused by not supporting the source (CO SHOULD NOT have provided that source) or incompatibility between `parameters` from the source and the ones requested for the new volume. More human-readable information SHOULD be provided in the gRPC `status.message` field if the problem is the source. | On source related issues, caller MUST use different parameters, a different source, or no source at all. | | |||
| Source does not exist | 5 NOT_FOUND | Indicates that the specified source does not exist. | Caller MUST verify that the `volume_content_source` is correct, the source is accessible, and has not been deleted before retrying with exponential back off. | | |||
| Volume already exists but is incompatible | 6 ALREADY_EXISTS | Indicates that a volume corresponding to the specified volume `name` already exists but is incompatible with the specified `capacity_range`, `volume_capabilities` or `parameters`. | Caller MUST fix the arguments or use a different `name` before retrying. | | |||
| Volume already exists but is incompatible | 6 ALREADY_EXISTS | Indicates that a volume corresponding to the specified volume `name` already exists but is incompatible with the specified `capacity_range`, `volume_capabilities`, `parameters`, `accessibility_requirements` or `content_source`. | Caller MUST fix the arguments or use a different `name` before retrying. | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/content_source/volume_content_source
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
116df61
to
a82f700
Compare
lgtm |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
/approve
Add one more reason to return
ALREADY_EXISTS
fromCreateVolumeRequest
: the volume to be created already exists, but it was restored from a different snapshot than requestedThis follows all other
ALREADY_EXISTS
cases - the volume already exists, but it's something else than CO requested.