Commit Graph

216 Commits

Author SHA1 Message Date
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
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
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
Daniel Bennett
8c609ad762 docs: oidc client assertions and pkce (#25375) 2025-03-20 09:14:17 -05: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
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
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
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
Michael Smithhisler
ae21ae54a7 docs: add auth-methods section in acl concepts (#24917)
---------

Co-authored-by: Aimee Ukasick <aimee.ukasick@hashicorp.com>
2025-02-18 12:29:44 -05:00
Aimee Ukasick
5bceb3956e DHV Front matter description updates for devdot search (#25022)
* front matter description updates for devdot search; CE-812

* 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-02-06 09:34:54 -06:00
Tim Gross
0489c35110 docs: dynamic host volume specification (#24810)
Dynamic host volumes use the same specification file as CSI volumes but require
a different set of parameters and have different semantics. This changeset
splits the volume specification page into separate CSI and dynamic host
volumes spec pages.

While migrating the CSI page, I've also edited it to bring it more in line with
the style guide: removed passive voice and future tense, inclusive language,
alphabetized the (chaotic!) parameters list, etc.

Ref: https://github.com/hashicorp/nomad/pull/24797
Ref: https://hashicorp.atlassian.net/browse/NET-11482

Co-authored-by: Daniel Bennett <dbennett@hashicorp.com>
Co-authored-by: Aimee Ukasick <aimee.ukasick@hashicorp.com>
2025-01-28 16:33:22 -05:00
Tim Gross
fe2a95f7f6 docs: dynamic host volumes API (#24789)
Add API documentation for the dynamic host volumes feature.

Ref: https://github.com/hashicorp/nomad/issues/15489
Ref: https://hashicorp.atlassian.net/browse/NET-11482
2025-01-28 16:32:57 -05:00
Michael Smithhisler
d621211108 auth: adds option to enable verbose logging during sso (#24892)
Co-authored-by: James Rasell <jrasell@users.noreply.github.com>
2025-01-23 11:40:01 -05:00
Tim Gross
33c68dcc58 docs: clarify workload-associated policy parameters (#24882)
Workload-associated ACL policies can only be set on a specific job within a
namespace, not the namespace as a whole. Clarify the documentation for the CLI
and API.

Fixes: https://github.com/hashicorp/terraform-provider-nomad/issues/500
Ref: https://github.com/hashicorp/terraform-provider-nomad/pull/504
2025-01-17 10:51:33 -05:00
Piotr Kazmierczak
0906f788f0 keyring: warn if removing a key that was used for encrypting variables (#24766)
Adds an additional check in the Keyring.Delete RPC to make sure we're not
trying to delete a key that's been used to encrypt a variable. It also adds a
-force flag for the CLI/API to sidestep that check.
2025-01-07 10:15:02 +01:00
Tim Gross
c3ac9c19a0 event stream: add events for CSI volumes and plugins (#24724)
Adds new topics to the event stream for CSI volumes and CSI plugins. We'll emit
event when either is created or deleted, and when CSI volumes are claimed.
2024-12-19 15:26:29 -05:00
Tim Gross
9cf0ad9447 event stream: add events for dynamic host volumes (#24721)
Add a new topic to the event stream for host volumes. We'll emit events when a
dynamic host volume is registered or deregistered, and whenever a node
fingerprints with a changed volume.

Ref: https://hashicorp.atlassian.net/browse/NET-11549
2024-12-19 14:55:38 -05:00
Daniel Bennett
a036b75aef api: new dispatch endpoint sends body as Payload (#24381)
this opens up dispatching parameterized jobs by systems
that do not allow modifying what http request body they send

e.g. these two things are equal:

POST '{"Payload": "'"$(base64 <<< "hello")"'"}' /v1/job/my-job/dispatch
POST 'hello' /v1/job/my-job/dispatch/payload
2024-11-07 10:12:29 -06:00
Etienne Bruines
09703b244a fix: documentation of idempotency_token in API (#24317)
The parsing of the idempotency_token requires snake case, as it is a URL query parameter and not part of the JSON request body. 

See also: 2df473c561/command/agent/http.go (L951)
2024-10-29 09:45:33 -05:00
Jamie Finnigan
dec1bf51c0 update ndjson links due to domain expiry/resale (#24306) 2024-10-28 09:06:50 +00:00
Michael Schurter
cbbe6bb389 docs: explain schedule state values (#24160)
* docs: explain schedule state values

GET /v1/client/allocation/:alloc_id/pause?task=:task_name is a tiny but
critical API for observability of tasks with a schedule. This PR
explains each of the values which might be returned.

* correct docstring

* add missing state and expand PUT docs

---------

Co-authored-by: Aimee Ukasick <aimee.ukasick@hashicorp.com>
2024-10-17 11:42:12 -07:00
Aimee Ukasick
c839f38cab Docs: Golden Versions updates (#24153)
* Add language from CLI help to job revert for version|tag

* Add CLI job tag subcommand page

* Add API create delete tag

Examples use same names between CLI and API

* Update CLI revert, tag; API jobs

* Add job version content

* add tag name unique per job to CLI/API; address Phil's feedback

Add partial explaining why tag, add to CLI/API

* Add diff_version to API jobs list job versions

* Apply suggestions from code review

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

* remove tutorial links since not published yet.

---------

Co-authored-by: Jeff Boruszak <104028618+boruszak@users.noreply.github.com>
2024-10-11 12:36:32 -05:00
James Rasell
1fabbaa179 driver: remove LXC and ECS driver documentation. (#24107)
Co-authored-by: Aimee Ukasick <aimee.ukasick@hashicorp.com>
2024-10-03 08:55:39 +01:00
Piotr Kazmierczak
0babf01ad0 docs: update quota API examples to demonstrate device quotas (#23941) 2024-09-11 18:23:16 +02:00
Tim Gross
8739d7738c E2E: remove invalid HCLv1 field on submissions test (#23936)
HCLv1 support was removed entirely in #23912, but I missed this one test and
documentation reference.
2024-09-09 09:57:25 -04:00
Tim Gross
a9beef7edd jobspec: remove HCL1 support (#23912)
This changeset removes support for parsing jobspecs via the long-deprecated
HCLv1.

Fixes: https://github.com/hashicorp/nomad/issues/20195
Ref: https://hashicorp.atlassian.net/browse/NET-10220
2024-09-05 09:02:45 -04:00
Juanadelacuesta
ed150010c7 docs: remove wrong FlagsVariable parameter 2024-09-04 15:09:38 +02:00
James Rasell
de0a86a55a docs: Fix ACL login API path documentation. (#23624) 2024-07-19 11:56:15 +01:00
Adrian Todorov
3f2729f7f5 remove mentions of old versions of Nomad in various docs (#23567) 2024-07-12 11:01:32 -04:00
Tim Gross
cd3101d624 scale: add -check-index to job scale command (#23457)
The RPC handler for scaling a job passes flags to enforce the job modify index
is unchanged when it makes the write to Raft. But its only checking against the
existing job modify index at the time the RPC handler snapshots the state store,
so it can only enforce consistency for its own validation.

In clusters with automated scaling, it would be useful to expose the enforce
index options to the API, so that cluster admins can enforce that scaling only
happens when the job state is consistent with a state they've previously seen in
other API calls. Add this option to the CLI and API and have the RPC handler
check them if asked.

Fixes: https://github.com/hashicorp/nomad/issues/23444
2024-06-27 16:54:06 -04:00
Michael Schurter
690abefc4a docs: add docs for time based task execution 2024-05-29 15:50:33 -07:00
Phil Renaud
e8b77fcfa0 [ui] Jobspec UI block: Descriptions and Links (#18292)
* Hacky but shows links and desc

* markdown

* Small pre-test cleanup

* Test for UI description and link rendering

* JSON jobspec docs and variable example job get UI block

* Jobspec documentation for UI block

* Description and links moved into the Title component and made into Helios components

* Marked version upgrade

* Allow links without a description and max description to 1000 chars

* Node 18 for setup-js

* markdown sanitization

* Ui to UI and docs change

* Canonicalize, copy and diff for job.ui

* UI block added to testJob for structs testing

* diff test

* Remove redundant reset

* For readability, changing the receiving pointer of copied job variables

* TestUI endpiont conversion tests

* -require +must

* Nil check on Links

* JobUIConfig.Links as pointer

---------

Co-authored-by: Tim Gross <tgross@hashicorp.com>
2024-05-22 15:00:45 -04:00
Tim Gross
baee2a0f38 docs: correct ACL requirements for CSI plugins (#20552)
CSI plugins are not namespaced, and there's no "list plugin" ACL. Instead,
listing and reading plugins require the `plugin:read` ACL.
2024-05-13 09:10:02 -04:00
Daniel Bennett
3ac3bc1cfe acl: token global mode can not be changed (#20464)
true up CLI and docs with API reality
2024-04-22 11:58:47 -05:00
Tim Gross
b662f1e6e5 docs: fix incorrect dispatch payload limit in API docs (#20433)
The dispatch payload limit is limited to 16KiB, not 64KiB. It's correct in the
command docs but incorrect in the API docs.

Ref: https://github.com/hashicorp/nomad/blob/v1.7.7/nomad/job_endpoint.go#L36-L38
Fixes: https://github.com/hashicorp/nomad/issues/20432
2024-04-18 10:20:15 -04:00
Luiz Aoqui
9d4f7bcb68 mock_driver: fix fingreprint key (#20351)
The `mock_driver` is an internal task driver used mostly for testing and
simulating workloads. During the allocrunner v2 work (#4792) its name
changed from `mock_driver` to just `mock` and then back to
`mock_driver`, but the fingreprint key was kept as `driver.mock`.

This results in tasks configured with `driver = "mock"` to be scheduled
(because Nomad thinks the client has a task driver called `mock`), but
fail to actually run (because the Nomad client can't find a driver
called `mock` in its catalog).

Fingerprinting the right name prevents the job from being scheduled in
the first place.

Also removes mentions of the mock driver from documentation since its an
internal driver and not available in any production release.
2024-04-16 07:16:55 +01:00
Tim Gross
5138c1c82f autopilot: add Enterprise health information to API endpoint (#20153)
Add information about autopilot health to the `/operator/autopilot/health` API
in Nomad Enterprise.

I've pulled the CE changes required for this feature out of @lindleywhite's PR
in the Enterprise repo. A separate PR will include a new `operator autopilot
health` command that can present this information at the command line.

Ref: https://github.com/hashicorp/nomad-enterprise/pull/1394
Co-authored-by: Lindley <lindley@hashicorp.com>
2024-03-18 11:38:17 -04:00
Phil Renaud
41c783aec2 Noting action name restrictions, and correcting those of auth methods and roles (#19905) 2024-02-08 12:01:22 -05:00
Luiz Aoqui
7391a59695 docs: add note about stub list filtering (#19902)
When filtering list results, the filter expression is applied to the
full object, not the stub. This is useful because it allows users to
filter the list on fields not present in the object stub. But it can
also be confusing because some fields have different names, or only
exist in the stub, so the filter expression needs to reference fields
not present in returned data.

Filtering on the stub would reduce the confusion, but it would also
restrict users to only be able to filter on the fields in the stub,
which, by definition, are just a subset of the original fields.

Documenting this behaviour can help users understand unexpected errors
and results.
2024-02-07 16:41:07 -05:00
Kiara Grouwstra
1e04fc4613 Libraries & SDKs: add nix-nomad (#19808) 2024-02-06 20:47:23 -05:00
Michael Schurter
a283a41613 docs: mention wildcards in namespace api docs (#19809)
Co-authored-by: Luiz Aoqui <luiz@hashicorp.com>
2024-01-24 11:52:28 -08:00
Piotr Kazmierczak
8f99ba6b2c docs: add missing JWT auth method API documentation (#19757) 2024-01-17 16:03:08 +01:00
Luiz Aoqui
e1e80f383e vault: add new nomad setup vault -check commmand (#19720)
The new `nomad setup vault -check` commmand can be used to retrieve
information about the changes required before a cluster is migrated from
the deprecated legacy authentication flow with Vault to use only
workload identities.
2024-01-12 15:48:30 -05:00
Egor Mikhailov
18f49e015f auth: add new optional OIDCDisableUserInfo setting for OIDC auth provider (#19566)
Add new optional `OIDCDisableUserInfo` setting for OIDC auth provider which
disables a request to the identity provider to get OIDC UserInfo.

This option is helpful when your identity provider doesn't send any additional
claims from the UserInfo endpoint, such as Microsoft AD FS OIDC Provider:

> The AD FS UserInfo endpoint always returns the subject claim as specified in the
> OpenID standards. AD FS doesn't support additional claims requested via the
> UserInfo endpoint

Fixes #19318
2024-01-09 13:41:46 -05:00
Tim Gross
c875f3e49a docs: expand docs on implicit ACL capabilities grants (#19681)
An audit of Nomad's ACLs resulted in some confusion around whether the
`NamespaceValidator` method is conjunctive ("add", as implied by the docs) or
disjunctive ("or", as it is by design). Clarify the ACL documentation as
follows:

* Call out where fine-grained capabilities imply grants to other
  capabilities (for example, that `csi-read-volume` grants `csi-list-volume`).
* Fix an incorrectly documented ACL requirement for the CSI List External
  Volumes API.
* Clarify how ACLs are expected to work for the two search API endpoints, such
  that you need list/read access to the objects in the search context.
2024-01-09 13:25:05 -05:00
Luiz Aoqui
95766aaa1b docs: add Submission parameter to job update (#19516) 2023-12-19 10:09:16 -05:00
Mitch Pronschinske
a0fc269e8f docs: update auth-methods API docs to comply with style guide (#19435)
Lower cased the title and headings in line with our company-wide style since this is being linked in an upcoming blog I was editing.  I also lowercased words such as "Auth Method" and other primitives/components when mentioned in prose - this is in line with our style guide as well where we don't capitalize auth method and we only capitalize components that are SKU/product-like in their separateness/importance.

https://docs.google.com/document/d/1MRvGd6tS5JkIwl_GssbyExkMJqOXKeUE00kSEtFi8m8/edit

Adam Trujilo should be in agreement with changes like this based on our past discussions, but feel free to bring in stake holders if you're not sure about accepting and we can discuss.
2023-12-14 11:28:42 -05:00