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
ebdef4d5
Commit
ebdef4d5
authored
Dec 12, 2016
by
Wojciech Tyczynski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Reduce amount of annoing logs in large clusters
parent
5b37bcc3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
6 deletions
+15
-6
util.go
test/e2e/framework/util.go
+15
-6
No files found.
test/e2e/framework/util.go
View file @
ebdef4d5
...
@@ -171,6 +171,9 @@ const (
...
@@ -171,6 +171,9 @@ const (
// GC issues 2 requestes for single delete.
// GC issues 2 requestes for single delete.
gcThroughput
=
10
gcThroughput
=
10
// Minimal number of nodes for the cluster to be considered large.
largeClusterThreshold
=
100
// TODO(justinsb): Avoid hardcoding this.
// TODO(justinsb): Avoid hardcoding this.
awsMasterIP
=
"172.20.0.9"
awsMasterIP
=
"172.20.0.9"
...
@@ -2435,7 +2438,9 @@ func WaitForAllNodesSchedulable(c clientset.Interface, timeout time.Duration) er
...
@@ -2435,7 +2438,9 @@ func WaitForAllNodesSchedulable(c clientset.Interface, timeout time.Duration) er
Logf
(
"Waiting up to %v for all (but %d) nodes to be schedulable"
,
timeout
,
TestContext
.
AllowedNotReadyNodes
)
Logf
(
"Waiting up to %v for all (but %d) nodes to be schedulable"
,
timeout
,
TestContext
.
AllowedNotReadyNodes
)
var
notSchedulable
[]
*
v1
.
Node
var
notSchedulable
[]
*
v1
.
Node
attempt
:=
0
return
wait
.
PollImmediate
(
30
*
time
.
Second
,
timeout
,
func
()
(
bool
,
error
)
{
return
wait
.
PollImmediate
(
30
*
time
.
Second
,
timeout
,
func
()
(
bool
,
error
)
{
attempt
++
notSchedulable
=
nil
notSchedulable
=
nil
opts
:=
v1
.
ListOptions
{
opts
:=
v1
.
ListOptions
{
ResourceVersion
:
"0"
,
ResourceVersion
:
"0"
,
...
@@ -2461,12 +2466,16 @@ func WaitForAllNodesSchedulable(c clientset.Interface, timeout time.Duration) er
...
@@ -2461,12 +2466,16 @@ func WaitForAllNodesSchedulable(c clientset.Interface, timeout time.Duration) er
//
//
// However, we only allow non-ready nodes with some specific reasons.
// However, we only allow non-ready nodes with some specific reasons.
if
len
(
notSchedulable
)
>
0
{
if
len
(
notSchedulable
)
>
0
{
Logf
(
"Unschedulable nodes:"
)
// In large clusters, log them only every 10th pass.
for
i
:=
range
notSchedulable
{
if
len
(
nodes
.
Items
)
>=
largeClusterThreshold
&&
attempt
%
10
==
0
{
Logf
(
"-> %s Ready=%t Network=%t"
,
Logf
(
"Unschedulable nodes:"
)
notSchedulable
[
i
]
.
Name
,
for
i
:=
range
notSchedulable
{
IsNodeConditionSetAsExpected
(
notSchedulable
[
i
],
v1
.
NodeReady
,
true
),
Logf
(
"-> %s Ready=%t Network=%t"
,
IsNodeConditionSetAsExpected
(
notSchedulable
[
i
],
v1
.
NodeNetworkUnavailable
,
false
))
notSchedulable
[
i
]
.
Name
,
IsNodeConditionSetAsExpectedSilent
(
notSchedulable
[
i
],
v1
.
NodeReady
,
true
),
IsNodeConditionSetAsExpectedSilent
(
notSchedulable
[
i
],
v1
.
NodeNetworkUnavailable
,
false
))
}
Logf
(
"================================"
)
}
}
}
}
if
len
(
notSchedulable
)
>
TestContext
.
AllowedNotReadyNodes
{
if
len
(
notSchedulable
)
>
TestContext
.
AllowedNotReadyNodes
{
...
...
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