4df2d9bda8
The `-deadline` and `-force` flag for the `nomad node drain` command only cause the draining to ignore the `migrate` block's healthy deadline, max parallel, etc. These flags don't have anything to do with the `kill_timeout` or `shutdown_delay` options of the jobspec. This changeset fixes the skipped E2E tests so that they validate the intended behavior, and updates the docs for more clarity.
36 lines
521 B
HCL
36 lines
521 B
HCL
# Copyright (c) HashiCorp, Inc.
|
|
# SPDX-License-Identifier: MPL-2.0
|
|
|
|
job "drain_deadline" {
|
|
|
|
constraint {
|
|
attribute = "${attr.kernel.name}"
|
|
value = "linux"
|
|
}
|
|
|
|
migrate {
|
|
max_parallel = 1
|
|
min_healthy_time = "30s"
|
|
}
|
|
|
|
group "group" {
|
|
|
|
count = 2
|
|
|
|
task "task" {
|
|
driver = "docker"
|
|
|
|
config {
|
|
image = "busybox:1"
|
|
command = "/bin/sh"
|
|
args = ["-c", "sleep 600"]
|
|
}
|
|
|
|
resources {
|
|
cpu = 256
|
|
memory = 64
|
|
}
|
|
}
|
|
}
|
|
}
|