Skip to content
This repository has been archived by the owner on Oct 22, 2024. It is now read-only.

DeleteVolume response is incorrect if volume is in use #402

Closed
okartau opened this issue Sep 11, 2019 · 3 comments
Closed

DeleteVolume response is incorrect if volume is in use #402

okartau opened this issue Sep 11, 2019 · 3 comments
Assignees

Comments

@okartau
Copy link
Contributor

okartau commented Sep 11, 2019

CSI spec says that if a volume is in use, DeleteVolume response should be error=FAILED_PRECONDITION.
Currently, PMEM-CSI responds with codes.InternalError in all cases when lower layer (Device) returns any error, although the BUSY status is detected and is one of the reasons to fail.
To make the GRPC error correct, we have to start returning more detailed error codes by cs.dm.DeleteDevice and form a RPC return code correctly if volume/device was in-use.

@okartau okartau self-assigned this Sep 11, 2019
@okartau
Copy link
Contributor Author

okartau commented Sep 11, 2019

The fact that current PMEM-CSI code passed e2e and sanity tests, is a sign that this scenario is not tested.

avalluri added a commit to avalluri/pmem-CSI that referenced this issue Oct 23, 2019
DeleteVolume should return FailedPrecondition if volume is in use.

FIXES: intel#402
avalluri added a commit to avalluri/pmem-CSI that referenced this issue Oct 24, 2019
DeleteVolume should return FailedPrecondition if volume is in use.

FIXES: intel#402
@okartau
Copy link
Contributor Author

okartau commented Nov 29, 2019

Changes of #420 fixed that, it seems, @avalluri do you agree? Now NodeController returns FailedPrecondition if volume is in use.
In that case, I think we can close this issue.

@avalluri
Copy link
Contributor

Changes of #420 fixed that, it seems, @avalluri do you agree? Now NodeController returns FailedPrecondition if volume is in use.
In that case, I think we can close this issue.

Yes, we can close this.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
2 participants