-
Notifications
You must be signed in to change notification settings - Fork 61
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
Add another client per API that can communicate with a custom named pipe #124
Add another client per API that can communicate with a custom named pipe #124
Conversation
Hi @mauriciopoppe. Thanks for your PR. I'm waiting for a kubernetes-csi 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. |
3124542
to
408505d
Compare
408505d
to
67a71bb
Compare
/assign @ddebroy |
/retest |
This is super cool! |
Will approve shortly as soon as the |
func NewClientWithPipePath(pipePath string) (*Client, error) { | ||
|
||
// verify that the pipe exists | ||
_, err := winio.DialPipe(pipePath, nil) |
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.
wondering what is the difference between winio.DialPipe and the following grpc.Dial?
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.
I read the first test in https://github.com/microsoft/go-winio/blob/master/pipe_test.go, grpc.Dial
creates connections in the background unless WithBlock()
is also sent as an option (which I also tried but got stuck in the v1 request)
/lgtm |
/ok-to-test |
/retest |
ece50b7
to
ff571b0
Compare
/retest |
ff571b0
to
f27fa4e
Compare
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ddebroy, mauriciopoppe 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 |
1d60e77 Merge pull request kubernetes-csi#131 from pohly/kubernetes-1.20-tag 9f10459 prow.sh: support building Kubernetes for a specific version fe1f284 Merge pull request kubernetes-csi#121 from kvaps/namespace-check 8fdf0f7 Merge pull request kubernetes-csi#128 from fengzixu/master 1c94220 fix: fix a bug of csi-sanity a4c41e6 Merge pull request kubernetes-csi#127 from pohly/fix-boilerplate ece0f50 check namespace for snapshot-controller dbd8967 verify-boilerplate.sh: fix path to script 9289fd1 Merge pull request kubernetes-csi#125 from sachinkumarsingh092/optional-spelling-boilerplate-checks ad29307 Make the spelling and boilerplate checks optional 5f06d02 Merge pull request kubernetes-csi#124 from sachinkumarsingh092/fix-spellcheck-boilerplate-tests 48186eb Fix spelling and boilerplate errors 71690af Merge pull request kubernetes-csi#122 from sachinkumarsingh092/include-spellcheck-boilerplate-tests 981be3f Adding spelling and boilerplate checks. 2bb7525 Merge pull request kubernetes-csi#117 from fengzixu/master 3b6d17b Merge pull request kubernetes-csi#118 from pohly/cloud-build-timeout 9318c6c cloud build: double the timeout, now 1 hour 4ab8b15 use the tag to replace commit of csi-test 5d74e45 change the csi-test import path to v4 7dcd0a9 upgrade csi-test to v4.0.2 86ff580 Merge pull request kubernetes-csi#116 from andyzhangx/export-image-name c3a9662 allow export image name and registry name c6a88c6 Merge pull request kubernetes-csi#113 from xing-yang/install_snapshot_controller 45ec4c6 Fix the install of snapshot CRDs and controller 5d874cc Merge pull request kubernetes-csi#112 from xing-yang/cleanup 79bbca7 Cleanup d437673 Merge pull request kubernetes-csi#111 from xing-yang/update_snapshot_v1_rc 57718f8 Update snapshot CRD version git-subtree-dir: release-tools git-subtree-split: 1d60e7792624a9938c0bd1b045211fbb89e513d6
What type of PR is this?
/kind feature
What this PR does / why we need it:
There are two scenarios that we might see while deploying the CSI proxy:
Instead of handling multiple imports in PD CSI driver we can just use the v1 client with additional startup code to identify which of these cases should attempt to solve.
This PR adds another way to initialize a client by sending a named pipe, the idea is that the user of the client can import the v1 client and still be able to call the v1beta named pipes for compatibility
The client is:
The consumers of the client should send the
pipePath
they want to use, for example GCE PD CSI driver is using the following:In my cluster I have CSI Proxy server v0.2, I've deployed GCE PD CSI driver with the v1 client (this change) and it could successfully avoid connecting to the v1 api because it doesn't exist, the logs:
Edit:
Even though I could connect to the v1beta API using the v1 client I couldn't send a message to it, the error I got was:
In PD CSI we are falling back to using both APIs at the same time, in any case, the check with
winio.Dial
works :)Does this PR introduce a user-facing change?:
/assign @jingxu97