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
e9dd3c55
Commit
e9dd3c55
authored
Aug 17, 2015
by
Marek Grabowski
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #12678 from mesosphere/scheduler-log-struct-fields
Improve readability of scheduling failure logs
parents
7d936fe4
61c9dd87
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
plugin.go
contrib/mesos/pkg/scheduler/plugin.go
+3
-3
scheduler.go
plugin/pkg/scheduler/scheduler.go
+3
-3
No files found.
contrib/mesos/pkg/scheduler/plugin.go
View file @
e9dd3c55
...
@@ -754,10 +754,10 @@ func (s *schedulingPlugin) Run(done <-chan struct{}) {
...
@@ -754,10 +754,10 @@ func (s *schedulingPlugin) Run(done <-chan struct{}) {
// with the Modeler stuff removed since we don't use it because we have mesos.
// with the Modeler stuff removed since we don't use it because we have mesos.
func
(
s
*
schedulingPlugin
)
scheduleOne
()
{
func
(
s
*
schedulingPlugin
)
scheduleOne
()
{
pod
:=
s
.
config
.
NextPod
()
pod
:=
s
.
config
.
NextPod
()
log
.
V
(
3
)
.
Infof
(
"Attempting to schedule: %v"
,
pod
)
log
.
V
(
3
)
.
Infof
(
"Attempting to schedule: %
+
v"
,
pod
)
dest
,
err
:=
s
.
config
.
Algorithm
.
Schedule
(
pod
,
s
.
config
.
MinionLister
)
// call kubeScheduler.Schedule
dest
,
err
:=
s
.
config
.
Algorithm
.
Schedule
(
pod
,
s
.
config
.
MinionLister
)
// call kubeScheduler.Schedule
if
err
!=
nil
{
if
err
!=
nil
{
log
.
V
(
1
)
.
Infof
(
"Failed to schedule: %v"
,
pod
)
log
.
V
(
1
)
.
Infof
(
"Failed to schedule: %
+
v"
,
pod
)
s
.
config
.
Recorder
.
Eventf
(
pod
,
"FailedScheduling"
,
"Error scheduling: %v"
,
err
)
s
.
config
.
Recorder
.
Eventf
(
pod
,
"FailedScheduling"
,
"Error scheduling: %v"
,
err
)
s
.
config
.
Error
(
pod
,
err
)
s
.
config
.
Error
(
pod
,
err
)
return
return
...
@@ -770,7 +770,7 @@ func (s *schedulingPlugin) scheduleOne() {
...
@@ -770,7 +770,7 @@ func (s *schedulingPlugin) scheduleOne() {
},
},
}
}
if
err
:=
s
.
config
.
Binder
.
Bind
(
b
);
err
!=
nil
{
if
err
:=
s
.
config
.
Binder
.
Bind
(
b
);
err
!=
nil
{
log
.
V
(
1
)
.
Infof
(
"Failed to bind pod: %v"
,
err
)
log
.
V
(
1
)
.
Infof
(
"Failed to bind pod: %
+
v"
,
err
)
s
.
config
.
Recorder
.
Eventf
(
pod
,
"FailedScheduling"
,
"Binding rejected: %v"
,
err
)
s
.
config
.
Recorder
.
Eventf
(
pod
,
"FailedScheduling"
,
"Binding rejected: %v"
,
err
)
s
.
config
.
Error
(
pod
,
err
)
s
.
config
.
Error
(
pod
,
err
)
return
return
...
...
plugin/pkg/scheduler/scheduler.go
View file @
e9dd3c55
...
@@ -116,7 +116,7 @@ func (s *Scheduler) scheduleOne() {
...
@@ -116,7 +116,7 @@ func (s *Scheduler) scheduleOne() {
s
.
config
.
BindPodsRateLimiter
.
Accept
()
s
.
config
.
BindPodsRateLimiter
.
Accept
()
}
}
glog
.
V
(
3
)
.
Infof
(
"Attempting to schedule: %v"
,
pod
)
glog
.
V
(
3
)
.
Infof
(
"Attempting to schedule: %
+
v"
,
pod
)
start
:=
time
.
Now
()
start
:=
time
.
Now
()
defer
func
()
{
defer
func
()
{
metrics
.
E2eSchedulingLatency
.
Observe
(
metrics
.
SinceInMicroseconds
(
start
))
metrics
.
E2eSchedulingLatency
.
Observe
(
metrics
.
SinceInMicroseconds
(
start
))
...
@@ -124,7 +124,7 @@ func (s *Scheduler) scheduleOne() {
...
@@ -124,7 +124,7 @@ func (s *Scheduler) scheduleOne() {
dest
,
err
:=
s
.
config
.
Algorithm
.
Schedule
(
pod
,
s
.
config
.
MinionLister
)
dest
,
err
:=
s
.
config
.
Algorithm
.
Schedule
(
pod
,
s
.
config
.
MinionLister
)
metrics
.
SchedulingAlgorithmLatency
.
Observe
(
metrics
.
SinceInMicroseconds
(
start
))
metrics
.
SchedulingAlgorithmLatency
.
Observe
(
metrics
.
SinceInMicroseconds
(
start
))
if
err
!=
nil
{
if
err
!=
nil
{
glog
.
V
(
1
)
.
Infof
(
"Failed to schedule: %v"
,
pod
)
glog
.
V
(
1
)
.
Infof
(
"Failed to schedule: %
+
v"
,
pod
)
s
.
config
.
Recorder
.
Eventf
(
pod
,
"FailedScheduling"
,
"%v"
,
err
)
s
.
config
.
Recorder
.
Eventf
(
pod
,
"FailedScheduling"
,
"%v"
,
err
)
s
.
config
.
Error
(
pod
,
err
)
s
.
config
.
Error
(
pod
,
err
)
return
return
...
@@ -144,7 +144,7 @@ func (s *Scheduler) scheduleOne() {
...
@@ -144,7 +144,7 @@ func (s *Scheduler) scheduleOne() {
err
:=
s
.
config
.
Binder
.
Bind
(
b
)
err
:=
s
.
config
.
Binder
.
Bind
(
b
)
metrics
.
BindingLatency
.
Observe
(
metrics
.
SinceInMicroseconds
(
bindingStart
))
metrics
.
BindingLatency
.
Observe
(
metrics
.
SinceInMicroseconds
(
bindingStart
))
if
err
!=
nil
{
if
err
!=
nil
{
glog
.
V
(
1
)
.
Infof
(
"Failed to bind pod: %v"
,
err
)
glog
.
V
(
1
)
.
Infof
(
"Failed to bind pod: %
+
v"
,
err
)
s
.
config
.
Recorder
.
Eventf
(
pod
,
"FailedScheduling"
,
"Binding rejected: %v"
,
err
)
s
.
config
.
Recorder
.
Eventf
(
pod
,
"FailedScheduling"
,
"Binding rejected: %v"
,
err
)
s
.
config
.
Error
(
pod
,
err
)
s
.
config
.
Error
(
pod
,
err
)
return
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