Skip to content
This repository has been archived by the owner on Oct 24, 2023. It is now read-only.

fix: Force restart kubeproxy to avoid stucking #4375

Merged
merged 1 commit into from
Apr 22, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion staging/provisioning/windows/kubeletstart.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ if ($global:NetworkPlugin -eq "azure") {

# Restart Kubeproxy, which would wait, until the network is created
# This was fixed in 1.15, workaround still needed for 1.14 https://github.com/kubernetes/kubernetes/pull/78612
Restart-Service Kubeproxy
Restart-Service Kubeproxy -Force

# Set env file for Azure Stack
$env:AZURE_ENVIRONMENT_FILEPATH = "c:\k\azurestackcloud.json"
Expand Down
3 changes: 1 addition & 2 deletions staging/provisioning/windows/windowsnodereset.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,6 @@ if ($global:CsiProxyEnabled) {
Write-Log "Starting kubelet service"
Start-Service kubelet

Write-Log "Starting kubeproxy service"
Start-Service kubeproxy
Write-Log "Do not start kubeproxy service since kubelet will restart kubeproxy"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe this should be a comment over start-service kubelet? It makes sense in context here with the diff. Later it might be a bit of an odd logging statement.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I planned to log it in windowsnodereset.log so it will not surprise anyone why not restart kubeproxy when checking the logs. How do you think?


Write-Log "Exiting windowsnodereset.ps1"