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
a84e9457
Commit
a84e9457
authored
Feb 09, 2015
by
roberthbailey
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #4252 from satnam6502/kubeup
Report more information about nodes during cluster validation
parents
301eba9d
a57d4c59
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
validate-cluster.sh
cluster/validate-cluster.sh
+5
-2
No files found.
cluster/validate-cluster.sh
View file @
a84e9457
...
@@ -32,7 +32,8 @@ get-password
...
@@ -32,7 +32,8 @@ get-password
detect-master
>
/dev/null
detect-master
>
/dev/null
detect-minions
>
/dev/null
detect-minions
>
/dev/null
MINIONS_FILE
=
/tmp/minions
MINIONS_FILE
=
/tmp/minions-
$$
trap
'rm -rf "${MINIONS_FILE}"'
EXIT
# Make several attempts to deal with slow cluster birth.
# Make several attempts to deal with slow cluster birth.
attempt
=
0
attempt
=
0
while
true
;
do
while
true
;
do
...
@@ -43,6 +44,7 @@ while true; do
...
@@ -43,6 +44,7 @@ while true; do
else
else
if
((
attempt
>
5
))
;
then
if
((
attempt
>
5
))
;
then
echo
-e
"
${
color_red
}
Detected
${
found
}
nodes out of
${
NUM_MINIONS
}
. Your cluster may not be working.
${
color_norm
}
"
echo
-e
"
${
color_red
}
Detected
${
found
}
nodes out of
${
NUM_MINIONS
}
. Your cluster may not be working.
${
color_norm
}
"
cat
-n
"
${
MINIONS_FILE
}
"
exit
2
exit
2
fi
fi
attempt
=
$((
attempt+1
))
attempt
=
$((
attempt+1
))
...
@@ -50,7 +52,7 @@ while true; do
...
@@ -50,7 +52,7 @@ while true; do
fi
fi
done
done
echo
"Found
${
found
}
nodes."
echo
"Found
${
found
}
nodes."
cat
"
${
MINIONS_FILE
}
"
cat
-n
"
${
MINIONS_FILE
}
"
# On vSphere, use minion IPs as their names
# On vSphere, use minion IPs as their names
if
[[
"
${
KUBERNETES_PROVIDER
}
"
==
"vsphere"
]]
||
[[
"
${
KUBERNETES_PROVIDER
}
"
==
"vagrant"
]]
;
then
if
[[
"
${
KUBERNETES_PROVIDER
}
"
==
"vsphere"
]]
||
[[
"
${
KUBERNETES_PROVIDER
}
"
==
"vagrant"
]]
;
then
...
@@ -62,6 +64,7 @@ for (( i=0; i<${#MINION_NAMES[@]}; i++)); do
...
@@ -62,6 +64,7 @@ for (( i=0; i<${#MINION_NAMES[@]}; i++)); do
count
=
$(
grep
-c
"
${
MINION_NAMES
[
$i
]
}
"
"
${
MINIONS_FILE
}
"
)
||
:
count
=
$(
grep
-c
"
${
MINION_NAMES
[
$i
]
}
"
"
${
MINIONS_FILE
}
"
)
||
:
if
[[
"
${
count
}
"
==
"0"
]]
;
then
if
[[
"
${
count
}
"
==
"0"
]]
;
then
echo
-e
"
${
color_red
}
Failed to find
${
MINION_NAMES
[
$i
]
}
, cluster is probably broken.
${
color_norm
}
"
echo
-e
"
${
color_red
}
Failed to find
${
MINION_NAMES
[
$i
]
}
, cluster is probably broken.
${
color_norm
}
"
cat
-n
"
${
MINIONS_FILE
}
"
exit
1
exit
1
fi
fi
...
...
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