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
56ee6683
Commit
56ee6683
authored
Dec 16, 2014
by
bgrant0607
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2979 from brendandburns/e2e
Wait for not pending, not for running.
parents
12803c1a
d2ff21d3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
liveness.sh
hack/e2e-suite/liveness.sh
+4
-4
No files found.
hack/e2e-suite/liveness.sh
View file @
56ee6683
...
...
@@ -30,7 +30,7 @@ function teardown() {
${
KUBECFG
}
delete pods/liveness-http
}
function
waitFor
Runn
ing
()
{
function
waitFor
NotPend
ing
()
{
pod_id_list
=
$(
$KUBECFG
'-template={{range.items}}{{.id}} {{end}}'
-l
test
=
liveness list pods
)
# Pod turn up on a clean cluster can take a while for the docker image pull.
all_running
=
0
...
...
@@ -40,7 +40,7 @@ function waitForRunning() {
all_running
=
1
for
id
in
$pod_id_list
;
do
current_status
=
$(
$KUBECFG
-template
'{{.currentState.status}}'
get pods/
$id
)
||
true
if
[[
"
$current_status
"
!=
"Runn
ing"
]]
;
then
if
[[
"
$current_status
"
==
"Pend
ing"
]]
;
then
all_running
=
0
break
fi
...
...
@@ -58,7 +58,7 @@ function waitForRunning() {
trap
"teardown"
EXIT
${
KUBECFG
}
-c
${
KUBE_ROOT
}
/examples/liveness/http-liveness.yaml create pods
waitFor
Runn
ing
waitFor
NotPend
ing
before
=
$(${
KUBECFG
}
'-template={{.currentState.info.liveness.restartCount}}'
get pods/liveness-http
)
...
...
@@ -67,7 +67,7 @@ for i in $(seq 1 24); do
sleep
10
after
=
$(${
KUBECFG
}
'-template={{.currentState.info.liveness.restartCount}}'
get pods/liveness-http
)
echo
"Restarts:
${
after
}
>
${
before
}
"
if
[[
"
${
after
}
"
>
"
${
before
}
]]; then
if
[[
"
${
after
}
"
>
"
${
before
}
"
]]
;
then
break
fi
done
...
...
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