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
ea16e52f
Commit
ea16e52f
authored
Jul 06, 2015
by
Yu-Ju Hong
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #10642 from davidopp/clean
Clarify and make less verbose event message for infeasible pods.
parents
1817f746
950ab8f2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
4 deletions
+7
-4
generic_scheduler.go
plugin/pkg/scheduler/generic_scheduler.go
+6
-3
scheduler.go
plugin/pkg/scheduler/scheduler.go
+1
-1
No files found.
plugin/pkg/scheduler/generic_scheduler.go
View file @
ea16e52f
...
...
@@ -41,12 +41,15 @@ var ErrNoNodesAvailable = fmt.Errorf("no nodes available to schedule pods")
// implementation of the error interface
func
(
f
*
FitError
)
Error
()
string
{
predicates
:=
util
.
NewStringSet
()
var
reason
string
// We iterate over all nodes for logging purposes, even though we only return one reason from one node
for
node
,
predicateList
:=
range
f
.
FailedPredicates
{
predicates
=
predicates
.
Union
(
predicateList
)
glog
.
Infof
(
"failed to find fit for pod %v on node %s: %s"
,
f
.
Pod
.
Name
,
node
,
strings
.
Join
(
predicateList
.
List
(),
","
))
if
len
(
reason
)
==
0
{
reason
,
_
=
predicateList
.
PopAny
()
}
}
return
fmt
.
Sprintf
(
"F
or each of these fitness predicates, pod %v failed on at least one node: %v."
,
f
.
Pod
.
Name
,
strings
.
Join
(
predicates
.
List
(),
","
)
)
return
fmt
.
Sprintf
(
"F
ailed for reason %s and possibly others"
,
reason
)
}
type
genericScheduler
struct
{
...
...
plugin/pkg/scheduler/scheduler.go
View file @
ea16e52f
...
...
@@ -125,7 +125,7 @@ func (s *Scheduler) scheduleOne() {
metrics
.
SchedulingAlgorithmLatency
.
Observe
(
metrics
.
SinceInMicroseconds
(
start
))
if
err
!=
nil
{
glog
.
V
(
1
)
.
Infof
(
"Failed to schedule: %v"
,
pod
)
s
.
config
.
Recorder
.
Eventf
(
pod
,
"failedScheduling"
,
"
Error scheduling:
%v"
,
err
)
s
.
config
.
Recorder
.
Eventf
(
pod
,
"failedScheduling"
,
"%v"
,
err
)
s
.
config
.
Error
(
pod
,
err
)
return
}
...
...
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