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

CSI node plugin fix for unstaging volumes #3178

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

beornf
Copy link

@beornf beornf commented Jun 12, 2024

- What I did
While running a CSI volume plugin that supports staging, I created a new swarm service that initiated an attempt to unpublish a cluster volume. The node agent calls NodeUnpublishVolume which returns no errors then NodeUnstageVolume which also returns no errors. However, there was no call to the underlying plugin driver for NodeUnstageVolume.

- How I did it
Fixed the unpublish check to only return in the failing condition that the volume was not unpublished.

- How to test it
Create a cluster volume using CSI volume plugin then trigger a publish and unpublish by creating a swarm service and restarting the service.

- Description for the changelog

Signed-off-by: Beorn Facchini <beornf@gmail.com>
@beornf
Copy link
Author

beornf commented Jun 12, 2024

Similarly, this early return in NodeUnpublishVolume skips the log which would be helpful in debugging:

if v, ok := np.volumeMap[req.ID]; ok {
v.publishedPath = ""
v.isPublished = false
return nil
}
log.G(ctx).Info("volume unpublished")
return nil

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

Successfully merging this pull request may close these issues.

None yet

1 participant