Skip to content

Commit

Permalink
backport of commit f1a1ff6
Browse files Browse the repository at this point in the history
  • Loading branch information
aimeeu authored Feb 14, 2025
1 parent a373839 commit a2cb824
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 18 deletions.
2 changes: 2 additions & 0 deletions website/content/docs/commands/job/status.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ When ACLs are enabled, this command requires a token with the `read-job`
capability for the job's namespace. The `list-jobs` capability is required to
run the command with a job prefix instead of the exact job ID.

@include 'job-status-map.mdx'

## General Options

@include 'general_options.mdx'
Expand Down
40 changes: 22 additions & 18 deletions website/content/docs/concepts/job.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -26,39 +26,42 @@ job state matches your desired state.
## Job statuses

After you submit your job, Nomad assigns a status to indicate how a job is
performing. This status indicates how the job's current allocations compare to the desired
job state.
performing. This status indicates how the job's current allocations compare to
the desired job state.

Nomad uses one of three values to describe a job's status.
@include 'job-status-map.mdx'

- `complete`
- `dead`
- `running`
### CLI statuses

The CLI and API return these rigid statuses, which are useful for scheduling and
garbage collection. However, the Nomad UI displays additional human-readable
statuses to help you manage jobs.
Only the CLI returns these job statuses.

The following table maps the CLI and API statuses to the statuses that appear in the Nomad UI.
#### `running`

| CLI and API status | UI status |
| --------------- | --------------- |
| `complete ` | `Complete` |
| `dead` | `Failed`, `Scaled Down`, `Stopped` |
| `running` | `Degraded`, `Deploying`, `Healthy`, `Recovering`, `Running`, `Scaled Down` |
The `running` status indicates that the job has non-terminal allocations.

#### `dead`

The `dead` status indicates that all evaluations and allocations are in a
terminal state.

#### `dead (stopped)`

The `dead (stopped)` status indicates that a user has manually stopped the job.
You may start this job again.

### UI statuses

These job statuses only appear in the Nomad UI.

#### Complete

The `Complete` status indicated that all expected allocations are complete. This
The `Complete` status indicates that all expected allocations are complete. This
status applies to batch and sysbatch jobs only.

#### Degraded

The `Degraded` status indicates that a [deployment] is not taking place. Some allocations are failed, lost, or unplaced.
The `Degraded` status indicates that a [deployment] is not taking place. Some
allocations are failed, lost, or unplaced.

#### Deploying

Expand All @@ -70,7 +73,8 @@ The `Failed` status indicates that all allocations are failed, lost, or unplaced

#### Healthy

The `Healthy` status indicates that all expected allocations are running and healthy.
The `Healthy` status indicates that all expected allocations are running and
healthy.

#### Recovering

Expand Down
17 changes: 17 additions & 0 deletions website/content/partials/job-status-map.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
Nomad uses one of these values to describe a job's status:

- `dead`
- `running`

The CLI returns these rigid statuses, which are useful for scheduling and
garbage collection. However, the Nomad UI displays additional human-readable
statuses to help you manage jobs.

The following table maps the CLI statuses to the statuses that appear in the
Nomad UI.

| CLI status | UI status |
| ---------------- | --------- |
| `dead` | `Complete`, `Failed`, `Scaled Down` |
| `dead (stopped)` | `Stopped` |
| `running` | `Degraded`, `Deploying`, `Healthy`, `Recovering`, `Running`, `Scaled Down` |

0 comments on commit a2cb824

Please sign in to comment.