Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
小 白蛋
Nomad
Commits
c16352a6
Unverified
Commit
c16352a6
authored
2 years ago
by
James Rasell
Browse files
Options
Download
Email Patches
Plain Diff
docs: add eval delete website doucmentation.
parent
84eeae71
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
.changelog/13492.txt
+7
-0
.changelog/13492.txt
website/content/api-docs/evaluations.mdx
+51
-0
website/content/api-docs/evaluations.mdx
website/content/docs/commands/eval/delete.mdx
+75
-0
website/content/docs/commands/eval/delete.mdx
website/content/docs/commands/eval/index.mdx
+2
-1
website/content/docs/commands/eval/index.mdx
website/data/docs-nav-data.json
+4
-0
website/data/docs-nav-data.json
with
139 additions
and
1 deletion
+139
-1
.changelog/13492.txt
0 → 100644
+
7
-
0
View file @
c16352a6
```release-note:improvement
cli: Added `delete` command to the eval CLI
```
```release-note:improvement
agent: Added delete support to the eval HTTP API
```
This diff is collapsed.
Click to expand it.
website/content/api-docs/evaluations.mdx
+
51
-
0
View file @
c16352a6
...
...
@@ -204,6 +204,55 @@ $ curl \
}
```
## Delete Evaluations
This endpoint deletes evaluations. In order to utilise this endpoint the
eval broker should be paused via the
[update_scheduler_configuration][operator scheduler update configuration] API
endpoint.
This API endpoint should be used cautiously and only in outage situations where
there is a large backlog of evaluations not being processed. During most normal
and outage scenarios, Nomad's reconciliation and state management will handle
evaluations as needed.
| Method | Path | Produces |
| --------- | ----------------- | ------------------ |
| `DELETE` | `/v1/evaluations` | `application/json` |
The table below shows this endpoint's support for
[blocking queries](/api-docs#blocking-queries) and
[required ACLs](/api-docs#acls).
| Blocking Queries | ACL Required |
| ---------------- | ------------ |
| `NO` | `management` |
### Parameters
- `EvalIDs` `(array<string>: <required>)`- An array of evaluation UUIDs to
delete. This must be a full length UUID and not a prefix.
### Sample Payload
```javascript
{
"EvalIDs": [
"167ec27d-2e36-979a-280a-a6b920d382db",
"6c193955-ac66-42e2-f4c7-f1fc707f1f5e"
]
}
```
### Sample Request
```shell-session
$ curl \
--request DELETE \
--data @payload.json \
https://localhost:4646/v1/evaluations
```
## List Allocations for Evaluation
This endpoint lists the allocations created or modified for the given
...
...
@@ -332,3 +381,5 @@ $ curl \
}
]
```
[update_scheduler_configuration]: api-docs/operator/scheduler#update-scheduler-configuration
This diff is collapsed.
Click to expand it.
website/content/docs/commands/eval/delete.mdx
0 → 100644
+
75
-
0
View file @
c16352a6
---
layout: docs
page_title: 'Commands: eval delete'
description: |
The eval delete command is used to delete evaluations.
---
# Command: eval delete
The `eval delete` command is used to delete evaluations. It should be used
cautiously and only in outage situations where there is a large backlog of
evaluations not being processed. During most normal and outage scenarios,
Nomad's reconciliation and state management will handle evaluations as needed.
The eval broker is expected to be paused prior to running this command and
un-paused after. These actions can be performed by the
[`operator scheduler get-config`][scheduler_get_config]
and [`operator scheduler set-config`][scheduler_set_config] commands respectively.
## Usage
```plaintext
nomad eval delete [options] [args]
```
It takes an optional argument which is the ID of the evaluation to delete. If
the evaluation ID is omitted, this command will use the filter flag to identify
and delete a set of evaluations.
When ACLs are enabled, this command requires a `management` token.
## General Options
@include 'general_options.mdx'
## Delete Options
- `-filter`: Specifies an expression used to filter evaluations by for
deletion.
- `-yes`: Bypass the confirmation prompt if an evaluation ID was not provided.
## Examples
Delete an evaluation using its ID:
```shell-session
$ nomad eval delete 9ecffbba-73be-d909-5d7e-ac2694c10e0c
Successfuly deleted 1 evaluation
```
Delete all evaluations with status `pending` for the `example` job:
```shell-session
$ nomad eval delete -filter='Stauts == "pending" and JobID == "example"'
Do you want to list evals (3) before deletion? [y/N] y
ID Priority Triggered By Job ID Status Placement Failures
cef92121 50 job-register example pending false
1c905ca0 50 job-register example pending false
b9e77692 50 job-register example pending false
Are you sure you want to delete 3 evals? [y/N] y
Successfuly deleted 3 evaluations
```
Delete all evaluations for the `system` and `service` whilst skipping all
prompts:
```shell-session
$ nomad eval delete -filter='Scheduler == "system" or Scheduler == "service"' -yes
Successfuly deleted 23 evaluations
```
[scheduler_get_config]: /docs/commands/operator/scheduler-get-config
[scheduler_set_config]: /docs/commands/operator/scheduler-set-config
This diff is collapsed.
Click to expand it.
website/content/docs/commands/eval/index.mdx
+
2
-
1
View file @
c16352a6
...
...
@@ -15,9 +15,10 @@ Usage: `nomad eval <subcommand> [options]`
Run `nomad eval <subcommand> -h` for help on that subcommand. The following
subcommands are available:
- [`eval delete`][delete] - Delete evals
- [`eval list`][list] - List all evals
- [`eval status`][status] - Display the status of a eval
[delete]: /docs/commands/eval/delete 'Delete evals'
[list]: /docs/commands/eval/list 'List all evals'
[status]: /docs/commands/eval/status 'Display the status of a eval'
This diff is collapsed.
Click to expand it.
website/data/docs-nav-data.json
+
4
-
0
View file @
c16352a6
...
...
@@ -372,6 +372,10 @@
"title"
:
"Overview"
,
"path"
:
"commands/eval"
},
{
"title"
:
"delete"
,
"path"
:
"commands/eval/delete"
},
{
"title"
:
"list"
,
"path"
:
"commands/eval/list"
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Projects
Groups
Snippets
Help