Go to file
Seth Hoenig 51384dd63f client: refactor cpuset manager initialization
This PR refactors the code path in Client startup for setting up the cpuset
cgroup manager (non-linux systems not affected).

Before, there was a logic bug where we would try to read the cpuset.cpus.effective
cgroup interface file before ensuring nomad's parent cgroup existed. Therefor that
file would not exist, and the list of useable cpus would be empty. Tasks started
thereafter would not have a value set for their cpuset.cpus.

The refactoring fixes some less than ideal coding style. Instead we now bootstrap
each cpuset manager type (v1/v2) within its own constructor. If something goes
awry during bootstrap (e.g. cgroups not enabled), the constructor returns the
noop implementation and logs a warning.

Fixes #14229
2022-08-25 11:18:43 -05:00
.changelog client: refactor cpuset manager initialization 2022-08-25 11:18:43 -05:00
.circleci build: print installed go version in cricle on windows 2022-08-18 11:25:05 -05:00
.github build: update to go1.19 2022-08-16 08:40:57 -05:00
.release Merge pull request #13815 from hashicorp/post-publish-website 2022-08-08 10:34:31 -05:00
.semgrep api: use errors.New not fmt.Errorf when error doesn't have format. (#14027) 2022-08-05 17:05:47 +02:00
.tours
acl ACL: disallow missing `path` in secure variable policy (#14123) 2022-08-15 17:06:36 -04:00
api Task lifecycle restart (#14127) 2022-08-24 17:43:07 -04:00
ci
client client: refactor cpuset manager initialization 2022-08-25 11:18:43 -05:00
command Merge pull request #14301 from hashicorp/b-fix-check-status-test-racey 2022-08-25 08:30:46 -05:00
contributing build: update to go1.19 2022-08-16 08:40:57 -05:00
demo demo/docs: update demo of Kadalu CSI Plugin (#13610) 2022-07-06 10:24:34 -04:00
dev
drivers drivers/java: add parsing test case for corretto 17 2022-08-24 09:16:38 -05:00
e2e e2e: add e2e tests for nomad service disco checks 2022-08-22 15:31:13 -05:00
helper client: fix data races in config handling (#14139) 2022-08-18 16:32:04 -07:00
integrations
internal/testing/apitests cleanup: replace TypeToPtr helper methods with pointer.Of (#14151) 2022-08-17 18:26:34 +02:00
jobspec template: custom change_mode scripts (#13972) 2022-08-24 17:43:01 +02:00
jobspec2 template: custom change_mode scripts (#13972) 2022-08-24 17:43:01 +02:00
lib build: run gofmt on all go source files 2022-08-16 11:14:11 -05:00
nomad Task lifecycle restart (#14127) 2022-08-24 17:43:07 -04:00
plugins cleanup: replace TypeToPtr helper methods with pointer.Of (#14151) 2022-08-17 18:26:34 +02:00
scheduler cleanup: replace TypeToPtr helper methods with pointer.Of (#14151) 2022-08-17 18:26:34 +02:00
scripts build: update to go1.19 2022-08-16 08:40:57 -05:00
terraform terraform: update installed versions of HashiCorp tools. (#13635) 2022-07-07 16:12:19 +02:00
testutil
tools build: update aws env cpu info 2022-08-02 07:59:58 -05:00
ui ui: task lifecycle restart all tasks (#14223) 2022-08-24 18:43:44 -04:00
version client: fix data races in config handling (#14139) 2022-08-18 16:32:04 -07:00
website Task lifecycle restart (#14127) 2022-08-24 17:43:07 -04:00
.git-blame-ignore-revs ignore b0a20b4dc965a38b0c843f47c16685ccad7439da (#13648) 2022-07-07 15:16:18 -07:00
.gitattributes
.gitignore Allow Operator Generated bootstrap token (#12520) 2022-06-03 07:37:24 -04:00
.go-version Add .0 to make goenv happy (#14218) 2022-08-22 16:36:02 -04:00
.golangci.yml
.semgrepignore
CHANGELOG.md changelog: add missing entry for #13539 (#14129) 2022-08-17 09:26:45 +02:00
CODEOWNERS
GNUmakefile build: set osusergo build tag by default (#14248) 2022-08-24 08:11:56 -05:00
LICENSE
README.md readme: remove Gitter lobby link. (#14195) 2022-08-22 10:33:20 +02:00
Vagrantfile
build_linux_arm.go
go.mod deps: sync versions of go-discover in go.mod (#14269) 2022-08-24 10:32:13 -04:00
go.sum deps: sync versions of go-discover in go.mod (#14269) 2022-08-24 10:32:13 -04:00
main.go
main_test.go

README.md

Nomad License: MPL 2.0 Discuss

HashiCorp Nomad logo

Nomad is a simple and flexible workload orchestrator to deploy and manage containers (docker, podman), non-containerized applications (executable, Java), and virtual machines (qemu) across on-prem and clouds at scale.

Nomad is supported on Linux, Windows, and macOS. A commercial version of Nomad, Nomad Enterprise, is also available.

Nomad provides several key features:

  • Deploy Containers and Legacy Applications: Nomads flexibility as an orchestrator enables an organization to run containers, legacy, and batch applications together on the same infrastructure. Nomad brings core orchestration benefits to legacy applications without needing to containerize via pluggable task drivers.

  • Simple & Reliable: Nomad runs as a single binary and is entirely self contained - combining resource management and scheduling into a single system. Nomad does not require any external services for storage or coordination. Nomad automatically handles application, node, and driver failures. Nomad is distributed and resilient, using leader election and state replication to provide high availability in the event of failures.

  • Device Plugins & GPU Support: Nomad offers built-in support for GPU workloads such as machine learning (ML) and artificial intelligence (AI). Nomad uses device plugins to automatically detect and utilize resources from hardware devices such as GPU, FPGAs, and TPUs.

  • Federation for Multi-Region, Multi-Cloud: Nomad was designed to support infrastructure at a global scale. Nomad supports federation out-of-the-box and can deploy applications across multiple regions and clouds.

  • Proven Scalability: Nomad is optimistically concurrent, which increases throughput and reduces latency for workloads. Nomad has been proven to scale to clusters of 10K+ nodes in real-world production environments.

  • HashiCorp Ecosystem: Nomad integrates seamlessly with Terraform, Consul, Vault for provisioning, service discovery, and secrets management.

Quick Start

Testing

See Learn: Getting Started for instructions on setting up a local Nomad cluster for non-production use.

Optionally, find Terraform manifests for bringing up a development Nomad cluster on a public cloud in the terraform directory.

Production

See Learn: Nomad Reference Architecture for recommended practices and a reference architecture for production deployments.

Documentation

Full, comprehensive documentation is available on the Nomad website: https://www.nomadproject.io/docs

Guides are available on HashiCorp Learn.

Contributing

See the contributing directory for more developer documentation.