levant
levant copied to clipboard
[bug] Levant incorrectly marks deployment as failed if dead:complete
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.
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
}
}
}
}