open-nomad/e2e/nodedrain/input/drain_deadline.nomad
Tim Gross 4df2d9bda8
E2E: clarify drain -deadline and -force flag behaviors (#16868)
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.
2023-04-12 15:27:24 -04:00

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
}
}
}
}