Go to file
Tim Gross 4368dcc02f
fix deadlock in plan_apply (#13407)
The plan applier has to get a snapshot with a minimum index for the
plan it's working on in order to ensure consistency. Under heavy raft
loads, we can exceed the timeout. When this happens, we hit a bug
where the plan applier blocks waiting on the `indexCh` forever, and
all schedulers will block in `Plan.Submit`.

Closing the `indexCh` when the `asyncPlanWait` is done with it will
prevent the deadlock without impacting correctness of the previous
snapshot index.

This changeset includes the a PoC failing test that works by injecting
a large timeout into the state store. We need to turn this into a test
we can run normally without breaking the state store before we can
merge this PR.

Increase `snapshotMinIndex` timeout to 10s.
This timeout creates backpressure where any concurrent `Plan.Submit`
RPCs will block waiting for results. This sheds load across all
servers and gives raft some CPU to catch up, because schedulers won't
dequeue more work while waiting. Increase it to 10s based on
observations of large production clusters.
2022-06-23 12:06:27 -04:00
.changelog fix deadlock in plan_apply (#13407) 2022-06-23 12:06:27 -04:00
.circleci build: rearrange go path order on windows 2022-06-10 07:41:12 -05:00
.github Quote assignees value to fix dependabot.yaml parsing error (#13372) 2022-06-14 15:07:52 -04:00
.release Update example license_path to match docs (#13374) 2022-06-20 09:04:02 -04:00
.semgrep ci: add semgrep rule to catch usage of invalid string extensions (#12509) 2022-04-08 10:58:32 -04:00
.tours Make number of scheduler workers reloadable (#11593) 2022-01-06 11:56:13 -05:00
acl ci: swap ci parallelization for unconstrained gomaxprocs 2022-03-15 12:58:52 -05:00
api api: added sysbatch job type constant to match other schedulers. (#13359) 2022-06-16 11:53:04 +02:00
ci ci: fixup task runner chroot test 2022-04-19 10:37:46 -05:00
client csi_hook: valid if any driver supports csi (#13446) 2022-06-22 10:43:43 -04:00
command cli: fix detach handling (#13405) 2022-06-21 06:01:23 -04:00
contributing build: update golang version to 1.18.2 2022-05-25 10:04:04 -05:00
demo cli: update default redis and use nomad service discovery 2022-05-17 10:24:19 -05:00
dev docs: swap master for main in Nomad repo 2021-03-08 14:26:31 -05:00
drivers qemu driver: Add option to configure drive_interface (#11864) 2022-06-10 10:03:51 -04:00
e2e docker: update images to reference hashicorpdev Docker organization (#12903) 2022-06-08 15:06:00 -04:00
helper helpers: provide a few generic helper functions 2022-06-09 10:43:54 -05:00
integrations spelling: registrations 2018-03-11 18:40:53 +00:00
internal/testing/apitests ci: swap ci parallelization for unconstrained gomaxprocs 2022-03-15 12:58:52 -05:00
jobspec CSI: make plugin health_timeout configurable in csi_plugin stanza (#13340) 2022-06-14 10:04:16 -04:00
jobspec2 add filebase64 function (#11791) 2022-06-06 11:58:17 -04:00
lib client: enable support for cgroups v2 2022-03-23 11:35:27 -05:00
nomad fix deadlock in plan_apply (#13407) 2022-06-23 12:06:27 -04:00
plugins ci: fixup task runner chroot test 2022-04-19 10:37:46 -05:00
scheduler CSI: no early return when feasibility check fails on eligible nodes (#13274) 2022-06-07 13:31:10 -04:00
scripts build(deps): bump node-fetch in /scripts/screenshots/src (#11908) 2022-06-08 10:48:36 -04:00
terraform update hashistack demo for current versions of Terraform 2022-06-21 16:09:11 -04:00
testutil cli: correctly use and validate job with vault token set 2022-05-19 12:13:34 -05:00
tools ci: ensure package coverage of test-core 2022-04-14 19:04:06 -05:00
ui build(deps-dev): bump ember-page-title from 6.2.0 to 7.0.0 in /ui (#11738) 2022-06-08 10:30:37 -04:00
version Prepare for next release 2022-05-24 16:29:47 -04:00
website docs: clarify total_escaped is just an optimization (#13460) 2022-06-22 11:39:56 -07:00
.gitattributes Remove invalid gitattributes 2018-02-14 14:47:43 -08:00
.gitignore Allow Operator Generated bootstrap token (#12520) 2022-06-03 07:37:24 -04:00
.go-version build: update golang version to 1.18.2 2022-05-25 10:04:04 -05:00
.golangci.yml cleanup: purge github.com/pkg/errors 2022-04-01 19:24:02 -05:00
.semgrepignore build: disable semgrep on structs.go for now 2022-02-01 10:09:49 -06:00
CHANGELOG.md Post 1.3.1 release changes 2022-05-24 16:33:30 -04:00
CODEOWNERS add service acct to codeowners for backport merging 2022-05-06 10:06:20 -07:00
GNUmakefile build: update golangci-lint to v1.46.2 2022-05-31 23:32:01 +00:00
LICENSE Initial commit 2015-06-01 12:21:00 +02:00
README.md README: Align with Consul README (#9681) 2020-12-18 09:38:34 -08:00
Vagrantfile tools: update virtualbox networking configuration (#11561) 2021-11-24 10:45:58 -05:00
build_linux_arm.go gofmt all the files 2021-10-01 10:14:28 -04:00
go.mod helpers: provide a few generic helper functions 2022-06-09 10:43:54 -05:00
go.sum helpers: provide a few generic helper functions 2022-06-09 10:43:54 -05:00
main.go raw_exec: make raw exec driver work with cgroups v2 2022-04-04 16:11:38 -05:00
main_test.go Adding initial skeleton 2015-06-01 13:46:21 +02:00

README.md

Nomad Build Status 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.