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
ae3c83f8
Commit
ae3c83f8
authored
Apr 22, 2015
by
Brian Grant
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #7144 from brendandburns/ssh-exit
Fix the ssh-to-node to actually fail on failures.
parents
9dcf1d54
78dabbdb
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
3 deletions
+14
-3
util.sh
cluster/gce/util.sh
+5
-1
util.sh
cluster/gke/util.sh
+9
-2
No files found.
cluster/gce/util.sh
View file @
ae3c83f8
...
...
@@ -967,11 +967,15 @@ function test-teardown {
function
ssh-to-node
{
local
node
=
"
$1
"
local
cmd
=
"
$2
"
# Loop until we can successfully ssh into the box
for
try
in
$(
seq
1 5
)
;
do
if
gcloud compute ssh
--ssh-flag
=
"-o LogLevel=quiet"
--project
"
${
PROJECT
}
"
--zone
=
"
${
ZONE
}
"
"
${
node
}
"
--command
"
${
cmd
}
"
;
then
if
gcloud compute ssh
--ssh-flag
=
"-o LogLevel=quiet"
--project
"
${
PROJECT
}
"
--zone
=
"
${
ZONE
}
"
"
${
node
}
"
--command
"
echo test
"
;
then
break
fi
sleep
5
done
# Then actually try the command.
gcloud compute ssh
--ssh-flag
=
"-o LogLevel=quiet"
--project
"
${
PROJECT
}
"
--zone
=
"
${
ZONE
}
"
"
${
node
}
"
--command
"
${
cmd
}
"
}
# Restart the kube-proxy on a node ($1)
...
...
cluster/gke/util.sh
View file @
ae3c83f8
...
...
@@ -238,8 +238,15 @@ function ssh-to-node() {
local
node
=
"
$1
"
local
cmd
=
"
$2
"
"
${
GCLOUD
}
"
compute ssh
--ssh-flag
=
"-o LogLevel=quiet"
--project
"
${
PROJECT
}
"
\
--zone
=
"
${
ZONE
}
"
"
${
node
}
"
--command
"
${
cmd
}
"
# Loop until we can successfully ssh into the box
for
try
in
$(
seq
1 5
)
;
do
if
gcloud compute ssh
--ssh-flag
=
"-o LogLevel=quiet"
--project
"
${
PROJECT
}
"
--zone
=
"
${
ZONE
}
"
"
${
node
}
"
--command
"echo test"
;
then
break
fi
sleep
5
done
# Then actually try the command.
gcloud compute ssh
--ssh-flag
=
"-o LogLevel=quiet"
--project
"
${
PROJECT
}
"
--zone
=
"
${
ZONE
}
"
"
${
node
}
"
--command
"
${
cmd
}
"
}
# Restart the kube-proxy on a node ($1)
...
...
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