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
313d4045
Commit
313d4045
authored
Nov 25, 2016
by
Marcin Wielgus
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add more debug information around strange failure in e2e tests
parent
1f82f249
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
0 deletions
+28
-0
cluster_size_autoscaling.go
test/e2e/cluster_size_autoscaling.go
+28
-0
No files found.
test/e2e/cluster_size_autoscaling.go
View file @
313d4045
...
@@ -210,6 +210,34 @@ var _ = framework.KubeDescribe("Cluster size autoscaling [Slow]", func() {
...
@@ -210,6 +210,34 @@ var _ = framework.KubeDescribe("Cluster size autoscaling [Slow]", func() {
ExpectNoError
(
err
)
ExpectNoError
(
err
)
newNodesSet
:=
sets
.
NewString
(
newNodes
...
)
newNodesSet
:=
sets
.
NewString
(
newNodes
...
)
newNodesSet
.
Delete
(
nodes
...
)
newNodesSet
.
Delete
(
nodes
...
)
if
len
(
newNodesSet
)
>
1
{
By
(
fmt
.
Sprintf
(
"Spotted following new nodes in %s: %v"
,
minMig
,
newNodesSet
))
glog
.
Infof
(
"Usually only 1 new node is expected, investigating"
)
glog
.
Infof
(
"Kubectl:%s
\n
"
,
framework
.
RunKubectlOrDie
(
"kubectl get nodes -o yaml"
))
if
output
,
err
:=
exec
.
Command
(
"gcloud"
,
"compute"
,
"instances"
,
"list"
,
"--project="
+
framework
.
TestContext
.
CloudConfig
.
ProjectID
,
"--zone="
+
framework
.
TestContext
.
CloudConfig
.
Zone
)
.
Output
();
err
!=
nil
{
glog
.
Infof
(
"Gcloud compute instances list: %s"
,
output
)
}
else
{
glog
.
Errorf
(
"Failed to get instances list: %v"
,
err
)
}
for
newNode
:=
range
newNodesSet
{
if
output
,
err
:=
exec
.
Command
(
"gcloud"
,
"compute"
,
"instances"
,
"describe"
,
newNode
,
"--project="
+
framework
.
TestContext
.
CloudConfig
.
ProjectID
,
"--zone="
+
framework
.
TestContext
.
CloudConfig
.
Zone
)
.
Output
();
err
!=
nil
{
glog
.
Infof
(
"Gcloud compute instances describe: %s"
,
output
)
}
else
{
glog
.
Errorf
(
"Failed to get instances describe: %v"
,
err
)
}
}
// TODO: possibly remove broken node from newNodesSet to prevent removeLabel from crashing.
// However at this moment we DO WANT it to crash so that we don't check all test runs for the
// rare behavior, but only the broken ones.
}
defer
removeLabels
(
newNodesSet
)
defer
removeLabels
(
newNodesSet
)
By
(
fmt
.
Sprintf
(
"Setting labels for new nodes: %v"
,
newNodesSet
.
List
()))
By
(
fmt
.
Sprintf
(
"Setting labels for new nodes: %v"
,
newNodesSet
.
List
()))
updateNodeLabels
(
c
,
newNodesSet
,
labels
,
nil
)
updateNodeLabels
(
c
,
newNodesSet
,
labels
,
nil
)
...
...
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