From 4cae841251ffe10e698aec7ca46dd4f90b37feb0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Lang=C3=A9?= Date: Tue, 27 Oct 2020 15:46:50 +0100 Subject: [PATCH] Finally fixed the bug where marathon were not releasing the lock This was appearing because the KillStreamWatcher was waiting for all tasks to die, and not only the overdue ones. This was appearing most of the time when tasks were Unreachable because they sometimes re-appear while marathon already scheduled new ones. JIRA: MESOS-4345 --- src/main/scala/mesosphere/marathon/MarathonSchedulerActor.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/scala/mesosphere/marathon/MarathonSchedulerActor.scala b/src/main/scala/mesosphere/marathon/MarathonSchedulerActor.scala index d4491a6ff11..f750aec9900 100644 --- a/src/main/scala/mesosphere/marathon/MarathonSchedulerActor.scala +++ b/src/main/scala/mesosphere/marathon/MarathonSchedulerActor.scala @@ -452,7 +452,7 @@ class SchedulerActions( if (instancesToDecommission.nonEmpty) { logger.info(s"Adjusting goals for instances ${instancesToDecommission.map(_.instanceId)} (${GoalChangeReason.OverCapacity})") - val instancesAreTerminal = KillStreamWatcher.watchForKilledTasks(instanceTracker.instanceUpdates, instances).runWith(Sink.ignore) + val instancesAreTerminal = KillStreamWatcher.watchForKilledTasks(instanceTracker.instanceUpdates, instancesToDecommission).runWith(Sink.ignore) // Race condition with line 421. The instances we loaded might not exist anymore, e.g. the agent // might have been removed and the instance expunged.