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

feat: support windows host-process deployment #895

Merged
merged 1 commit into from
Dec 31, 2024

Conversation

andyzhangx
Copy link
Member

@andyzhangx andyzhangx commented Dec 27, 2024

What type of PR is this?
/kind feature

What this PR does / why we need it:
feat: support windows host-process deployment

# k exec -it csi-smb-node-win-6dxfj -n kube-system -c smb -- cmd
C:\>dir c:\hpc
 Volume in drive C is Windows
 Volume Serial Number is 663A-A45B

 Directory of c:\hpc

09/16/2022  06:10 PM             7,048 cc0-legalcode.txt
12/28/2024  02:52 AM    <DIR>          dev
09/16/2022  06:10 PM               399 License.txt
12/27/2024  11:43 AM        35,465,728 smbplugin.exe
12/28/2024  02:52 AM    <DIR>          var
09/16/2022  06:10 PM    <DIR>          Windows
               3 File(s)     35,473,175 bytes
               3 Dir(s)  21,304,864,768 bytes free
I1228 03:00:18.102677   11112 utils.go:76] GRPC call: /csi.v1.Node/NodeStageVolume
I1228 03:00:18.102677   11112 utils.go:77] GRPC request: {"secrets":"***stripped***","staging_target_path":"\\var\\lib\\kubelet\\plugins\\kubernetes.io\\csi\\smb.csi.k8s.io\\bd956848271e3b82c9776f78efbf789f76e43dbfd865ebd97721e1c284aa1b14\\globalmount","volume_capability":{"AccessType":{"Mount":{"mount_flags":["dir_mode=0777","file_mode=0777","uid=1001","gid=1001","noperm","mfsymlinks","cache=strict","noserverino"]}},"access_mode":{"mode":5}},"volume_context":{"csi.storage.k8s.io/pv/name":"pvc-f9772129-69ed-4067-aa9d-9feb75d9971d","csi.storage.k8s.io/pvc/name":"persistent-storage-busybox-smb-0","csi.storage.k8s.io/pvc/namespace":"default","source":"//10.0.44.146/share","storage.kubernetes.io/csiProvisionerIdentity":"1735354448850-2108-smb.csi.k8s.io","subdir":"pvc-f9772129-69ed-4067-aa9d-9feb75d9971d"},"volume_id":"10.0.44.146/share#pvc-f9772129-69ed-4067-aa9d-9feb75d9971d##"}
I1228 03:00:18.102677   11112 nodeserver.go:215] NodeStageVolume: targetPath(\var\lib\kubelet\plugins\kubernetes.io\csi\smb.csi.k8s.io\bd956848271e3b82c9776f78efbf789f76e43dbfd865ebd97721e1c284aa1b14\globalmount) volumeID(10.0.44.146/share#pvc-f9772129-69ed-4067-aa9d-9feb75d9971d##) context(map[csi.storage.k8s.io/pv/name:pvc-f9772129-69ed-4067-aa9d-9feb75d9971d csi.storage.k8s.io/pvc/name:persistent-storage-busybox-smb-0 csi.storage.k8s.io/pvc/namespace:default source://10.0.44.146/share storage.kubernetes.io/csiProvisionerIdentity:1735354448850-2108-smb.csi.k8s.io subdir:pvc-f9772129-69ed-4067-aa9d-9feb75d9971d]) mountflags([dir_mode=0777 file_mode=0777 uid=1001 gid=1001 noperm mfsymlinks cache=strict noserverino]) mountOptions([AZURE\USERNAME])
I1228 03:00:18.102677   11112 smb_common_windows.go:63] Removing path: \var\lib\kubelet\plugins\kubernetes.io\csi\smb.csi.k8s.io\bd956848271e3b82c9776f78efbf789f76e43dbfd865ebd97721e1c284aa1b14\globalmount
I1228 03:00:18.102677   11112 safe_mounter_host_process_windows.go:47] SMBMount: remote path: //10.0.44.146/share/pvc-f9772129-69ed-4067-aa9d-9feb75d9971d local path: \var\lib\kubelet\plugins\kubernetes.io\csi\smb.csi.k8s.io\bd956848271e3b82c9776f78efbf789f76e43dbfd865ebd97721e1c284aa1b14\globalmount
I1228 03:00:18.102677   11112 safe_mounter_host_process_windows.go:69] begin to mount \\10.0.44.146\share\pvc-f9772129-69ed-4067-aa9d-9feb75d9971d on c:\var\lib\kubelet\plugins\kubernetes.io\csi\smb.csi.k8s.io\bd956848271e3b82c9776f78efbf789f76e43dbfd865ebd97721e1c284aa1b14\globalmount
I1228 03:00:19.675994   11112 safe_mounter_host_process_windows.go:100] Remote \\10.0.44.146\share\pvc-f9772129-69ed-4067-aa9d-9feb75d9971d not mapped. Mapping now!
I1228 03:00:19.675994   11112 smb.go:53] begin to run NewSmbGlobalMapping with \\10.0.44.146\share\pvc-f9772129-69ed-4067-aa9d-9feb75d9971d, AZURE\USERNAME
I1228 03:00:21.246835   11112 safe_mounter_host_process_windows.go:117] mount \\10.0.44.146\share\pvc-f9772129-69ed-4067-aa9d-9feb75d9971d on c:\var\lib\kubelet\plugins\kubernetes.io\csi\smb.csi.k8s.io\bd956848271e3b82c9776f78efbf789f76e43dbfd865ebd97721e1c284aa1b14\globalmount successfully
I1228 03:00:21.247435   11112 nodeserver.go:242] volume(10.0.44.146/share#pvc-f9772129-69ed-4067-aa9d-9feb75d9971d##) mount "//10.0.44.146/share/pvc-f9772129-69ed-4067-aa9d-9feb75d9971d" on "\\var\\lib\\kubelet\\plugins\\kubernetes.io\\csi\\smb.csi.k8s.io\\bd956848271e3b82c9776f78efbf789f76e43dbfd865ebd97721e1c284aa1b14\\globalmount" succeeded
I1228 03:00:21.247435   11112 utils.go:83] GRPC response: {}
I1228 03:00:21.258778   11112 utils.go:76] GRPC call: /csi.v1.Node/NodePublishVolume
I1228 03:00:21.258908   11112 utils.go:77] GRPC request: {"staging_target_path":"\\var\\lib\\kubelet\\plugins\\kubernetes.io\\csi\\smb.csi.k8s.io\\bd956848271e3b82c9776f78efbf789f76e43dbfd865ebd97721e1c284aa1b14\\globalmount","target_path":"c:\\var\\lib\\kubelet\\pods\\3b9a82c9-cbbd-4518-ae86-cd0223b708ee\\volumes\\kubernetes.io~csi\\pvc-f9772129-69ed-4067-aa9d-9feb75d9971d\\mount","volume_capability":{"AccessType":{"Mount":{"mount_flags":["dir_mode=0777","file_mode=0777","uid=1001","gid=1001","noperm","mfsymlinks","cache=strict","noserverino"]}},"access_mode":{"mode":5}},"volume_context":{"csi.storage.k8s.io/ephemeral":"false","csi.storage.k8s.io/pod.name":"busybox-smb-0","csi.storage.k8s.io/pod.namespace":"default","csi.storage.k8s.io/pod.uid":"3b9a82c9-cbbd-4518-ae86-cd0223b708ee","csi.storage.k8s.io/pv/name":"pvc-f9772129-69ed-4067-aa9d-9feb75d9971d","csi.storage.k8s.io/pvc/name":"persistent-storage-busybox-smb-0","csi.storage.k8s.io/pvc/namespace":"default","csi.storage.k8s.io/serviceAccount.name":"default","source":"//10.0.44.146/share","storage.kubernetes.io/csiProvisionerIdentity":"1735354448850-2108-smb.csi.k8s.io","subdir":"pvc-f9772129-69ed-4067-aa9d-9feb75d9971d"},"volume_id":"10.0.44.146/share#pvc-f9772129-69ed-4067-aa9d-9feb75d9971d##"}
I1228 03:00:21.260008   11112 smb_common_windows.go:63] Removing path: c:\var\lib\kubelet\pods\3b9a82c9-cbbd-4518-ae86-cd0223b708ee\volumes\kubernetes.io~csi\pvc-f9772129-69ed-4067-aa9d-9feb75d9971d\mount
I1228 03:00:21.260728   11112 nodeserver.go:81] NodePublishVolume: mounting \var\lib\kubelet\plugins\kubernetes.io\csi\smb.csi.k8s.io\bd956848271e3b82c9776f78efbf789f76e43dbfd865ebd97721e1c284aa1b14\globalmount at c:\var\lib\kubelet\pods\3b9a82c9-cbbd-4518-ae86-cd0223b708ee\volumes\kubernetes.io~csi\pvc-f9772129-69ed-4067-aa9d-9feb75d9971d\mount with mountOptions: [bind] volumeID(10.0.44.146/share#pvc-f9772129-69ed-4067-aa9d-9feb75d9971d##)
I1228 03:00:21.284527   11112 nodeserver.go:88] NodePublishVolume: mount \var\lib\kubelet\plugins\kubernetes.io\csi\smb.csi.k8s.io\bd956848271e3b82c9776f78efbf789f76e43dbfd865ebd97721e1c284aa1b14\globalmount at c:\var\lib\kubelet\pods\3b9a82c9-cbbd-4518-ae86-cd0223b708ee\volumes\kubernetes.io~csi\pvc-f9772129-69ed-4067-aa9d-9feb75d9971d\mount volumeID(10.0.44.146/share#pvc-f9772129-69ed-4067-aa9d-9feb75d9971d##) successfully

Which issue(s) this PR fixes:

Fixes #

Requirements:

Special notes for your reviewer:

Release note:

feat: support windows host-process deployment

@k8s-ci-robot k8s-ci-robot added release-note Denotes a PR that will be considered when it comes time to generate release notes. kind/feature Categorizes issue or PR as related to a new feature. labels Dec 27, 2024
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: andyzhangx

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Dec 27, 2024
@k8s-ci-robot k8s-ci-robot added the size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label Dec 27, 2024
@coveralls
Copy link

coveralls commented Dec 27, 2024

Pull Request Test Coverage Report for Build 12540858797

Details

  • 3 of 12 (25.0%) changed or added relevant lines in 4 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.5%) to 79.31%

