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

Wiping an unreachable Pod can lead to overscaling

    Details

      Description

      We should remove `unreachableStrategy = UnreachableDisabled` in this test and check its behaviour once instance goal phase 2 is merged.

       

      Test that causes such behaviour: (https://jenkins.mesosphere.com/service/jenkins/view/Marathon/job/marathon-pipelines/view/change-requests/job/PR-6506/158/

      "wipe pod instances without persistent volumes" in {
        Given("a pod with persistent volumes")
        val pod = simplePod("simple-pod-with-one-instance-wipe").copy(
          instances = 1
        )
      
        When("The pod is created")
        val createResult = marathon.createPodV2(pod)
        createResult should be(Created)
        waitForDeployment(createResult)
        val taskId = marathon.podTasksIds(pod.id).head
        eventually { marathon.status(pod.id) should be(Stable) }
      
        Then("1 instance should be running")
        val status = marathon.status(pod.id)
        status should be(OK)
        status.value.instances should have size 1
        mesosCluster.agents(1).start()
        eventually {
          mesos.state.value.agents.size shouldEqual 2
        }
      
        When("An instance is unreachable")
        mesosCluster.agents(0).stop()
        waitForEventMatching("Task is declared unreachable") {
          matchEvent("TASK_UNREACHABLE", taskId)
        }
      
        And("Pods instance is deleted")
        val instanceId = status.value.instances.head.id
        val deleteResult = marathon.deleteInstance(pod.id, instanceId, wipe = true)
        deleteResult should be(OK)
      
        Then("pod instance is erased from marathon's knowledge ")
        val knownInstanceIds = marathon.status(pod.id).value.instances.map(_.id)
        eventually {
          knownInstanceIds should not contain instanceId
        }
      
        And("a new pod with is scheduled")
        waitForStatusUpdates("TASK_RUNNING")
        marathon.status(pod.id).value.instances should have size 1
      
        When("the task associated with pod becomes reachable again")
        mesosCluster.agents(0).start()
      
        Then("Marathon kills the task")
        waitForEventMatching("Task is declared killed") {
          matchUnknownTerminatedEvent(Task.Id(taskId).instanceId)
        }
      }
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                kjeschkies Karsten Jeschkies
                Reporter:
                nikitamelkozerov Nikita Melkozerov (Inactive)
                Team:
                Orchestration Team
                Watchers:
                Mergebot, Nikita Melkozerov (Inactive)
              • Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: