-
Notifications
You must be signed in to change notification settings - Fork 650
CSI: Allow NodePublishVolume even when plugin does not support staging #3116
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: Allow NodePublishVolume even when plugin does not support staging #3116
Conversation
|
+1 on this. The Hetzner CSI plugin I am working on does not support staging either: |
|
We got an issue with CI and fix had been merged, can you rebase please? |
a73eb42 to
3188914
Compare
Codecov Report
@@ Coverage Diff @@
## master #3116 +/- ##
===========================================
+ Coverage 0 61.78% +61.78%
===========================================
Files 0 153 +153
Lines 0 31023 +31023
===========================================
+ Hits 0 19167 +19167
- Misses 0 10317 +10317
- Partials 0 1539 +1539 |
849c087 to
7714771
Compare
|
@crazy-max yes, CI started working with rebase and found two issues which I needed to solve ( accessMode cannot be nil and there need to be separate test case with and without staging). @dperny PTAL |
neersighted
left a comment
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.
Some things we'd like to see changed after a peer session with @dperny.
| } | ||
| if req.AccessMode == nil { | ||
| return status.Error(codes.InvalidArgument, "AccessMode missing in request") | ||
| } |
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.
Let's factor this out into a common helper and use it in the Stage/Unstage methods as well (every method that calls makeCapability). I'd also like to see that change in a separate commit.
a63fdbf to
50ca5ad
Compare
Signed-off-by: Olli Janatuinen <[email protected]>
50ca5ad to
1ab7f13
Compare
|
@neersighted I was not sure what would be correct location for that helper and when started working with it I found that |
|
I think the pkg pattern has been quite detrimental overall; if we need to share things across two packages I'd suggest we use |
1ab7f13 to
44a6397
Compare
19d3a0d to
b9c07e4
Compare
Signed-off-by: Olli Janatuinen <[email protected]>
b9c07e4 to
bd7d9d8
Compare
|
Now those are in |
|
I think this LGTM to me overall, I'll sync up with @dperny again to go over it once we both have bandwidth. |
|
Not a blocker on this PR, but we should move the |
…cker swarm With the merge of moby/swarmkit#3116 the mock staging/unstaging is not needed anymore. It was introduced in our csi-driver in this commit: 619fa5c. Which is part of a large PR (squashed commit) that included experimental support for Docker swarm.
) With the merge of moby/swarmkit#3116 the mock staging/unstaging is not needed anymore. It was introduced in our csi-driver in this commit: 619fa5c. Which is part of a large PR (squashed commit) that included experimental support for Docker swarm. See: - #376 - #382 ---------
- What I did
I was packing NFS CSI for Swarm on https://github.com/olljanat/csi-plugins-for-docker-swarm/tree/master/csi-driver-nfs when noticed that it was able to create volume and folder to NFS share but mounting volume to didn't worked but instead of it ended up looping these messaged on Docker engine log:
- How I did it
Set
stagingPathto empty string by default and continue logic instead of return error when plugin does not support staging.- How to test it
Added another test case without staging. Manual testing can be done with linked NFS CSI plugin.
- Description for the changelog