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
aebc1bcc
Commit
aebc1bcc
authored
Jan 07, 2016
by
Phillip Wittrock
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
node e2e tests - retry fkaky failures caused by gcloud authentication
parent
9ac13f66
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
+10
-0
gcloud.go
test/e2e_node/gcloud/gcloud.go
+10
-0
No files found.
test/e2e_node/gcloud/gcloud.go
View file @
aebc1bcc
...
@@ -136,6 +136,16 @@ func (gc *gCloudClientImpl) Run(
...
@@ -136,6 +136,16 @@ func (gc *gCloudClientImpl) Run(
go
func
()
{
go
func
()
{
// Create the tmp directory
// Create the tmp directory
out
,
err
:=
gc
.
Command
(
"mkdir"
,
"-p"
,
tDir
)
out
,
err
:=
gc
.
Command
(
"mkdir"
,
"-p"
,
tDir
)
// Work around for gcloud flakiness - TODO: debug why gcloud sometimes cannot find credentials for some hosts
// If there was an error about credentials, retry making the directory 6 times to see if it can be resolved
// This is to help debug if the credential issues are persistent for a given host on a given run, or transient
// And if downstream gcloud commands are also impacted
for
i
:=
0
;
i
<
6
&&
err
!=
nil
&&
strings
.
Contains
(
string
(
out
),
"does not have any valid credentials"
);
i
++
{
glog
.
Errorf
(
"mkdir failed on host %s due to credential issues, retrying in 5 seconds %v %s"
,
gc
.
host
,
err
,
out
)
time
.
Sleep
(
5
*
time
.
Second
)
out
,
err
=
gc
.
Command
(
"mkdir"
,
"-p"
,
tDir
)
}
if
err
!=
nil
{
if
err
!=
nil
{
glog
.
Errorf
(
"mkdir failed %v %s"
,
err
,
out
)
glog
.
Errorf
(
"mkdir failed %v %s"
,
err
,
out
)
h
.
Output
<-
RunResult
{
out
,
err
,
fmt
.
Sprintf
(
"mkdir -p %s"
,
tDir
)}
h
.
Output
<-
RunResult
{
out
,
err
,
fmt
.
Sprintf
(
"mkdir -p %s"
,
tDir
)}
...
...
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