-
Notifications
You must be signed in to change notification settings - Fork 61
Autostart CSI proxy on boot #194
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
Autostart CSI proxy on boot #194
Conversation
Welcome @pradeep-hegde! |
Hi @pradeep-hegde. 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. |
/ok-to-test |
@@ -13,7 +13,7 @@ Copy-Item -Path "C:\Users\$env:UserName\csi-proxy.exe" -Destination "C:\etc\kube | |||
|
|||
# restart the csiproxy service | |||
$flags = "-v=5 -windows-service -log_file=C:\etc\kubernetes\logs\csi-proxy.log -logtostderr=false" | |||
sc.exe create csiproxy binPath= "C:\etc\kubernetes\node\bin\csi-proxy.exe $flags" | |||
sc.exe create csiproxy start= "auto" binPath= "C:\etc\kubernetes\node\bin\csi-proxy.exe $flags" |
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've recently removed this file in #190, I'll keep an eye on this PR if it gets merged before that one to use this flag in the new file too
@@ -51,7 +51,7 @@ On successful execution of `make build`, the output binary `csi-proxy.exe` will | |||
csi-proxy.exe can be installed and run as binary or run as a Windows service on each Windows node. See the following as an example to run CSI Proxy as a web service. | |||
``` | |||
$flags = "-windows-service -log_file=C:\etc\kubernetes\logs\csi-proxy.log -logtostderr=false" |
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 the node is created with kube-up.sh from the kubernetes/kubernetes repo I believe that https://github.com/kubernetes/kubernetes/blob/master/cluster/gce/windows/k8s-node-setup.psm1#L449-L459 will redo the setup and start CSI Proxy again if the node is restarted
After this change we'd need to do the setup only once and then on reboot it'd be started automatically, is my understanding of the setup being done only once correct?
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.
Looks like https://github.com/kubernetes/kubernetes/blob/master/cluster/gce/windows/k8s-node-setup.psm1#L449-L459 is independent of the ps1 script but it can certainly use the same strategy.
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.
Should a new PR be sent for this repo similar to this change?
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.
not really, it was more of a general question about in which scenarios we would need to put this flag in a prod environment, the kube-up.sh script are only used to create dev clusters and e2e clusters
/assign @andyzhangx |
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.
/lgtm
/approve
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: andyzhangx, pradeep-hegde 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 |
What type of PR is this?
/kind documentation
What this PR does / why we need it:
This PR will fix the issue of CSI proxy not starting automatically when the Windows node is restarted.
Before this PR, the Startup type of CSI proxy was set to manual by default.
If the windows node is rebooted, the CSI proxy was not started.
After this PR, CSI proxy startup type is set to automatic on boot.
Which issue(s) this PR fixes:
Special notes for your reviewer:
Does this PR introduce a user-facing change?: