Uploaded image for project: 'Marathon'
  1. Marathon
  2. MARATHON-8540

Redesign the current kill & wait for terminal

    Details

    • Type: Task
    • Status: Accepted
    • Priority: High
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Scheduling
    • Labels:

      Description

      When https://github.com/mesosphere/marathon/pull/6745 is merged, we will end up with a code that looks like the following snippet on many places.

      val instancesAreTerminal = killService.watchForKilledInstances(instances)
          await(Future.sequence(instances.map(i => instanceTracker.setGoal(i.instanceId, Goal.Decommissioned, GoalChangeReason.DeletingApp))))
          await(instancesAreTerminal)
      

      This is has few issues:

      1. client code calling instance tracker has to know that there is a kill service with such watch
      2. it is very error prone - the client code has to start listening on the stream before the kill is initiated otherwise it won't work

      Acceptance criteria

      Design a way the concerns described ^^^ will be addressed.

        Attachments

          Activity

            People

            • Assignee:
              alenavarkockova Alena Varkockova
              Reporter:
              alenavarkockova Alena Varkockova
              Team:
              Orchestration Team
              Watchers:
              Alena Varkockova
            • Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: