-
Notifications
You must be signed in to change notification settings - Fork 635
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 csi-proxy monitoring to health checker #556
Conversation
Hi @mcshooter. Thanks for your PR. I'm waiting for a 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. |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: mcshooter The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/cc @jeremyje |
dd22a19
to
e2e1626
Compare
@@ -85,6 +85,13 @@ func getHealthCheckFunc(hco *options.HealthCheckerOptions) func() (bool, error) | |||
} | |||
return true, nil | |||
} | |||
case types.CsiProxyComponent: | |||
return func() (bool, error) { | |||
if _, err := powershell("Get-Process", types.CsiProxyComponent); err != 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.
Does csi-proxy host an HTTP endpoint? I'd figure it would.
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 have been looking for it as well, kind of like what kube-proxy has. But I haven't found anything like it. For now, I am using this to get some support in for csi-proxy. If I find it, I'll update it
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's using gRPC via named pipes in Windows. https://github.com/kubernetes-csi/csi-proxy/blob/9e1e33da998e4c1e3c7c4c00ceae64cebca0c258/internal/server/server.go#L73-L98 You'll need to import those client libraries and connect to the csi proxy endpoint.
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.
The list of named pipes can be obtained with: [System.IO.Directory]::GetFiles("\\.\\pipe\\")
, in my dev env it shows as:
\\.\\pipe\\csi-proxy-filesystem-v1alpha1
\\.\\pipe\\csi-proxy-filesystem-v1beta1
\\.\\pipe\\csi-proxy-filesystem-v1beta2
\\.\\pipe\\csi-proxy-disk-v1alpha1
\\.\\pipe\\csi-proxy-disk-v1beta1
\\.\\pipe\\csi-proxy-disk-v1beta2
\\.\\pipe\\csi-proxy-disk-v1beta3
\\.\\pipe\\csi-proxy-volume-v1alpha1
\\.\\pipe\\csi-proxy-volume-v1beta1
\\.\\pipe\\csi-proxy-volume-v1beta2
\\.\\pipe\\csi-proxy-volume-v1beta3
\\.\\pipe\\csi-proxy-smb-v1alpha1
\\.\\pipe\\csi-proxy-smb-v1beta1
\\.\\pipe\\csi-proxy-smb-v1beta2
\\.\\pipe\\csi-proxy-system-v1alpha1
\\.\\pipe\\csi-proxy-iscsi-v1alpha1
\\.\\pipe\\csi-proxy-iscsi-v1alpha2
Unfortunately there's no csi-proxy-healthz
named pipe or similar, there are only versioned APIs for different API groups.
Checking that the process exists should be good enough as csi-proxy will crash on an error and get restarted by the window service or if a new endpoint is needed we can add something like \\.\\pipe\\csi-proxy-healthz
, if we decide to go with this route you'd need to import the csi-proxy client library as @jeremyje says.
cc @jingxu97
/sig windows |
/retest |
e2e1626
to
fffd841
Compare
/retest |
1 similar comment
/retest |
@@ -85,6 +85,13 @@ func getHealthCheckFunc(hco *options.HealthCheckerOptions) func() (bool, error) | |||
} | |||
return true, nil | |||
} | |||
case types.CsiProxyComponent: | |||
return func() (bool, error) { | |||
if _, err := powershell("Get-Process", types.CsiProxyComponent); err != 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.
If we just check whether the process exists, wouldn't windows service already handled it?
Why do we need this health checker now then?
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 am currently looking into a way to connect to csi-proxy endpoint for NPD Health Checker to use to test if it is up and running. In the meantime, this was used to test it.
CSI-Proxy is being integrated on windows nodes, running as a windows service. It is used to help CSI Node Plugin interact with the node given that privileged containers are not yet supported on Windows. This change monitors to ensure that csi-proxy is running and available through NPD's health checker.
#461