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
e7fa5d4d
Commit
e7fa5d4d
authored
Sep 24, 2015
by
Brian Grant
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #12646 from Huawei-PaaS/ubuntu_verify_cluster_timeout
remove duplicated cluster verify logic in ubuntu deployments scripts.
parents
55bd5de2
b1ecd645
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
0 deletions
+14
-0
util.sh
cluster/ubuntu/util.sh
+14
-0
No files found.
cluster/ubuntu/util.sh
View file @
e7fa5d4d
...
@@ -140,6 +140,8 @@ function verify-master(){
...
@@ -140,6 +140,8 @@ function verify-master(){
printf
"Validating master"
printf
"Validating master"
local
-a
required_daemon
=(
"kube-apiserver"
"kube-controller-manager"
"kube-scheduler"
)
local
-a
required_daemon
=(
"kube-apiserver"
"kube-controller-manager"
"kube-scheduler"
)
local
validated
=
"1"
local
validated
=
"1"
local
try_count
=
1
local
max_try_count
=
30
until
[[
"
$validated
"
==
"0"
]]
;
do
until
[[
"
$validated
"
==
"0"
]]
;
do
validated
=
"0"
validated
=
"0"
local
daemon
local
daemon
...
@@ -147,6 +149,11 @@ function verify-master(){
...
@@ -147,6 +149,11 @@ function verify-master(){
ssh
$SSH_OPTS
"
$MASTER
"
"pgrep -f
${
daemon
}
"
>
/dev/null 2>&1
||
{
ssh
$SSH_OPTS
"
$MASTER
"
"pgrep -f
${
daemon
}
"
>
/dev/null 2>&1
||
{
printf
"."
printf
"."
validated
=
"1"
validated
=
"1"
((
try_count
=
try_count+1
))
if
[[
${
try_count
}
-gt
${
max_try_count
}
]]
;
then
printf
"
\n
Warning: Process
\"
${
daemon
}
\"
failed to run on
${
MASTER
}
, please check.
\n
"
exit
1
fi
sleep
2
sleep
2
}
}
done
done
...
@@ -160,6 +167,8 @@ function verify-node(){
...
@@ -160,6 +167,8 @@ function verify-node(){
printf
"Validating
${
1
}
"
printf
"Validating
${
1
}
"
local
-a
required_daemon
=(
"kube-proxy"
"kubelet"
"docker"
)
local
-a
required_daemon
=(
"kube-proxy"
"kubelet"
"docker"
)
local
validated
=
"1"
local
validated
=
"1"
local
try_count
=
1
local
max_try_count
=
30
until
[[
"
$validated
"
==
"0"
]]
;
do
until
[[
"
$validated
"
==
"0"
]]
;
do
validated
=
"0"
validated
=
"0"
local
daemon
local
daemon
...
@@ -167,6 +176,11 @@ function verify-node(){
...
@@ -167,6 +176,11 @@ function verify-node(){
ssh
$SSH_OPTS
"
$1
"
"pgrep -f
$daemon
"
>
/dev/null 2>&1
||
{
ssh
$SSH_OPTS
"
$1
"
"pgrep -f
$daemon
"
>
/dev/null 2>&1
||
{
printf
"."
printf
"."
validated
=
"1"
validated
=
"1"
((
try_count
=
try_count+1
))
if
[[
${
try_count
}
-gt
${
max_try_count
}
]]
;
then
printf
"
\n
Warning: Process
\"
${
daemon
}
\"
failed to run on
${
1
}
, please check.
\n
"
exit
1
fi
sleep
2
sleep
2
}
}
done
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