levant icon indicating copy to clipboard operation
levant copied to clipboard

[bug] Levant incorrectly marks deployment as failed if dead:complete

Open jrasell opened this issue 6 years ago • 1 comments

Description

During batch job deployments with multiple tasks in a group that finish quickly and using the force-batch flag Levant incorrectly exits with status 1. This is because the job status checker is only looking for the is taking the job status = dead to mean failed; whereas this can coincide with client status complete indicating the job finished successfully.

jrasell avatar Aug 07 '18 13:08 jrasell

This can also happen without force-batch and having tasks in multiple groups.

Example:

job "test" {
  datacenters = ["..."]

  type = "batch"

  group "quick" {
    task "quick" {
      driver = "exec"
      config {
        command = "sleep"
        args = ["1"]
      }
      resources = {
        cpu    = 100
        memory = 50
      }
    }
  }

  group "slow" {
    task "slow" {
      driver = "exec"
      config {
        command = "sleep"
        args = ["120"]
      }
      resources = {
        cpu    = 100
        memory = 50
      }
    }
  }
}

publysher avatar Jun 18 '19 07:06 publysher