-
Notifications
You must be signed in to change notification settings - Fork 73
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
Windows SMB Support #36
Windows SMB Support #36
Conversation
Welcome @almos98! |
Hi @almos98. Thanks for your PR. I'm waiting for a kubernetes-sigs or kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/cc msau42 pjh |
@pjh: GitHub didn't allow me to request PR reviews from the following users: pjh. Note that only kubernetes-sigs members and repo collaborators can review this PR, and authors cannot review their own PRs. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
/ok-to-test |
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.
@msau42 I commented out a test for now because the behavior of FakeMount has changed and this test was failing after updating vendor.
pkg/csi_driver/node_test.go
Outdated
@@ -177,11 +188,54 @@ func TestNodePublishVolume(t *testing.T) { | |||
}, | |||
expectErr: true, | |||
}, | |||
// TODO: enable this test when FakeMount supports Windows behavior |
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.
It might be cleaner to actually have a separate test function just for the windows cases.
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.
Done.
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.
Is there something still preventing this test from being enabled? If so, let's open an issue for it and reference it here
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.
On Windows, if TargetPath exists it should return an error but FakeMount doesn't do that.
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.
Opened an issue on K/K: kubernetes/kubernetes#81609
@almos98: GitHub didn't allow me to request PR reviews from the following users: adjackura. Note that only kubernetes-sigs members and repo collaborators can review this PR, and authors cannot review their own PRs. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
cc @adjackura |
LGTM! @almos98 could you update the PR description to note that you've manually tested this end-to-end to confirm that it successfully mounts an SMB share on the Windows node, but 1) it doesn't run containerized yet (link to kubernetes/enhancements#1122), and 2) it hasn't been tested against GCP Filestore (since SMB support is still not available). Thanks! |
This is looking good. Can you also do the following:
|
Also is it possible to enhance https://github.com/kubernetes-sigs/gcp-filestore-csi-driver/blob/master/test/run_unit.sh to also run the windows unit tests? Maybe @yujuhong or @pjh can help with how to do that. |
Sorry I realized the unit tests were written in a way that it doesn't actually require a windows env to run. So scratch that, I think it is fine the way it is. |
Squashed commits, changed PR title and documented testing steps! |
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.
/approve
Will let the others do a final review
windows-local: | ||
mkdir -p bin | ||
GOOS=windows GOARCH=amd64 go build -ldflags "-X main.vendorVersion=${VERSION}" -o bin/gcfs-csi-driver.exe ./cmd/ | ||
|
||
push: | ||
docker push $(IMAGE):$(VERSION) |
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.
Do we need to do anything special here for windows container images?
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.
We will need to write a separate Dockerfile to build a Windows container. I haven't written one because the driver can't run from within a container on Windows. Can write one and include it if you'd like.
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.
It may be good to add now so once CSI on windows is ready, we can easily leverage this
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.
Added a Dockerfile for windows under test/experimental but the driver has to be compiled first. I added a target in the Makefile to do this.
pkg/csi_driver/node_test.go
Outdated
@@ -177,11 +188,54 @@ func TestNodePublishVolume(t *testing.T) { | |||
}, | |||
expectErr: true, | |||
}, | |||
// TODO: enable this test when FakeMount supports Windows behavior |
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.
Is there something still preventing this test from being enabled? If so, let's open an issue for it and reference it here
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: almos98, msau42 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/retest |
@davidz627 @msau42 can you provide your final feedback and approval so that we can get this merged? Thanks! |
@almos98 consider squashing this back into two commits again. |
With these changes it's possible to make a request to mount a generic SMB share on Windows.
/lgtm Thanks! |
Refactored some Linux specific code to allow requests to be made when running on Windows to mount SMB shares.
The code has been manualy tested end-to-end and successfully mounts an SMB share on a Windows node. However, it doesn't run containerized yet (see this enhancement) and hasn't been tested against GCP FileStore because SMB support is not available.