hashicorp / nomad

Nomad is an easy-to-use, flexible, and performant workload orchestrator that can deploy a mix of microservice, batch, containerized, and non-containerized applications. Nomad is easy to operate and scale and has native Consul and Vault integrations.
https://www.nomadproject.io/
Other
14.86k stars 1.95k forks source link

Allocate same cgroup parent for all containers started by nomad client wrt docker #4696

Closed hbasappa closed 12 months ago

hbasappa commented 6 years ago

If you have a question, prepend your issue with [question] or preferably use the nomad mailing list.

If filing a bug please include the following:

Nomad version

Output from nomad version 0.8.4

Operating system and Environment details

centos 7

Issue

docker support cgroupParent which can be used to potentassign same cgroupParent to all containers started by nomad client.Nomad does not support it.

https://github.com/hashicorp/nomad/pull/4662 is one way to address this.

Reproduction steps

Nomad Server logs (if appropriate)

Nomad Client logs (if appropriate)

Job file (if appropriate)

preetapan commented 5 years ago

LEaving this issue open, see my comment in https://github.com/hashicorp/nomad/pull/4662. we'll take an updated PR against the docker driver plugin after the ongoing work on that is merged.

joebeeson commented 4 years ago

4844 has been merged

fredwangwang commented 3 years ago

@preetapan is there any plan to add this feature? IMO nomad has the reserved config, but it is not very useful. It only limits how much are reserved from being scheduled but not at all how much can be used post scheduling. Schedule a cpu hog with 10 Mhz CPU allocated (w/o hard limit) can easily take down all system level services (logging, ssh, etc) on the target node.

Assigning all nomad scheduled tasks to a constraint cgroup can be hugely beneficial to prevent nomad hosted job jeopardize the host stability.

shoenig commented 12 months ago

Setting a cgroup parent (as well as reserved.cores) has been possible since Nomad v1.1