Skip to content
This repository has been archived by the owner on Mar 16, 2021. It is now read-only.

Enable CSI hostpath example on windows #79

Closed
andyzhangx opened this issue Mar 31, 2018 · 9 comments
Closed

Enable CSI hostpath example on windows #79

andyzhangx opened this issue Mar 31, 2018 · 9 comments
Labels
lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed.

Comments

@andyzhangx
Copy link

andyzhangx commented Mar 31, 2018

Is there any example about how to make CSI work on Windows? Since for windows cluster, the master is also Linux, so only driver-registrar and plugin drivers need to run on windows agent node. I would like to know whether there is any example or investigation work about how to make CSI work on Windows.

anyway,

  • build hostpathplugin for windows works:
CGO_ENABLED=0 GOOS=windows go build -a -ldflags '-extldflags "-static"' -o _output/hostpathplugin.exe ./app/hostpathplugin
  • build driver-registrar for windows also works:
CGO_ENABLED=0 GOOS=windows go build -a -ldflags '-extldflags "-static"' -o ./bin/driver-registrar.exe ./cmd/driver-registrar

So what we need is to run a windows pod with above two components on every windows agent node.

@andyzhangx
Copy link
Author

Update:
I did a few investigations to enable CSI on Windows, finally, I found there is a blocking issue related to driver-registrar component, the error would be like following:

I0423 07:21:15.364334    8024 main.go:75] Attempting to open a gRPC connection with: %!q(*string=0xc0422940b0)
I0423 07:21:15.500335    8024 connection.go:68] Connecting to 127.0.0.1:10000
I0423 07:21:15.500335    8024 connection.go:95] Still trying, connection is CONNECTING
I0423 07:21:15.502335    8024 connection.go:92] Connected
I0423 07:21:15.502335    8024 main.go:83] Calling CSI driver to discover driver name.
I0423 07:21:15.502335    8024 connection.go:136] GRPC call: /csi.v0.Identity/GetPluginInfo
I0423 07:21:15.502335    8024 connection.go:137] GRPC request:
I0423 07:21:15.504336    8024 connection.go:139] GRPC response: name:"csi-hostpath" vendor_version:"0.2.0"
I0423 07:21:15.504336    8024 connection.go:140] GRPC error: <nil>
I0423 07:21:15.504336    8024 main.go:91] CSI driver name: "csi-hostpath"
I0423 07:21:15.504336    8024 main.go:94] Calling CSI driver to discover node ID.
I0423 07:21:15.504336    8024 connection.go:136] GRPC call: /csi.v0.Node/NodeGetId
I0423 07:21:15.504336    8024 connection.go:137] GRPC request:
I0423 07:21:15.504336    8024 connection.go:139] GRPC response: node_id:"15282k8s9010"
I0423 07:21:15.504336    8024 connection.go:140] GRPC error: <nil>
I0423 07:21:15.504336    8024 main.go:102] CSI driver node ID: "15282k8s9010"
I0423 07:21:15.504336    8024 main.go:106] Loading kubeconfig.
E0423 07:21:15.505334    8024 main.go:109] open /var/run/secrets/kubernetes.io/serviceaccount/token: The system cannot find the path specified.

It's related to kubernetes/kubernetes#52419, Windows Server Insider build 17101 would fix this issue, I will continue the work after 17101 is released(around May.2018), related error inside a windows container which has serviceAccount setting is like following:

PS C:\var\run\secrets\kubernetes.io\serviceaccount> Get-Content ca.crt
Get-Content : Could not find a part of the path 'C:\var\run\secrets\kubernetes.io\serviceaccount\ca.crt'.
At line:1 char:1
+ Get-Content ca.crt
+ ~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (C:\var\run\secr...eaccount\ca.crt:String) [Get-Content], DirectoryNotFoundException
    + FullyQualifiedErrorId : GetContentReaderDirectoryNotFoundError,Microsoft.PowerShell.Commands.GetContentCommand

Also share all my CSI on Windows work here:
https://github.com/andyzhangx/demo/tree/master/windows/csi/hostpath

@andyzhangx
Copy link
Author

FYI @karataliu

@andyzhangx andyzhangx changed the title any example about CSI on windows? Enable CSI hostpath example on windows? Apr 24, 2018
@andyzhangx andyzhangx changed the title Enable CSI hostpath example on windows? Enable CSI hostpath example on windows Apr 24, 2018
@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Apr 23, 2019
@fejta-bot
Copy link

Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle rotten

@k8s-ci-robot k8s-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels May 23, 2019
@feiskyer
Copy link

/remove-lifecycle rotten

@k8s-ci-robot k8s-ci-robot removed the lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. label May 23, 2019
@fejta-bot
Copy link

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Aug 21, 2019
@fejta-bot
Copy link

Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.

If this issue is safe to close now please do so with /close.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/lifecycle rotten

@k8s-ci-robot k8s-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Sep 20, 2019
@fejta-bot
Copy link

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/close

@k8s-ci-robot
Copy link
Contributor

@fejta-bot: Closing this issue.

In response to this:

Rotten issues close after 30d of inactivity.
Reopen the issue with /reopen.
Mark the issue as fresh with /remove-lifecycle rotten.

Send feedback to sig-testing, kubernetes/test-infra and/or fejta.
/close

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed.
Projects
None yet
Development

No branches or pull requests

4 participants