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
d3e24e10
Commit
d3e24e10
authored
Feb 15, 2017
by
Yu-Ju Hong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix the output of health-mointor.sh
The script show prints the errors/response of the health check, but not show the progress of `curl`.
parent
e73e2542
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
4 deletions
+8
-4
health-monitor.sh
cluster/gce/container-linux/health-monitor.sh
+4
-2
health-monitor.sh
cluster/gce/gci/health-monitor.sh
+4
-2
No files found.
cluster/gce/container-linux/health-monitor.sh
View file @
d3e24e10
...
...
@@ -42,10 +42,12 @@ function kubelet_monitoring {
# TODO(andyzheng0831): replace it with a more reliable method if possible.
sleep
120
local
-r
max_seconds
=
10
local
output
=
""
while
[
1
]
;
do
if
!
curl
--insecure
-m
"
${
max_seconds
}
"
-f
-s
https://127.0.0.1:
${
KUBELET_PORT
:-
10250
}
/healthz
>
/dev/null
;
then
if
!
output
=
$(
curl
--insecure
-m
"
${
max_seconds
}
"
-f
-s
-S
https://127.0.0.1:
${
KUBELET_PORT
:-
10250
}
/healthz 2>&1
)
;
then
# Print the response and/or errors.
echo
$output
echo
"Kubelet is unhealthy!"
curl
--insecure
https://127.0.0.1:
${
KUBELET_PORT
:-
10250
}
/healthz
pkill kubelet
# Wait for a while, as we don't want to kill it again before it is really up.
sleep
60
...
...
cluster/gce/gci/health-monitor.sh
View file @
d3e24e10
...
...
@@ -42,10 +42,12 @@ function kubelet_monitoring {
# TODO(andyzheng0831): replace it with a more reliable method if possible.
sleep
120
local
-r
max_seconds
=
10
local
output
=
""
while
[
1
]
;
do
if
!
curl
-m
"
${
max_seconds
}
"
-f
-s
http://127.0.0.1:10255/healthz
>
/dev/null
;
then
if
!
output
=
$(
curl
-m
"
${
max_seconds
}
"
-f
-s
-S
http://127.0.0.1:10255/healthz 2>&1
)
;
then
# Print the response and/or errors.
echo
$output
echo
"Kubelet is unhealthy!"
curl http://127.0.0.1:10255/healthz
pkill kubelet
# Wait for a while, as we don't want to kill it again before it is really up.
sleep
60
...
...
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