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
56719f83
Commit
56719f83
authored
May 23, 2016
by
Huamin Chen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
when kubectl exec fails to find the container to run a command, it should retry
Signed-off-by:
Huamin Chen
<
hchen@redhat.com
>
parent
4215fe57
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
framework.go
test/e2e/framework/framework.go
+6
-0
No files found.
test/e2e/framework/framework.go
View file @
56719f83
...
...
@@ -476,6 +476,12 @@ func kubectlExecWithRetry(namespace string, podName, containerName string, args
Logf
(
"Warning: kubectl exec encountered i/o timeout.
\n
err=%v
\n
stdout=%v
\n
stderr=%v)"
,
err
,
string
(
stdOutBytes
),
string
(
stdErrBytes
))
continue
}
if
strings
.
Contains
(
strings
.
ToLower
(
string
(
stdErrBytes
)),
"container not found"
)
{
// Retry on "container not found" errors
Logf
(
"Warning: kubectl exec encountered container not found.
\n
err=%v
\n
stdout=%v
\n
stderr=%v)"
,
err
,
string
(
stdOutBytes
),
string
(
stdErrBytes
))
time
.
Sleep
(
2
*
time
.
Second
)
continue
}
}
return
stdOutBytes
,
stdErrBytes
,
err
...
...
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