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
06fb64cd
Commit
06fb64cd
authored
Jul 14, 2018
by
tanshanshan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix glogformat
parent
614e3add
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
7 deletions
+7
-7
generic_scheduler.go
pkg/scheduler/core/generic_scheduler.go
+2
-2
scheduling_queue.go
pkg/scheduler/core/scheduling_queue.go
+2
-2
factory.go
pkg/scheduler/factory/factory.go
+3
-3
No files found.
pkg/scheduler/core/generic_scheduler.go
View file @
06fb64cd
...
@@ -222,7 +222,7 @@ func (g *genericScheduler) Preempt(pod *v1.Pod, nodeLister algorithm.NodeLister,
...
@@ -222,7 +222,7 @@ func (g *genericScheduler) Preempt(pod *v1.Pod, nodeLister algorithm.NodeLister,
return
nil
,
nil
,
nil
,
err
return
nil
,
nil
,
nil
,
err
}
}
if
!
podEligibleToPreemptOthers
(
pod
,
g
.
cachedNodeInfoMap
)
{
if
!
podEligibleToPreemptOthers
(
pod
,
g
.
cachedNodeInfoMap
)
{
glog
.
V
(
5
)
.
Infof
(
"Pod %v
is not eligible for more preemption."
,
pod
.
Name
)
glog
.
V
(
5
)
.
Infof
(
"Pod %v
/%v is not eligible for more preemption."
,
pod
.
Namespace
,
pod
.
Name
)
return
nil
,
nil
,
nil
,
nil
return
nil
,
nil
,
nil
,
nil
}
}
allNodes
,
err
:=
nodeLister
.
List
()
allNodes
,
err
:=
nodeLister
.
List
()
...
@@ -234,7 +234,7 @@ func (g *genericScheduler) Preempt(pod *v1.Pod, nodeLister algorithm.NodeLister,
...
@@ -234,7 +234,7 @@ func (g *genericScheduler) Preempt(pod *v1.Pod, nodeLister algorithm.NodeLister,
}
}
potentialNodes
:=
nodesWherePreemptionMightHelp
(
allNodes
,
fitError
.
FailedPredicates
)
potentialNodes
:=
nodesWherePreemptionMightHelp
(
allNodes
,
fitError
.
FailedPredicates
)
if
len
(
potentialNodes
)
==
0
{
if
len
(
potentialNodes
)
==
0
{
glog
.
V
(
3
)
.
Infof
(
"Preemption will not help schedule pod %v
on any node."
,
pod
.
Name
)
glog
.
V
(
3
)
.
Infof
(
"Preemption will not help schedule pod %v
/%v on any node."
,
pod
.
Namespace
,
pod
.
Name
)
// In this case, we should clean-up any existing nominated node name of the pod.
// In this case, we should clean-up any existing nominated node name of the pod.
return
nil
,
nil
,
[]
*
v1
.
Pod
{
pod
},
nil
return
nil
,
nil
,
[]
*
v1
.
Pod
{
pod
},
nil
}
}
...
...
pkg/scheduler/core/scheduling_queue.go
View file @
06fb64cd
...
@@ -241,10 +241,10 @@ func (p *PriorityQueue) Add(pod *v1.Pod) error {
...
@@ -241,10 +241,10 @@ func (p *PriorityQueue) Add(pod *v1.Pod) error {
defer
p
.
lock
.
Unlock
()
defer
p
.
lock
.
Unlock
()
err
:=
p
.
activeQ
.
Add
(
pod
)
err
:=
p
.
activeQ
.
Add
(
pod
)
if
err
!=
nil
{
if
err
!=
nil
{
glog
.
Errorf
(
"Error adding pod %v
to the scheduling queue: %v"
,
pod
.
Name
,
err
)
glog
.
Errorf
(
"Error adding pod %v
/%v to the scheduling queue: %v"
,
pod
.
Namespace
,
pod
.
Name
,
err
)
}
else
{
}
else
{
if
p
.
unschedulableQ
.
get
(
pod
)
!=
nil
{
if
p
.
unschedulableQ
.
get
(
pod
)
!=
nil
{
glog
.
Errorf
(
"Error: pod %v
is already in the unschedulable queue."
,
pod
.
Name
)
glog
.
Errorf
(
"Error: pod %v
/%v is already in the unschedulable queue."
,
pod
.
Namespace
,
pod
.
Name
)
p
.
deleteNominatedPodIfExists
(
pod
)
p
.
deleteNominatedPodIfExists
(
pod
)
p
.
unschedulableQ
.
delete
(
pod
)
p
.
unschedulableQ
.
delete
(
pod
)
}
}
...
...
pkg/scheduler/factory/factory.go
View file @
06fb64cd
...
@@ -1303,10 +1303,10 @@ func NewPodInformer(client clientset.Interface, resyncPeriod time.Duration) core
...
@@ -1303,10 +1303,10 @@ func NewPodInformer(client clientset.Interface, resyncPeriod time.Duration) core
func
(
c
*
configFactory
)
MakeDefaultErrorFunc
(
backoff
*
util
.
PodBackoff
,
podQueue
core
.
SchedulingQueue
)
func
(
pod
*
v1
.
Pod
,
err
error
)
{
func
(
c
*
configFactory
)
MakeDefaultErrorFunc
(
backoff
*
util
.
PodBackoff
,
podQueue
core
.
SchedulingQueue
)
func
(
pod
*
v1
.
Pod
,
err
error
)
{
return
func
(
pod
*
v1
.
Pod
,
err
error
)
{
return
func
(
pod
*
v1
.
Pod
,
err
error
)
{
if
err
==
core
.
ErrNoNodesAvailable
{
if
err
==
core
.
ErrNoNodesAvailable
{
glog
.
V
(
4
)
.
Infof
(
"Unable to schedule %v
%v: no nodes are registered to the cluster; waiting"
,
pod
.
Namespace
,
pod
.
Name
)
glog
.
V
(
4
)
.
Infof
(
"Unable to schedule %v
/
%v: no nodes are registered to the cluster; waiting"
,
pod
.
Namespace
,
pod
.
Name
)
}
else
{
}
else
{
if
_
,
ok
:=
err
.
(
*
core
.
FitError
);
ok
{
if
_
,
ok
:=
err
.
(
*
core
.
FitError
);
ok
{
glog
.
V
(
4
)
.
Infof
(
"Unable to schedule %v
%v: no fit: %v; waiting"
,
pod
.
Namespace
,
pod
.
Name
,
err
)
glog
.
V
(
4
)
.
Infof
(
"Unable to schedule %v
/
%v: no fit: %v; waiting"
,
pod
.
Namespace
,
pod
.
Name
,
err
)
}
else
if
errors
.
IsNotFound
(
err
)
{
}
else
if
errors
.
IsNotFound
(
err
)
{
if
errStatus
,
ok
:=
err
.
(
errors
.
APIStatus
);
ok
&&
errStatus
.
Status
()
.
Details
.
Kind
==
"node"
{
if
errStatus
,
ok
:=
err
.
(
errors
.
APIStatus
);
ok
&&
errStatus
.
Status
()
.
Details
.
Kind
==
"node"
{
nodeName
:=
errStatus
.
Status
()
.
Details
.
Name
nodeName
:=
errStatus
.
Status
()
.
Details
.
Name
...
@@ -1326,7 +1326,7 @@ func (c *configFactory) MakeDefaultErrorFunc(backoff *util.PodBackoff, podQueue
...
@@ -1326,7 +1326,7 @@ func (c *configFactory) MakeDefaultErrorFunc(backoff *util.PodBackoff, podQueue
}
}
}
}
}
else
{
}
else
{
glog
.
Errorf
(
"Error scheduling %v
%v: %v; retrying"
,
pod
.
Namespace
,
pod
.
Name
,
err
)
glog
.
Errorf
(
"Error scheduling %v
/
%v: %v; retrying"
,
pod
.
Namespace
,
pod
.
Name
,
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