Skip to content

Instantly share code, notes, and snippets.

@schmichael
Created April 25, 2022 23:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save schmichael/53f79cbd898afdfab76865ad8c7fc6a0 to your computer and use it in GitHub Desktop.
Save schmichael/53f79cbd898afdfab76865ad8c7fc6a0 to your computer and use it in GitHub Desktop.
Diagnosing preemption bug
client {
cpu_total_compute = 1000
memory_total_mb = 1000
}
job "hipri" {
datacenters = ["dc1"]
priority = 98
group "sleepy" {
count = 1
task "sleepy" {
driver = "docker"
config {
image = "alpine:3"
command = "sleep"
args = ["100000"]
#command = "/bin/sh"
#args = ["-c", "echo ${attr.unique.network.ip-address}"]
}
resources {
cpu = 500
memory = 500
}
}
}
}
job "lowpri" {
datacenters = ["dc1"]
priority = 1
group "sleepy" {
count = 3
task "sleepy" {
driver = "docker"
config {
image = "alpine:3"
command = "sleep"
args = ["100000"]
#command = "/bin/sh"
#args = ["-c", "echo ${attr.unique.network.ip-address}"]
}
resources {
cpu = 300
memory = 300
}
}
}
}
server {
default_scheduler_config {
memory_oversubscription_enabled = false
preemption_config {
batch_scheduler_enabled = true
system_scheduler_enabled = true
service_scheduler_enabled = true
sysbatch_scheduler_enabled = true
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment