Commit Graph

4997 Commits

Author SHA1 Message Date
tehut
b11619010e Add priority flag to Dispatch CLI and API (#25622)
* Add priority flag to Dispatch CLI and DispatchOpts() helper to HTTP API
2025-04-18 13:24:52 -07:00
Aimee Ukasick
d293684d3d Update rel notes, upgrade links to point to correct previous ver (#25652) 2025-04-11 10:22:23 -05:00
Ranjandas
8b33584fbf Add note to root keyring remove command (#25637)
* Add note to root keyring remove command

This PR updates the documentation for the root keyring remove command to note that the full key ID must be provided for the command to function correctly.

* Move keyID explanation to usage section

---------

Co-authored-by: Aimee Ukasick <aimee.ukasick@hashicorp.com>
2025-04-10 08:58:48 -05:00
Tim Gross
27caae2b2a api: make attempting to remove peer by address a no-op (#25599)
In Nomad 1.4.0 we removed support for Raft Protocol v2 entirely. But the
`Operator.RemoveRaftPeerByAddress` RPC handler was left in place, along with its
supporting HTTP API and command line flags. Using this API will always result in
the Raft library error "operation not supported with current protocol version".

Unfortunately it's still possible in unit tests to exercise this code path, and
these tests are quite flaky. This changeset turns the RPC handler and HTTP API
into a no-op, removes the associated command line flags, and removes the flaky
tests. I've also cleaned up the test for `RemoveRaftPeerByID` to consolidate
test servers and use `shoenig/test`.

Fixes: https://hashicorp.atlassian.net/browse/NET-12413
Ref: https://github.com/hashicorp/nomad/pull/13467
Ref: https://developer.hashicorp.com/nomad/docs/upgrade/upgrade-specific#raft-protocol-version-2-unsupported
Ref: https://github.com/hashicorp/nomad-enterprise/actions/runs/13201513025/job/36855234398?pr=2302
2025-04-10 09:19:25 -04:00
Aimee Ukasick
87aabc9af2 Docs: 1.10 release notes, some factoring, sentinel apply update (#25433)
* Docs: 1.10 release notes and upgrade factoring

* Update based on code review suggestions

* add CLI for disabling UI URL hints

* fix indentation

* nav: list release notes in reverse order

fix broken link to v1.6.x docs

* Update PKCE section from Daniel's latest PR

* update pkce per daniel's suggestion

* Add dynamic host volumes governance section from blog
2025-04-09 15:43:58 -07:00
Daniel Bennett
5c8e436de9 auth: oidc: disable pkce by default (#25600)
our goal of "enable by default, only for new auth methods"
proved to be unwieldy, so instead make it a simple bool,
disabled by default.
2025-04-07 12:36:09 -05:00
Daniel Bennett
6a0c4f5a3d auth: oidc: enable pkce only on new auth methods (#25593)
trying not to violate the principle of least astonishment.

we want to only auto-enable PKCE on *new* auth methods,
rather than *new or updated* auth methods, to avoid a
scenario where a Nomad admin updates an auth method
sometime in the future -- something innocent like a new
client secret -- and their OIDC provider doesn't like PKCE.

the main concern is that the provider won't like PKCE
in a totally confusing way. error messages rarely
say PKCE directly, so why the user's auth method
suddenly broke would be a big mystery.

this means that to enable it on existing auth methods,
you would set `OIDCDisablePKCE = false`, and the double-
negative doesn't feel right, so instead, swap the language,
so enabling it on *existing* methods reads sensibly, and to
disable it on *new* methods reads ok-enough:
`OIDCEnablePKCE = false`
2025-04-03 10:56:17 -05:00
Denis Rodin
aca0ff438a raw_exec windows: add support for setting the task user (#25496) 2025-04-03 11:21:13 -04:00
tehut
27b1d470a8 modify rawexec TaskConfig and Config to accept envvar denylist (#25511)
* modify rawexec TaskConfig and Config to accept envvar denylist
* update rawexec driver docs to include deniedEnvars options
Co-authored-by: Daniel Bennett <dbennett@hashicorp.com>

---------

Co-authored-by: Daniel Bennett <dbennett@hashicorp.com>
2025-04-02 12:25:28 -07:00
Nikita Eliseev
76fb3eb9a1 rpc: added configuration for yamux session (#25466)
Fixes: https://github.com/hashicorp/nomad/issues/25380
2025-04-02 10:58:23 -04:00
Aimee Ukasick
9778fa4912 Docs: Fix broken links in main for 1.10 release (#25540)
* Docs: Fix broken links in main for 1.10 release

* Implement Tim's suggestions

* Remove link to Portworx from ecosystem page

* remove "Portworx" since Portworx 3.2 no longer supports Nomad
2025-04-01 09:09:44 -05:00
Tim Gross
cdd40cf81b docs: document requirements for Consul tokens in admin partitions (#25529)
When using Nomad with Consul, each Nomad agent is expected to have a Consul
agent running alongside. When using Nomad Enterprise and Consul Enterprise
together, the Consul agent may be in a Consul admin partition. In order for
Nomad's "anti-entropy" sync to work with Consul, the Consul ACL token and ACL
policy for the Nomad client must be in the same admin partition as the Consul
agent. Otherwise, we can register services (via WI) but then won't be able to
deregister them unless they're the default namespace.

Ref: https://hashicorp.atlassian.net/browse/NET-12361
2025-04-01 08:45:05 -04:00
Michael Smithhisler
7176cf443a docs: add missing podman task config options (#25465)
---------

Co-authored-by: Aimee Ukasick <aimee.ukasick@hashicorp.com>
2025-04-01 08:31:58 -04:00
Allison Larson
17d191ae24 Add -group flag to alloc exec, alloc logs command (#25568)
* Add -group flag to `alloc exec`, `alloc logs` command

* fixup! Add -group flag to `alloc exec`, `alloc logs` command

* Add -group option to alloc fs

* Add changelog
2025-03-31 14:17:45 -07:00
Sooter Saalu
e93bda31ea Update placement.mdx (#25538)
* Update placement.mdx

Added explanations on initial and blocked evaluation for placement failures.

fixes #24824

* Update website/content/docs/concepts/scheduling/placement.mdx

Co-authored-by: Aimee Ukasick <aimee.ukasick@hashicorp.com>

* Update website/content/docs/concepts/scheduling/placement.mdx

Co-authored-by: Aimee Ukasick <aimee.ukasick@hashicorp.com>

---------

Co-authored-by: Aimee Ukasick <aimee.ukasick@hashicorp.com>
2025-03-31 09:08:06 -05:00
Daniel Bennett
99c25fc635 dhv: mkdir plugin parameters: uid,guid,mode (#25533)
also remove Error logs from client rpc and promote plugin Debug logs to Error (since they have more info in them)
2025-03-28 10:13:13 -05:00
Tim Gross
fb93c41ba7 docs: expand info on built-in mkdir dynamic host volume plugin (#25524)
Describe the built-in `mkdir` plugin in the plugin concepts docs in a little
more detail. Crosslink to there from the `plugin_id` field docs, and clarify
that the `mkdir` plugin doesn't support the capacity request fields.

Update the example plugins to avoid using volume author controlled variables in
favor of Nomad-controlled ones, to reduce the risk of path traversal, and
explain to plugin authors they'll likely want to avoid this in their own
plugins.
2025-03-26 11:21:43 -04:00
Aimee Ukasick
b8ad371cfb Docs: SEO updates to front matter description intro, install, integrations (#25416)
* install section

* nomad/intro section

* integrations section

* Feedback from review

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

---------

Co-authored-by: Jeff Boruszak <104028618+boruszak@users.noreply.github.com>
2025-03-26 09:40:37 -05:00
Allison Larson
d1d8945d2e Add docker plugin config option image_pull_timeout value for default timeout (#25489)
* Add docker plugin config image_pull_timeout value for default timeout

* Add image_pull_timeout docker plugin config to docs

* Add changelog
2025-03-24 13:03:14 -07:00
Aimee Ukasick
34ae5d5ae6 Fix link rendering in server.default_scheduler_config (#25482)
CE-821
2025-03-21 12:50:57 -05:00
Aimee Ukasick
95ee9261a5 Docs: fix broken links in 1.10 beta docs (#25469)
* Docs: fix 1.10 broken link in operations/stateful-workloads

* updated the link in other pages
2025-03-20 13:17:09 -05:00
Aimee Ukasick
107289620c Docs: Add JSON format note to docker driver sysctl parameter (#25454)
* Docs: Add JSON format note to docker driver sysctl parameter

CE-837

* Apply suggestions from code review

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

---------

Co-authored-by: Tim Gross <tgross@hashicorp.com>
2025-03-20 09:22:26 -05:00
Daniel Bennett
8c609ad762 docs: oidc client assertions and pkce (#25375) 2025-03-20 09:14:17 -05:00
Aimee Ukasick
dae496e427 Docs: SEO front matter description for search: commands section (#25175)
* Enhance front matter description for search

* acl section

* alloc section

* config section

* deployment section

* eval section

* job section

* license section

* namespace section

* node section

* node pool section

* operator section

* plugin section

* quota section

* recommendation section

* scaling section

* sentinel section

* server section

* service section

* setup section

* system section

* tls section

* var section

* volume section

* change reference to command reference

* Apply suggestions from code review

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

---------

Co-authored-by: Jeff Boruszak <104028618+boruszak@users.noreply.github.com>
2025-03-19 12:02:02 -05:00
Shantanu Gadgil
b641d25730 website: fix URL for periodic jobs (#25436) 2025-03-19 07:32:51 +00:00
Tim Gross
bf67f53ba2 docs: add note about Consul Enterprise role bindings and namespaces (#25426)
When configuring Consul to use Nomad workload identities, you create the Consul
auth method in the default namespace. If you're using Consul Enterprise
namespaces, there are two available approaches: one is to create the tokens in
the default namespace and give them policies that define cross-namespace access,
and the other is to use binding rules that map the login to a particular
namespace. The latter is what we show in our docs, but this was missing a note
that any roles (and their associated policies) targetted by `-bind-type role`
need to exist in the Consul namespace we're logging into.

Also, in Nomad CE, the `consul.namespace` flag is always treated as having been set to
`"default"`. That is, we ignore it and don't return an error even though it's a
Nomad ENT-only feature. Clarify this in the documentation for the field the same
way we've done for the `cluster` field.

Co-authored-by: Aimee Ukasick <aimee.ukasick@hashicorp.com>
2025-03-18 15:35:00 -04:00
saiakhileshgade
c40f609757 website: Fix typo with scheduling.mdx (#25400) 2025-03-17 08:08:36 +00:00
Paweł Bęza
00b15e6807 Fix wording about delta priority needed to trigger preemption (#25395) 2025-03-14 12:31:30 -05:00
Piotr Kazmierczak
5c2ae00170 docs: increasing the non-interactive desktop heap size (#25357) 2025-03-12 17:19:49 +01:00
Habibi Mustafa
0b1a660b81 docs: fix missing api version on path (#25355) 2025-03-12 09:35:52 -05:00
Habibi Mustafa
715186f7c3 docs: fix missing api version on acl path (#25356)
* docs: fix missing api version on acl auth method path

* docs: fix missing api version on acl binding rules path

* docs: fix missing api version on acl policies path

* docs: fix missing api version on acl roles path

* docs: fix missing api version on acl tokens path
2025-03-12 09:28:21 -05:00
Tim Gross
1ffb7ab3fb dynamic host volumes: allow plugins to return an error message (#25341)
Errors from `volume create` or `volume delete` only get logged by the client
agent, which may make it harder for volume authors to debug these tasks if they
are not also the cluster administrator with access to host logs.

Allow plugins to include an optional error message in their response. Because we
can't count on receiving this response (the error could come before the plugin
executes), we parse this message optimistically and include it only if
available.

Ref: https://hashicorp.atlassian.net/browse/NET-12087
2025-03-11 11:06:57 -04:00
James Rasell
c53ba3e7d1 consul: Remove implicit workload identity when task has a template. (#25298)
When a task included a template block, Nomad was adding a Consul
identity by default which allowed the template to use Consul API
template functions even when they were not needed or desired.

This change removes the implict addition of Consul identities to
tasks when they include a template block. Job specification
authors will now need to add a Consul identity or Consul block to
their task if they have a template which uses Consul API functions.

This change also removes the default addition of a Consul block to
all task groups registered and processed by the API package.
2025-03-10 13:49:50 +00:00
Robert Main
57cd92274c Merge pull request #25192 from hashicorp/dependabot/npm_and_yarn/website/prettier-3.5.2
chore(deps-dev): bump prettier from 3.5.1 to 3.5.2 in /website
2025-03-07 16:14:30 -05:00
Phil Renaud
35e1ea4328 [cli] UI URL hints for common CLI commands (#24454)
* Basic implementation for server members and node status

* Commands for alloc status and job status

* -ui flag for most commands

* url hints for variables

* url hints for job dispatch, evals, and deployments

* agent config ui.cli_url_links to disable

* Fix an issue where path prefix was presumed for variables

* driver uncomment and general cleanup

* -ui flag on the generic status endpoint

* Job run command gets namespaces, and no longer gets ui hints for --output flag

* Dispatch command hints get a namespace, and bunch o tests

* Lots of tests depend on specific output, so let's not mess with them

* figured out what flagAddress is all about for testServer, oof

* Parallel outside of test instances

* Browser-opening test, sorta

* Env var for disabling/enabling CLI hints

* Addressing a few PR comments

* CLI docs available flags now all have -ui

* PR comments addressed; switched the env var to be consistent and scrunched monitor-adjacent hints a bit more

* ui.Output -> ui.Warn; moves hints from stdout to stderr

* isTerminal check and parseBool on command option

* terminal.IsTerminal check removed for test-runner-not-being-terminal reasons
2025-03-07 13:23:35 -05:00
Piotr Kazmierczak
149141e831 stateful deployments: task group host volume claims docs (#25290) 2025-03-06 17:23:08 +01:00
Piotr Kazmierczak
ed4a5decba stateful deployments: concept and jobspec documentation (#25288) 2025-03-06 17:06:29 +01:00
Michael Smithhisler
5c4d0e923d consul: Remove legacy token based authentication workflow (#25217) 2025-03-05 15:38:11 -05:00
Michael Smithhisler
f2b761f17c disconnected: removes deprecated disconnect fields (#25284)
The group level fields stop_after_client_disconnect,
max_client_disconnect, and prevent_reschedule_on_lost were deprecated in
Nomad 1.8 and replaced by field in the disconnect block. This change
removes any logic related to those deprecated fields.

---------

Co-authored-by: Tim Gross <tgross@hashicorp.com>
2025-03-05 14:46:02 -05:00
Aimee Ukasick
b33c801039 Docs: Add workload identity and Consul Enterprise info to partition parameter (#25251)
* Docs: Add info to partition parameter. CE-820

* fix link format for Nomad Workload Identities

* fix typo
2025-03-04 09:33:57 -06:00
grembo
b6d925987c Allow disabling wait in client configuration (#25255)
Before the fixes in #20165, the wait feature was disabled by
default. After these changes, it's always enabled, which - at
least on some platforms - leads to a significant increase in
load (5-7x).

This patch allows disabling the wait feature in the client
stanza of the configuration file by setting min and max to 0:

    wait {
      min     = "0"
      max     = "0"
    }

Per-template wait blocks in the task description still work like
one would expect.
2025-03-03 16:38:46 -05:00
Juana De La Cuesta
d50a9a474c Add note to stop allocs for system allocs (#25263)
* docs: Add note to stop allocs to make sure system allocs are not rescheduled

* Update stop.mdx

* Update website/content/docs/commands/alloc/stop.mdx

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

---------

Co-authored-by: Tim Gross <tgross@hashicorp.com>
2025-03-03 19:37:24 +01:00
Tim Gross
60132ab0cf docs: update renamed attributes (#25265)
A couple of attributes were renamed in #24942. Update example outputs in the API
docs to match.

Ref: https://github.com/hashicorp/nomad/pull/24942#pullrequestreview-2653776939
2025-03-03 09:44:26 -05:00
James Rasell
7268053174 vault: Remove legacy token based authentication workflow. (#25155)
The legacy workflow for Vault whereby servers were configured
using a token to provide authentication to the Vault API has now
been removed. This change also removes the workflow where servers
were responsible for deriving Vault tokens for Nomad clients.

The deprecated Vault config options used byi the Nomad agent have
all been removed except for "token" which is still in use by the
Vault Transit keyring implementation.

Job specification authors can no longer use the "vault.policies"
parameter and should instead use "vault.role" when not using the
default workload identity.

---------

Co-authored-by: Tim Gross <tgross@hashicorp.com>
Co-authored-by: Aimee Ukasick <aimee.ukasick@hashicorp.com>
2025-02-28 07:40:02 +00:00
Aimee Ukasick
4693f0be2e docs: update Virt beta callout to use Note component (#25184) 2025-02-25 11:26:41 -06:00
Piotr Kazmierczak
58c6387323 stateful deployments: task group host volume claims API (#25114)
This PR introduces API endpoints /v1/volumes/claims/ and /v1/volumes/claim/:id
for listing and deleting task group host volume claims, respectively.
2025-02-25 15:51:59 +01:00
Tim Gross
7997a760df docs: improve cross-links for scheduler preemption (#25203)
Fix a broken link from the preemption concepts docs to the relevant API. Also include a link to the relevant command.

Ref: #25038
2025-02-25 08:56:54 -05:00
Tim Gross
4cdfa19b1e volume status: default type to show both DHV and CSI volumes (#25185)
The `-type` option for `volume status` is a UX papercut because for many
clusters there will be only one sort of volume in use. Update the CLI so that
the default behavior is to query CSI and/or DHV.

This behavior is subtly different when the user provides an ID or not. If the
user doesn't provide an ID, we query both CSI and DHV and show both tables. If
the user provides an ID, we query DHV first and then CSI, and show only the
appropriate volume. Because DHV IDs are UUIDs, we're sure we won't have
collisions between the two. We only show errors if both queries return an error.

Fixes: https://hashicorp.atlassian.net/browse/NET-12214
2025-02-24 11:38:07 -05:00
dependabot[bot]
b36b9d3afb chore(deps-dev): bump prettier from 3.5.1 to 3.5.2 in /website
Bumps [prettier](https://github.com/prettier/prettier) from 3.5.1 to 3.5.2.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/3.5.1...3.5.2)

---
updated-dependencies:
- dependency-name: prettier
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-02-23 09:25:37 +00:00
Phil Renaud
11cf98abe3 Pins trim-newlines for the website package (#25189) 2025-02-21 16:50:18 -05:00