mirror of
https://github.com/kemko/nomad.git
synced 2026-01-05 09:55:44 +03:00
* e2e: move rawexec oversub tests into oversubscription e2e test suite This PR moves two tests for raw_exec and memory oversubscription into the oversubscription test suite, which has the necessary plumbing to activate and restore the oversubscription configuration of the scheduler during the test. * cr: rename files for better readability
39 lines
659 B
HCL
39 lines
659 B
HCL
# Copyright (c) HashiCorp, Inc.
|
|
# SPDX-License-Identifier: BUSL-1.1
|
|
|
|
job "oversubmax" {
|
|
type = "batch"
|
|
|
|
constraint {
|
|
attribute = "${attr.kernel.name}"
|
|
value = "linux"
|
|
}
|
|
|
|
group "group" {
|
|
reschedule {
|
|
attempts = 0
|
|
unlimited = false
|
|
}
|
|
|
|
restart {
|
|
attempts = 0
|
|
mode = "fail"
|
|
}
|
|
|
|
task "cat" {
|
|
driver = "raw_exec"
|
|
|
|
config {
|
|
command = "bash"
|
|
args = ["-c", "cat /sys/fs/cgroup/$(cat /proc/self/cgroup | cut -d':' -f3)/memory.{low,max}"]
|
|
}
|
|
|
|
resources {
|
|
cpu = 100
|
|
memory = 64
|
|
memory_max = -1 # unlimited
|
|
}
|
|
}
|
|
}
|
|
}
|