Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
6a23a627
Unverified
Commit
6a23a627
authored
May 02, 2019
by
Kubernetes Prow Robot
Committed by
GitHub
May 02, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #77378 from yujuhong/kill-sd
GCE/Windows: force kill the stackdriver processes when necessary
parents
6a8a3682
bee570a2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
2 deletions
+18
-2
k8s-node-setup.psm1
cluster/gce/windows/k8s-node-setup.psm1
+18
-2
No files found.
cluster/gce/windows/k8s-node-setup.psm1
View file @
6a23a627
...
@@ -1079,6 +1079,22 @@ function Configure-Dockerd {
...
@@ -1079,6 +1079,22 @@ function Configure-Dockerd {
$STACKDRIVER_VERSION
=
'v1-9'
$STACKDRIVER_VERSION
=
'v1-9'
$STACKDRIVER_ROOT
=
'C:\Program Files (x86)\Stackdriver'
$STACKDRIVER_ROOT
=
'C:\Program Files (x86)\Stackdriver'
# Restart the Stackdriver logging agent
# `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
# TODO: check periodically to lower the wait time
Start-Sleep
10
if
((
Get-service
StackdriverLogging
)
.Status -ne
'Stopped'
)
{
# Force kill the processes.
Stop-Process
-Force -PassThru -Id
(
Get-WmiObject
win32_process |
Where
CommandLine -Like
'*Stackdriver/logging*'
)
.ProcessId
}
Start-Service
StackdriverLogging
}
# Install and start the Stackdriver logging agent according to
# Install and start the Stackdriver logging agent according to
# https://cloud.google.com/logging/docs/agent/installation.
# https://cloud.google.com/logging/docs/agent/installation.
# TODO(yujuhong): Update to a newer Stackdriver agent once it is released to
# TODO(yujuhong): Update to a newer Stackdriver agent once it is released to
...
@@ -1105,7 +1121,7 @@ function InstallAndStart-LoggingAgent {
...
@@ -1105,7 +1121,7 @@ function InstallAndStart-LoggingAgent {
"Stackdriver logging agent is already installed"
)
"Stackdriver logging agent is already installed"
)
# Restart-Service restarts a running service or starts a not-running
# Restart-Service restarts a running service or starts a not-running
# service.
# service.
Restart-S
ervice
StackdriverLogging
Restart-S
tackdriverLoggingAgent
return
return
}
}
...
@@ -1136,7 +1152,7 @@ function InstallAndStart-LoggingAgent {
...
@@ -1136,7 +1152,7 @@ function InstallAndStart-LoggingAgent {
-Encoding ASCII
-Encoding ASCII
# Restart the service to pick up the new configurations.
# Restart the service to pick up the new configurations.
Restart-S
ervice
StackdriverLogging
Restart-S
tackdriverLoggingAgent
Remove-Item
-Force -Recurse
$tmp_dir
Remove-Item
-Force -Recurse
$tmp_dir
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment