Commit Graph

27333 Commits

Author SHA1 Message Date
Aimee Ukasick
9bcfe7bd36 Docs: Update SSO with Auth0 guide (#26488)
* initial

* Update for Auth0 changes.

* updated to end

* fix URL with double forward slashes
2025-08-12 09:34:23 -05:00
James Rasell
7964c5ab18 auth: Build client introduction string for authenticated identity. (#26496)
When emitting rate metrics, we use the identity string within the
labels to better describe the caller. If the register RPC uses an
introduction identity, we can correctly detail this.
2025-08-11 14:13:12 +01:00
Adiel Cristo
d4eb251004 fix(docs): remove incomplete phrase fragment (#26489) 2025-08-11 07:40:36 -05:00
Juana De La Cuesta
225ac2938a Add new metric for queue size to the autoscaler (#26453)
* docs: add a new metric to the autoscaler for the size of the execution queue

* Update telemetry.mdx

* Update telemetry.mdx
2025-08-11 10:26:57 +02:00
Aimee Ukasick
d305f32017 Docs: Plugin authoring guide (#26395)
* create plugin author guide; remove concepts/plugins

* style guide; update links

* update cni redirect

* move host-volume plugin to /plugins/. Add arch host volume content.

* Apply Jeff's style guide updates

Co-authored-by: Jeff Boruszak <104028618+boruszak@users.noreply.github.com>

* Apply suggestions from code review

Co-authored-by: Jeff Boruszak <104028618+boruszak@users.noreply.github.com>

* Create Base plugin API section, link to BasePlugin interface

---------

Co-authored-by: Jeff Boruszak <104028618+boruszak@users.noreply.github.com>
2025-08-08 14:55:58 -05:00
Wim
f712d5db90 Add AllocIPv6 option to allow IPv6 address being used for service registration (#25632)
Fixes #25627 by adding an extra `alloc_advertise_ipv6` option similar to the `AdvertiseIPv6Addr` with the docker driver config.

Fixes: https://github.com/hashicorp/nomad/issues/25627
2025-08-08 15:01:46 -04:00
Alexey Kulakov
34025aa6b6 fix(website): node version bump from v18 to v22 (#26479) 2025-08-08 10:54:35 -07:00
Alexey Kulakov
feae929075 chore: remove unused screenshots folder (#26478) 2025-08-08 10:24:24 -07:00
Alexey Kulakov
0cac9813fa fix(ui): remove old pattern for component templates (#26431) 2025-08-08 10:03:42 -07:00
James Rasell
f11461178d node identity: Allow reconnect after GC of node state object. (#26475)
The Nomad garbage collector can be triggered manually which among
other things will remove down nodes from state. If a cleaned node
reconnects after this happens, it will be unable to reconnect with
the cluster running strict enforcement, even if it has a valid
node identity token.

This change fixes the issue by allowing nodes to reconnect with a
node identity, even if their state object has been removed by the
GC process. This will only work if the node identity has not
expired. If it has and strict enforcement is enabled, the operator
will have to re-introuduce the node to the cluster which feels like
expected and correct behaviour.
2025-08-08 16:07:59 +01:00
James Rasell
f5c02671e5 rpc: Move register args initial validation into separate function. (#26446)
The RPC handler function is quite long, so moving the argument
validation into its own function reduces this and makes sense from
an organisation view.
2025-08-08 13:47:27 +01:00
Michael Smithhisler
b6f90d0562 docs: fix indent on vault create_from_role (#26472) 2025-08-07 16:03:33 -05:00
Daniel Bennett
3c435d2953 docs: cni: add ipv6 bridge example (#26456) 2025-08-07 16:16:45 -04:00
Tim Gross
5d8e8df7bd docs: clarify consumers of environment variables for CLI (#26459)
In https://github.com/hashicorp/nomad/issues/15459 we've had a bit of
back-and-forth as a result of applying Nomad environment variables where they
typically should not be used. Clarify that the env vars are for the CLI and
mostly not for the agent. Also move the `NOMAD_CLI_SHOW_HINTS` description into
the correct section.
2025-08-07 15:47:32 -04:00
Tim Gross
9717719502 docs: fix missing entry from template function_denylist (#26458)
The docs for the `template` block accurately describe the template configuration
default function denylist in the body but the default parameters are missing
values. The equivalent docs in the `client` configuration are missing
`executeTemplate` as well.
2025-08-07 15:47:14 -04:00
Allison Larson
e16a3339ad Add CSI Volume Sentinel Policy scaffolding (#26438)
* Add ent policy enforcement stubs to CSI Volume create/register

* Wire policy override/warnings through CSI volume register/create

* Add new scope to sentinel apply

* Sanitize CSISecrets & CSIMountOptions

* Add sentinel policy scope to ui

* Update docs for new sentinel scope/policy

* Create new api funcs for CSI endpoints

* fix sentinel csi ui test

* Update sentinel-policy docs

* Add changelog

* Update docs from feedback
2025-08-07 12:03:18 -07:00
Deniz Onur Duzgun
79bf619833 build: update toolchain to go 1.24.6 (#26451)
* build: update toolchain to go 1.24.6

* add changelog
2025-08-07 08:44:41 -04:00
Tim Gross
6563d0ec3c wait for service registration cleanup until allocs marked lost (#26424)
When a node misses a heartbeat and is marked down, Nomad deletes service
registration instances for that node. But if the node then successfully
heartbeats before its allocations are marked lost, the services are never
restored. The node is unaware that it has missed a heartbeat and there's no
anti-entropy on the node in any case.

We already delete services when the plan applier marks allocations as stopped,
so deleting the services when the node goes down is only an optimization to more
quickly divert service traffic. But because the state after a plan apply is the
"canonical" view of allocation health, this breaks correctness.

Remove the code path that deletes services from nodes when nodes go down. Retain
the state store code that deletes services when allocs are marked terminal by
the plan applier. Also add a path in the state store to delete services when
allocs are marked terminal by the client. This gets back some of the
optimization but avoids the correctness bug because marking the allocation
client-terminal is a one way operation.

Fixes: https://github.com/hashicorp/nomad/issues/16983
2025-08-06 13:40:37 -04:00
Aimee Ukasick
a30cb2f137 Update UI, code comment, and README links to docs, tutorials (#26429)
* Update UI, code comment, and README links to docs, tutorials

* fix typo in ephemeral disks learn more link url

* feedback on typo

Co-authored-by: Tim Gross <tgross@hashicorp.com>

---------

Co-authored-by: Tim Gross <tgross@hashicorp.com>
2025-08-06 09:40:23 -05:00
James Rasell
1c63ad50d9 Merge pull request #26430 from hashicorp/f-NMD-763-introduction
introduction: The initial implementation code for node introduction.
2025-08-06 14:41:16 +02:00
James Rasell
622def8bcf test: Ensure client rpclogger is set on RPC only client. (#26443)
If a test encounters an RPC error using the test client, it will
panic as the rpc logger is not set when it attempts to log the
error.
2025-08-06 10:20:28 +01:00
Michael Schurter
0f630004b9 docs: Once -> once (#26435) 2025-08-05 11:10:25 -07:00
Tim Gross
0ae5b3f39b eval status: sort plan annotations by task group (#26428)
The plan annotations table isn't sorted by task group, which makes for a less
beautiful UX and a flaky test.
2025-08-05 09:36:12 -04:00
James Rasell
ad508616dc Merge branch 'main' into f-NMD-763-introduction 2025-08-05 08:56:51 +01:00
James Rasell
350662c88e Merge pull request #26291 from hashicorp/f-NMD-763-identity
identity: The initial implementation code for node identity.
2025-08-05 09:52:28 +02:00
James Rasell
80a26306bf intro: Add node introduction flow for Nomad client registration. (#26405)
This change implements the client -> server workflow for Nomad
node introduction. A Nomad node can optionally be started with an
introduction token, which is a signed JWT containing claims for
the node registration. The server handles this according to the
enforcement configuration.

The introduction token can be provided by env var, cli flag, or
by placing it within a default filesystem location. The latter
option does not override the CLI or env var.

The region claims has been removed from the initial claims set of
the intro identity. This boundary is guarded by mTLS and aligns
with the node identity.
2025-08-05 08:23:44 +01:00
Tim Gross
8f74807891 tests: fix conflict from parallelism in state store variables test (#26426)
The state store test for Variables check-and-set behavior for deletes uses the
same state store for a set of parallel tests. But one of the tests overlaps
another by using the same path, and this can cause spurious test failures by
hitting the CAS conflict error. This overlap doesn't appear to be intentional,
so change the test to use a different path.

Also cleaned up some unused test helpers in the same file.
2025-08-04 17:03:21 -04:00
tehut
21841d3067 Add historical journald and log export flags to operator debug command (#26410)
* Add -log-file-export and -log-lookback commands to add historical log to
debug capture
* use monitor.PrepFile() helper for other historical log tests
2025-08-04 13:55:25 -07:00
Daniel Bennett
7c633f8109 exec: don't panic on rootless raw_exec tasks (#26401)
the executor dies, leaving an orphaned process still running.

the panic fix:
 * don't `panic()`
 * and return an empty, but non-nil, func on cgroup error

feature fix:
 * allow non-root agent to proceed with exec when cgroups are off
2025-08-04 13:58:35 -04:00
Tim Gross
9859f4a140 document version check requirement on Raft message types (#26411)
Whenever we add a new Raft message type, we almost always need to add a new
version check to ensure that leaders aren't trying to write unknown Raft entries
to older followers. Leave a note about this where the edits happen to reduce the
risk of this unfortunately common bug.

Ref: https://github.com/hashicorp/nomad-enterprise/pull/2973
2025-08-04 12:07:27 -04:00
dependabot[bot]
8eaf7b80ee chore(deps): bump github.com/golang-jwt/jwt/v5 from 5.2.3 to 5.3.0 (#26416)
Bumps [github.com/golang-jwt/jwt/v5](https://github.com/golang-jwt/jwt) from 5.2.3 to 5.3.0.
- [Release notes](https://github.com/golang-jwt/jwt/releases)
- [Changelog](https://github.com/golang-jwt/jwt/blob/main/VERSION_HISTORY.md)
- [Commits](https://github.com/golang-jwt/jwt/compare/v5.2.3...v5.3.0)

---
updated-dependencies:
- dependency-name: github.com/golang-jwt/jwt/v5
  dependency-version: 5.3.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-08-04 10:30:27 +02:00
dependabot[bot]
7ed9d168ae chore(deps): bump github.com/hashicorp/go-set/v3 from 3.0.0 to 3.0.1 (#26414)
Bumps [github.com/hashicorp/go-set/v3](https://github.com/hashicorp/go-set) from 3.0.0 to 3.0.1.
- [Release notes](https://github.com/hashicorp/go-set/releases)
- [Commits](https://github.com/hashicorp/go-set/compare/v3.0.0...v3.0.1)

---
updated-dependencies:
- dependency-name: github.com/hashicorp/go-set/v3
  dependency-version: 3.0.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-08-04 10:21:57 +02:00
dependabot[bot]
57e7f8f28d chore(deps): bump github.com/prometheus/client_golang (#26413)
Bumps [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) from 1.22.0 to 1.23.0.
- [Release notes](https://github.com/prometheus/client_golang/releases)
- [Changelog](https://github.com/prometheus/client_golang/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prometheus/client_golang/compare/v1.22.0...v1.23.0)

---
updated-dependencies:
- dependency-name: github.com/prometheus/client_golang
  dependency-version: 1.23.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-08-04 09:51:06 +02:00
dependabot[bot]
7790dd1c65 chore(deps): bump github.com/aws/aws-sdk-go-v2/config (#26412)
Bumps [github.com/aws/aws-sdk-go-v2/config](https://github.com/aws/aws-sdk-go-v2) from 1.29.18 to 1.30.2.
- [Release notes](https://github.com/aws/aws-sdk-go-v2/releases)
- [Changelog](https://github.com/aws/aws-sdk-go-v2/blob/main/changelog-template.json)
- [Commits](https://github.com/aws/aws-sdk-go-v2/compare/config/v1.29.18...v1.30.2)

---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go-v2/config
  dependency-version: 1.30.2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-08-04 09:50:12 +02:00
tehut
d709accaf5 Add nomad monitor export command (#26178)
* Add MonitorExport command and handlers
* Implement autocomplete
* Require nomad in serviceName
* Fix race in StreamReader.Read
* Add and use framer.Flush() to coordinate function exit
* Add LogFile to client/Server config and read NomadLogPath in rpcHandler instead of HTTPServer
* Parameterize StreamFixed stream size
2025-08-01 10:26:59 -07:00
Gautam Kumar
6f81222ec8 CL: improve acl policy self output for management tokens (#26396)
Improved the acl policy self CLI command to handle both management and client tokens.
Management tokens now display a clear message indicating global access with no individual policies.

Fixes: https://github.com/hashicorp/nomad/issues/26389
2025-08-01 09:02:47 -04:00
Aimee Ukasick
5dc7e7fe25 Docs: Chore: Ent labels (#26323)
* replace outdated tutorial links

* update more tutorial links

* Add CE/ENT or ENT to left nav

* remove ce/ent labels

* revert enterprise features
2025-07-30 09:02:28 -05:00
dependabot[bot]
1209c34be1 chore(deps): bump github.com/docker/docker (#26390)
Bumps [github.com/docker/docker](https://github.com/docker/docker) from 28.3.2+incompatible to 28.3.3+incompatible.
- [Release notes](https://github.com/docker/docker/releases)
- [Commits](https://github.com/docker/docker/compare/v28.3.2...v28.3.3)

---
updated-dependencies:
- dependency-name: github.com/docker/docker
  dependency-version: 28.3.3+incompatible
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-07-29 16:21:18 -04:00
Tim Gross
4ce937884d scheduler: move result mutation into computeStop (#26351)
The `computeStop` method returns two values that only get used to mutate the
result and the untainted set. Move the mutation into the method to match the
work done in #26325.

Ref: https://github.com/hashicorp/nomad/pull/26325
Ref: https://hashicorp.atlassian.net/browse/NMD-819
2025-07-29 08:23:06 -04:00
Tim Gross
e062f87b07 docs: fix typo in redirect URL domain (#26384) 2025-07-28 16:28:27 -04:00
Tim Gross
501608ca68 docs: document handling of unset affinity/constraint values (#26354)
Affinities and contraints use similar feasibility checking logic to determine if
a given node matches (although affinities don't support all the same
operators). Most operators don't allow `value` to be unset. Update the docs to
reflect this.

Fixes: https://github.com/hashicorp/nomad/issues/24983
2025-07-28 14:12:43 -04:00
Tim Gross
b286a8ee9c docs: update Consul/Vault compatibility matrix (#26368)
Update our support matrix to show currently-supported versions of Consul, Vault,
and Nomad.
2025-07-28 13:48:38 -04:00
Tim Gross
192dec4297 docs: fix self-referencing link for raw_exec driver config (#26353)
During the big docs rearchitecture, we split up the task driver pages into
separate job declaration and driver configuration pages. The link for the
`raw_exec` driver to the configuration page is a self-reference.
2025-07-28 13:48:23 -04:00
Tim Gross
513ec02486 docs: explain access modes for CSI and DHV volumes (#26352)
The documentation for CSI and DHV has a list of the available access modes, but
doesn't explain what they mean in terms of what jobs can request, the scheduler
behavior, or the CSI plugin behavior. Expand on the information available in the
CSI specification and provide a description of DHV's behavior as well.

Ref: https://github.com/container-storage-interface/spec/blob/master/spec.md#createvolume
2025-07-28 13:48:01 -04:00
Tim Gross
6e5ecb6bb0 E2E: update Consul/Vault compat versions tested (#26369)
Update our E2E compatibility test for Consul and Vault to only include back to
the oldest-supported LTS versions of Consul and Vault. This will still leave
a few unsupported non-LTS versions in the matrix between the two oldest LTS, but
this is a small number of tests and fixing it would mean hard-coding the LTS
support matrix in our tests.
2025-07-28 12:03:30 -04:00
dependabot[bot]
d418260b6d chore(deps): bump google.golang.org/grpc from 1.73.0 to 1.74.2 (#26357)
Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.73.0 to 1.74.2.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](https://github.com/grpc/grpc-go/compare/v1.73.0...v1.74.2)

---
updated-dependencies:
- dependency-name: google.golang.org/grpc
  dependency-version: 1.74.2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-07-28 11:27:49 -04:00
dependabot[bot]
a90f82bd0f chore(deps): bump github.com/aws/smithy-go from 1.22.4 to 1.22.5 (#26355)
Bumps [github.com/aws/smithy-go](https://github.com/aws/smithy-go) from 1.22.4 to 1.22.5.
- [Release notes](https://github.com/aws/smithy-go/releases)
- [Changelog](https://github.com/aws/smithy-go/blob/main/CHANGELOG.md)
- [Commits](https://github.com/aws/smithy-go/compare/v1.22.4...v1.22.5)

---
updated-dependencies:
- dependency-name: github.com/aws/smithy-go
  dependency-version: 1.22.5
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-07-28 11:00:15 -04:00
James Rasell
fe42c5bab0 ci: Revert hclogvet running across entire codebase. (#26365)
It seems the tool requires a little attention and does not run
well across our enterprise codebase. Rolling back that makefile
change, so it does not stop enterprise work, backport, CI, etc.
2025-07-28 15:53:40 +01:00
dependabot[bot]
e561bdb476 chore(deps): bump github.com/hashicorp/consul-template (#26356)
Bumps [github.com/hashicorp/consul-template](https://github.com/hashicorp/consul-template) from 0.41.0 to 0.41.1.
- [Release notes](https://github.com/hashicorp/consul-template/releases)
- [Changelog](https://github.com/hashicorp/consul-template/blob/v0.41.1/CHANGELOG.md)
- [Commits](https://github.com/hashicorp/consul-template/compare/v0.41.0...v0.41.1)

---
updated-dependencies:
- dependency-name: github.com/hashicorp/consul-template
  dependency-version: 0.41.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-07-28 10:02:59 -04:00
dependabot[bot]
5bc5f4f9f1 chore(deps): bump github.com/aws/aws-sdk-go-v2/config (#26358)
Bumps [github.com/aws/aws-sdk-go-v2/config](https://github.com/aws/aws-sdk-go-v2) from 1.29.17 to 1.29.18.
- [Release notes](https://github.com/aws/aws-sdk-go-v2/releases)
- [Changelog](https://github.com/aws/aws-sdk-go-v2/blob/main/changelog-template.json)
- [Commits](https://github.com/aws/aws-sdk-go-v2/compare/config/v1.29.17...config/v1.29.18)

---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go-v2/config
  dependency-version: 1.29.18
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-07-28 10:02:27 -04:00