Changes Missing Coverage Covered Lines Changed/Added Lines %
pkg/smb/fake_mounter.go 0 1 0.0%
pkg/util/util.go 0 8 0.0%
Totals Coverage Status
Change from base Build 12515458845: -0.5%
Covered Lines: 1035
Relevant Lines: 1305

💛 - Coveralls

@andyzhangx
Copy link
Member Author

/retest

@andyzhangx
Copy link
Member Author

/test pull-csi-driver-smb-e2e-windows-2022-hostprocess

@andyzhangx
Copy link
Member Author

/retest

@andyzhangx
Copy link
Member Author

/test pull-csi-driver-smb-e2e-windows-2022-hostprocess

@andyzhangx
Copy link
Member Author

/retest

@andyzhangx
Copy link
Member Author

/test pull-csi-driver-smb-e2e-windows-2022-hostprocess

@andyzhangx
Copy link
Member Author

/test pull-csi-driver-smb-e2e-windows-2022-hostprocess

@andyzhangx
Copy link
Member Author

/retest

1 similar comment
@andyzhangx
Copy link
Member Author

/retest

@andyzhangx
Copy link
Member Author

/test pull-csi-driver-smb-e2e-windows-2022-hostprocess

@andyzhangx
Copy link
Member Author

/test pull-csi-driver-smb-e2e-windows-2022-hostprocess

@andyzhangx
Copy link
Member Author

/retest

1 similar comment
@andyzhangx
Copy link
Member Author

/retest

@andyzhangx
Copy link
Member Author

/test pull-csi-driver-smb-e2e-windows-2022-hostprocess

@andyzhangx
Copy link
Member Author

/test pull-csi-driver-smb-e2e-windows-2022-hostprocess

@andyzhangx
Copy link
Member Author

/retest

3 similar comments
@andyzhangx
Copy link
Member Author

/retest

@andyzhangx
Copy link
Member Author

/retest

@andyzhangx
Copy link
Member Author

/retest

@k8s-ci-robot
Copy link
Contributor

@andyzhangx: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-csi-driver-smb-e2e-windows-2022-hostprocess dec96df link true /test pull-csi-driver-smb-e2e-windows-2022-hostprocess

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

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-sigs/prow repository. I understand the commands that are listed here.

@andyzhangx andyzhangx merged commit b2d2d00 into kubernetes-csi:master Dec 31, 2024
20 of 22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/feature Categorizes issue or PR as related to a new feature. release-note Denotes a PR that will be considered when it comes time to generate release notes. size/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants