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
cd30526b
Commit
cd30526b
authored
Sep 09, 2016
by
Kubernetes Submit Queue
Committed by
GitHub
Sep 09, 2016
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #32379 from wojtek-t/allow_for_notready_nodes_in_scalability
Automatic merge from submit-queue Allow for not-ready nodes in WaitForAllNodesSchedulable Ref #31215
parents
603212f3
dc3dcc27
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
7 deletions
+17
-7
util.go
test/e2e/framework/util.go
+17
-7
No files found.
test/e2e/framework/util.go
View file @
cd30526b
...
...
@@ -2952,7 +2952,11 @@ func GetReadySchedulableNodesOrDie(c *client.Client) (nodes *api.NodeList) {
}
func
WaitForAllNodesSchedulable
(
c
*
client
.
Client
)
error
{
Logf
(
"Waiting up to %v for all (but %d) nodes to be schedulable"
,
4
*
time
.
Hour
,
TestContext
.
AllowedNotReadyNodes
)
var
notSchedulable
[]
*
api
.
Node
return
wait
.
PollImmediate
(
30
*
time
.
Second
,
4
*
time
.
Hour
,
func
()
(
bool
,
error
)
{
notSchedulable
=
nil
opts
:=
api
.
ListOptions
{
ResourceVersion
:
"0"
,
FieldSelector
:
fields
.
Set
{
"spec.unschedulable"
:
"false"
}
.
AsSelector
(),
...
...
@@ -2963,17 +2967,23 @@ func WaitForAllNodesSchedulable(c *client.Client) error {
// Ignore the error here - it will be retried.
return
false
,
nil
}
schedulable
:=
0
for
_
,
node
:=
range
nodes
.
Items
{
if
isNodeSchedulable
(
&
node
)
{
schedulable
++
for
i
:=
range
nodes
.
Items
{
node
:=
&
nodes
.
Items
[
i
]
if
!
isNodeSchedulable
(
node
)
{
notSchedulable
=
append
(
notSchedulable
,
node
)
}
}
if
schedulable
!=
len
(
nodes
.
Items
)
{
Logf
(
"%d/%d nodes schedulable (polling after 30s)"
,
schedulable
,
len
(
nodes
.
Items
))
// Framework allows for <TestContext.AllowedNotReadyNodes> nodes to be non-ready,
// to make it possible e.g. for incorrect deployment of some small percentage
// of nodes (which we allow in cluster validation). Some nodes that are not
// provisioned correctly at startup will never become ready (e.g. when something
// won't install correctly), so we can't expect them to be ready at any point.
//
// However, we only allow non-ready nodes with some specific reasons.
if
len
(
notSchedulable
)
>
TestContext
.
AllowedNotReadyNodes
{
return
false
,
nil
}
return
true
,
nil
return
allowedNotReadyReasons
(
notSchedulable
)
,
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