Skip to content
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

Clarify that plugin may return OK for ControllerUnpublish if node or volume not found #375

Merged

Conversation

davidz627
Copy link
Contributor

@davidz627 davidz627 commented Aug 7, 2019

This clarifies the plugin is allowed to return OK if because of a missing node or volume the plugin is sure that the volume is detached from that node.

Context: kubernetes-csi/external-attacher#165

Fixes #373

Discussion at CSI Community Meeting Notes here: https://docs.google.com/document/d/1-oiNg5V_GtS_JBAEViVBhZ3BYVFlbSz70hreyaD7c5Y/edit#heading=h.z24362cngqjs

/assign @saad-ali @jdef @julian-hj @jieyu
/cc @gnufied @jsafrane @msau42

Clarifies the plugin is allowed to return `OK` for `ControllerUnpublishResponse` if the specified node is or volume no longer exist and the plugin is sure that the volume is detached from that node.

@saad-ali
Copy link
Member

saad-ali commented Aug 7, 2019

CC @julian-hj @ddebroy

@davidz627
Copy link
Contributor Author

@saad-ali @jieyu @julian-hj resolved all comments, PTAL

@davidz627
Copy link
Contributor Author

@jdef added a release note to the PR description

Copy link
Member

@saad-ali saad-ali left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Outside of the comment below (which can be addressed in follow up PR), LGTM.

| Volume does not exist | 5 NOT_FOUND | Indicates that a volume corresponding to the specified `volume_id` does not exist. | Caller MUST verify that the `volume_id` is correct and that the volume is accessible and has not been deleted before retrying with exponential back off. |
| Node does not exist | 5 NOT_FOUND | Indicates that a node corresponding to the specified `node_id` does not exist. | Caller MUST verify that the `node_id` is correct and that the node is available and has not been terminated or deleted before retrying with exponential backoff. |
| Volume does not exist and volume not assumed ControllerUnpublished from node | 5 NOT_FOUND | Indicates that a volume corresponding to the specified `volume_id` does not exist and is not assumed to be ControllerUnpublished from node corresponding to the specified `node_id`. | Caller MUST verify that the `volume_id` is correct and that the volume is accessible and has not been deleted before retrying with exponential back off. |
| Node does not exist and volume not assumed ControllerUnpublished from node | 5 NOT_FOUND | Indicates that a node corresponding to the specified `node_id` does not exist and the volume corresponding to the specified `volume_id` is not assumed to be ControllerUnpublished from node. | Caller MUST verify that the `node_id` is correct and that the node is available and has not been terminated or deleted before retrying with exponential backoff. |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Part of the reason for this change is that the current Kubernetes handling of this is wrong to accommodate that. However, even after this change, as specified,the plugin SHOULD return '0 OK' means SP could return NOT_FOUND and per the error code Recovery Behavior the Caller MUST verify that the '..._id' is correct... before retrying with exponential backoff -- which caller can not do because it has no way to be able to verify if a given node or volume still exist. Therefore, we should either loosen the Recovery Behavior to Caller SHOULD verify..., but really this is something that we will need to fix in CSI 2.0 -- NOT_FOUND should not be allowed as an error code, and the SP MUST return OK if volume or node are gone and effectively detached.

@saad-ali
Copy link
Member

Merging

@saad-ali saad-ali merged commit 375efea into container-storage-interface:master Aug 14, 2019
@davidz627 davidz627 deleted the fix/unpublish branch August 14, 2019 23:01
@jdef
Copy link
Member

jdef commented Aug 15, 2019 via email

@davidz627
Copy link
Contributor Author

@jdef #382

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Clarify NOT_FOUND returned from ControllerUnpublishVolumeRequest
8 participants