Merge pull request #93765 from jeremyje/restartsd

Configure StackdriverLogging Windows service to restart on failure.
This commit is contained in:
Kubernetes Prow Robot 2020-11-12 23:26:23 -08:00 committed by GitHub
commit 84d15ca322
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2037,6 +2037,11 @@ function Configure-StackdriverAgent {
$config = $FLUENTD_CONFIG.replace('NODE_NAME', (hostname)) $config = $FLUENTD_CONFIG.replace('NODE_NAME', (hostname))
$config | Out-File -FilePath $fluentd_config_file -Encoding ASCII $config | Out-File -FilePath $fluentd_config_file -Encoding ASCII
Log-Output "Wrote fluentd logging config to $fluentd_config_file" Log-Output "Wrote fluentd logging config to $fluentd_config_file"
# Configure StackdriverLogging to automatically restart on failure after 10
# seconds. The logging agent may die die to various disruptions but can be
# resumed.
sc.exe failure StackdriverLogging reset= 0 actions= restart/1000/restart/10000
} }
# The NODE_NAME placeholder must be replaced with the node's name (hostname). # The NODE_NAME placeholder must be replaced with the node's name (hostname).