Merge pull request #77568 from yujuhong/catch-exception

GCE/Windows: ignore stopping errors for stackdriver
This commit is contained in:
Kubernetes Prow Robot 2019-05-08 17:15:38 -07:00 committed by GitHub
commit 5bd88c85bf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1084,7 +1084,7 @@ $STACKDRIVER_ROOT = 'C:\Program Files (x86)\Stackdriver'
# `Restart-Service StackdriverLogging` may fail because StackdriverLogging
# sometimes is unstoppable, so we work around it by killing the processes.
function Restart-StackdriverLoggingAgent {
Stop-Service -NoWait StackdriverLogging
Stop-Service -NoWait -ErrorAction Ignore StackdriverLogging
# TODO: check periodically to lower the wait time
Start-Sleep 10
if ((Get-service StackdriverLogging).Status -ne 'Stopped') {