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
132f8892
Commit
132f8892
authored
Sep 15, 2015
by
Dr. Stefan Schimanski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move task-lost message prefix into messages module
parent
832370ed
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
3 deletions
+4
-3
executor.go
contrib/mesos/pkg/executor/executor.go
+2
-2
messages.go
contrib/mesos/pkg/executor/messages/messages.go
+1
-0
scheduler.go
contrib/mesos/pkg/scheduler/scheduler.go
+1
-1
No files found.
contrib/mesos/pkg/executor/executor.go
View file @
132f8892
...
@@ -758,8 +758,8 @@ func (k *KubernetesExecutor) FrameworkMessage(driver bindings.ExecutorDriver, me
...
@@ -758,8 +758,8 @@ func (k *KubernetesExecutor) FrameworkMessage(driver bindings.ExecutorDriver, me
log
.
Infof
(
"Receives message from framework %v
\n
"
,
message
)
log
.
Infof
(
"Receives message from framework %v
\n
"
,
message
)
//TODO(jdef) master reported a lost task, reconcile this! @see scheduler.go:handleTaskLost
//TODO(jdef) master reported a lost task, reconcile this! @see scheduler.go:handleTaskLost
if
strings
.
HasPrefix
(
message
,
"task-lost:"
)
&&
len
(
message
)
>
10
{
if
strings
.
HasPrefix
(
message
,
messages
.
TaskLost
+
":"
)
{
taskId
:=
message
[
10
:
]
taskId
:=
message
[
len
(
messages
.
TaskLost
)
+
1
:
]
if
taskId
!=
""
{
if
taskId
!=
""
{
// clean up pod state
// clean up pod state
k
.
lock
.
Lock
()
k
.
lock
.
Lock
()
...
...
contrib/mesos/pkg/executor/messages/messages.go
View file @
132f8892
...
@@ -26,6 +26,7 @@ const (
...
@@ -26,6 +26,7 @@ const (
ExecutorShutdown
=
"executor-shutdown"
ExecutorShutdown
=
"executor-shutdown"
LaunchTaskFailed
=
"launch-task-failed"
LaunchTaskFailed
=
"launch-task-failed"
TaskKilled
=
"task-killed"
TaskKilled
=
"task-killed"
TaskLost
=
"task-lost"
UnmarshalTaskDataFailure
=
"unmarshal-task-data-failure"
UnmarshalTaskDataFailure
=
"unmarshal-task-data-failure"
TaskLostAck
=
"task-lost-ack"
// executor acknowledgement of forwarded TASK_LOST framework message
TaskLostAck
=
"task-lost-ack"
// executor acknowledgement of forwarded TASK_LOST framework message
Kamikaze
=
"kamikaze"
Kamikaze
=
"kamikaze"
...
...
contrib/mesos/pkg/scheduler/scheduler.go
View file @
132f8892
...
@@ -441,7 +441,7 @@ func (k *KubernetesScheduler) reconcileTerminalTask(driver bindings.SchedulerDri
...
@@ -441,7 +441,7 @@ func (k *KubernetesScheduler) reconcileTerminalTask(driver bindings.SchedulerDri
//to do anything. The underlying driver transport may be able to send a
//to do anything. The underlying driver transport may be able to send a
//FrameworkMessage directly to the slave to terminate the task.
//FrameworkMessage directly to the slave to terminate the task.
log
.
V
(
2
)
.
Info
(
"forwarding TASK_LOST message to executor %v on slave %v"
,
taskStatus
.
ExecutorId
,
taskStatus
.
SlaveId
)
log
.
V
(
2
)
.
Info
(
"forwarding TASK_LOST message to executor %v on slave %v"
,
taskStatus
.
ExecutorId
,
taskStatus
.
SlaveId
)
data
:=
fmt
.
Sprintf
(
"
task-lost:%s"
,
task
.
ID
)
//TODO(jdef) use a real message type
data
:=
fmt
.
Sprintf
(
"
%s:%s"
,
messages
.
TaskLost
,
task
.
ID
)
//TODO(jdef) use a real message type
if
_
,
err
:=
driver
.
SendFrameworkMessage
(
taskStatus
.
ExecutorId
,
taskStatus
.
SlaveId
,
data
);
err
!=
nil
{
if
_
,
err
:=
driver
.
SendFrameworkMessage
(
taskStatus
.
ExecutorId
,
taskStatus
.
SlaveId
,
data
);
err
!=
nil
{
log
.
Error
(
err
.
Error
())
log
.
Error
(
err
.
Error
())
}
}
...
...
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