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
102310e3
Commit
102310e3
authored
Dec 02, 2015
by
k8s-merge-robot
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #18072 from mesosphere/sttts-cherry-pick-task-lost-during-kubelet-pod-launch
Auto commit by PR queue bot
parents
e28404b2
271eeb00
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
2 deletions
+5
-2
executor.go
contrib/mesos/pkg/executor/executor.go
+1
-1
messages.go
contrib/mesos/pkg/executor/messages/messages.go
+1
-0
framework.go
...rib/mesos/pkg/scheduler/components/framework/framework.go
+3
-1
No files found.
contrib/mesos/pkg/executor/executor.go
View file @
102310e3
...
@@ -700,7 +700,7 @@ waitForRunningPod:
...
@@ -700,7 +700,7 @@ waitForRunningPod:
k
.
lock
.
Lock
()
k
.
lock
.
Lock
()
defer
k
.
lock
.
Unlock
()
defer
k
.
lock
.
Unlock
()
reportLost
:
reportLost
:
k
.
reportLostTask
(
driver
,
taskId
,
messages
.
LaunchTask
Failed
)
k
.
reportLostTask
(
driver
,
taskId
,
messages
.
KubeletPodLaunch
Failed
)
}
}
func
(
k
*
Executor
)
__launchTask
(
driver
bindings
.
ExecutorDriver
,
taskId
,
podFullName
string
,
psf
podStatusFunc
)
{
func
(
k
*
Executor
)
__launchTask
(
driver
bindings
.
ExecutorDriver
,
taskId
,
podFullName
string
,
psf
podStatusFunc
)
{
...
...
contrib/mesos/pkg/executor/messages/messages.go
View file @
102310e3
...
@@ -25,6 +25,7 @@ const (
...
@@ -25,6 +25,7 @@ const (
ExecutorUnregistered
=
"executor-unregistered"
ExecutorUnregistered
=
"executor-unregistered"
ExecutorShutdown
=
"executor-shutdown"
ExecutorShutdown
=
"executor-shutdown"
LaunchTaskFailed
=
"launch-task-failed"
LaunchTaskFailed
=
"launch-task-failed"
KubeletPodLaunchFailed
=
"kubelet-pod-launch-failed"
TaskKilled
=
"task-killed"
TaskKilled
=
"task-killed"
TaskLost
=
"task-lost"
TaskLost
=
"task-lost"
UnmarshalTaskDataFailure
=
"unmarshal-task-data-failure"
UnmarshalTaskDataFailure
=
"unmarshal-task-data-failure"
...
...
contrib/mesos/pkg/scheduler/components/framework/framework.go
View file @
102310e3
...
@@ -482,13 +482,15 @@ func (k *framework) reconcileTerminalTask(driver bindings.SchedulerDriver, taskS
...
@@ -482,13 +482,15 @@ func (k *framework) reconcileTerminalTask(driver bindings.SchedulerDriver, taskS
(
taskStatus
.
GetSource
()
==
mesos
.
TaskStatus_SOURCE_SLAVE
&&
taskStatus
.
GetReason
()
==
mesos
.
TaskStatus_REASON_EXECUTOR_TERMINATED
)
||
(
taskStatus
.
GetSource
()
==
mesos
.
TaskStatus_SOURCE_SLAVE
&&
taskStatus
.
GetReason
()
==
mesos
.
TaskStatus_REASON_EXECUTOR_TERMINATED
)
||
(
taskStatus
.
GetSource
()
==
mesos
.
TaskStatus_SOURCE_SLAVE
&&
taskStatus
.
GetReason
()
==
mesos
.
TaskStatus_REASON_EXECUTOR_UNREGISTERED
)
||
(
taskStatus
.
GetSource
()
==
mesos
.
TaskStatus_SOURCE_SLAVE
&&
taskStatus
.
GetReason
()
==
mesos
.
TaskStatus_REASON_EXECUTOR_UNREGISTERED
)
||
(
taskStatus
.
GetSource
()
==
mesos
.
TaskStatus_SOURCE_EXECUTOR
&&
taskStatus
.
GetMessage
()
==
messages
.
ContainersDisappeared
)
||
(
taskStatus
.
GetSource
()
==
mesos
.
TaskStatus_SOURCE_EXECUTOR
&&
taskStatus
.
GetMessage
()
==
messages
.
ContainersDisappeared
)
||
(
taskStatus
.
GetSource
()
==
mesos
.
TaskStatus_SOURCE_EXECUTOR
&&
taskStatus
.
GetMessage
()
==
messages
.
KubeletPodLaunchFailed
)
||
(
taskStatus
.
GetSource
()
==
mesos
.
TaskStatus_SOURCE_EXECUTOR
&&
taskStatus
.
GetMessage
()
==
messages
.
TaskKilled
&&
!
task
.
Has
(
podtask
.
Deleted
)))
{
(
taskStatus
.
GetSource
()
==
mesos
.
TaskStatus_SOURCE_EXECUTOR
&&
taskStatus
.
GetMessage
()
==
messages
.
TaskKilled
&&
!
task
.
Has
(
podtask
.
Deleted
)))
{
//--
//--
// pod-task has metadata that refers to:
// pod-task has metadata that refers to:
// (1) a task that Mesos no longer knows about, or else
// (1) a task that Mesos no longer knows about, or else
// (2) a pod that the Kubelet will never report as "failed"
// (2) a pod that the Kubelet will never report as "failed"
// (3) a pod that the kubeletExecutor reported as lost (likely due to docker daemon crash/restart)
// (3) a pod that the kubeletExecutor reported as lost (likely due to docker daemon crash/restart)
// (4) a pod that the kubeletExecutor killed, but the scheduler didn't ask for that (maybe killed by the master)
// (4) a pod that the kubeletExecutor reported as lost because the kubelet didn't manage to launch it (in time)
// (5) a pod that the kubeletExecutor killed, but the scheduler didn't ask for that (maybe killed by the master)
// For now, destroy the pod and hope that there's a replication controller backing it up.
// For now, destroy the pod and hope that there's a replication controller backing it up.
// TODO(jdef) for case #2 don't delete the pod, just update it's status to Failed
// TODO(jdef) for case #2 don't delete the pod, just update it's status to Failed
pod
:=
&
task
.
Pod
pod
:=
&
task
.
Pod
...
...
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