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
625e0d09
Commit
625e0d09
authored
Feb 23, 2016
by
HAI HUANG
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adding more info to error msgs
parent
f5082b6d
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
0 deletions
+9
-0
framework.go
...rib/mesos/pkg/scheduler/components/framework/framework.go
+8
-0
service.go
contrib/mesos/pkg/scheduler/service/service.go
+1
-0
No files found.
contrib/mesos/pkg/scheduler/components/framework/framework.go
View file @
625e0d09
...
@@ -122,6 +122,12 @@ func New(config Config) Framework {
...
@@ -122,6 +122,12 @@ func New(config Config) Framework {
// the node must be registered and have up-to-date labels
// the node must be registered and have up-to-date labels
n
:=
config
.
LookupNode
(
o
.
GetHostname
())
n
:=
config
.
LookupNode
(
o
.
GetHostname
())
if
n
==
nil
||
!
node
.
IsUpToDate
(
n
,
node
.
SlaveAttributesToLabels
(
o
.
GetAttributes
()))
{
if
n
==
nil
||
!
node
.
IsUpToDate
(
n
,
node
.
SlaveAttributesToLabels
(
o
.
GetAttributes
()))
{
if
n
==
nil
{
log
.
V
(
1
)
.
Infof
(
"cannot find node %v"
,
o
.
GetHostname
())
}
else
{
log
.
V
(
1
)
.
Infof
(
"node %v's attributes do not match: %v != %v"
,
o
.
GetHostname
(),
n
.
Labels
,
o
.
GetAttributes
())
}
return
false
return
false
}
}
...
@@ -130,12 +136,14 @@ func New(config Config) Framework {
...
@@ -130,12 +136,14 @@ func New(config Config) Framework {
case
eids
>
1
:
case
eids
>
1
:
// at most one executor id expected. More than one means that
// at most one executor id expected. More than one means that
// the given node is seriously in trouble.
// the given node is seriously in trouble.
log
.
V
(
1
)
.
Infof
(
"at most one executor id is expected, but got %v (%v)"
,
eids
,
o
.
GetExecutorIds
())
return
false
return
false
case
eids
==
1
:
case
eids
==
1
:
// the executor id must match, otherwise the running executor
// the executor id must match, otherwise the running executor
// is incompatible with the current scheduler configuration.
// is incompatible with the current scheduler configuration.
if
eid
:=
o
.
GetExecutorIds
()[
0
];
eid
.
GetValue
()
!=
config
.
ExecutorId
.
GetValue
()
{
if
eid
:=
o
.
GetExecutorIds
()[
0
];
eid
.
GetValue
()
!=
config
.
ExecutorId
.
GetValue
()
{
log
.
V
(
1
)
.
Infof
(
"executor ids do not match: %v != %v"
,
eid
.
GetValue
(),
config
.
ExecutorId
.
GetValue
())
return
false
return
false
}
}
}
}
...
...
contrib/mesos/pkg/scheduler/service/service.go
View file @
625e0d09
...
@@ -495,6 +495,7 @@ func (s *SchedulerServer) prepareExecutorInfo(hks hyperkube.Interface) (*mesos.E
...
@@ -495,6 +495,7 @@ func (s *SchedulerServer) prepareExecutorInfo(hks hyperkube.Interface) (*mesos.E
// running executors in a cluster.
// running executors in a cluster.
execInfo
.
ExecutorId
=
executorinfo
.
NewID
(
execInfo
)
execInfo
.
ExecutorId
=
executorinfo
.
NewID
(
execInfo
)
execInfo
.
Data
=
data
execInfo
.
Data
=
data
log
.
V
(
1
)
.
Infof
(
"started with executor id %v"
,
execInfo
.
ExecutorId
.
GetValue
())
return
execInfo
,
nil
return
execInfo
,
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