From b5e18b6cc2a390927f3a1db1b47eeb8bf43b0098 Mon Sep 17 00:00:00 2001 From: Preetha Appan Date: Wed, 9 May 2018 17:19:23 -0500 Subject: [PATCH] Docs for job eval CLI --- website/source/docs/commands/job.html.md.erb | 2 + .../source/docs/commands/job/eval.html.md.erb | 48 +++++++++++++++++++ website/source/layouts/docs.erb | 3 ++ 3 files changed, 53 insertions(+) create mode 100644 website/source/docs/commands/job/eval.html.md.erb diff --git a/website/source/docs/commands/job.html.md.erb b/website/source/docs/commands/job.html.md.erb index 1677fd51486..acaccf7a12a 100644 --- a/website/source/docs/commands/job.html.md.erb +++ b/website/source/docs/commands/job.html.md.erb @@ -19,6 +19,7 @@ subcommands are available: * [`job deployments`][deployments] - List deployments for a job * [`job dispatch`][dispatch] - Dispatch an instance of a parameterized job +* [`job eval`][eval] - Force an evaluation for a job * [`job history`][history] - Display all tracked versions of a job * [`job promote`][promote] - Promote a job's canaries * [`job revert`][revert] - Revert to a prior version of the job @@ -26,6 +27,7 @@ subcommands are available: [deployments]: /docs/commands/job/deployments.html "List deployments for a job" [dispatch]: /docs/commands/job/dispatch.html "Dispatch an instance of a parameterized job" +[eval]: /docs/commands/job/eval.html "Force an evaluation for a job" [history]: /docs/commands/job/history.html "Display all tracked versions of a job" [promote]: /docs/commands/job/promote.html "Promote a job's canaries" [revert]: /docs/commands/job/revert.html "Revert to a prior version of the job" diff --git a/website/source/docs/commands/job/eval.html.md.erb b/website/source/docs/commands/job/eval.html.md.erb new file mode 100644 index 00000000000..4300d527c90 --- /dev/null +++ b/website/source/docs/commands/job/eval.html.md.erb @@ -0,0 +1,48 @@ +--- +layout: "docs" +page_title: "Commands: job eval" +sidebar_current: "docs-commands-job-eval" +description: > + The job eval command is used to force an evaluation of a job +--- + +# Command: job eval + +The `job eval` command is used to force an evaluation of a job, given the job ID. + +## Usage + +``` +nomad job eval [options] +``` + +The `job eval` command requires a single argument, specifying the job ID to evaluate. +If there is an exact match based on the provided job ID, then +the job will be evaluated, forcing a scheduler run. + +## General Options + +<%= partial "docs/commands/_general_options" %> + +## Eval Options + +* `-force-reschedule`: `force-reschedule` is used to force placement of any failed allocations. +If this is set, failed allocations that are past their reschedule limit, as well as any that are +scheduled to be replaced at a future time are placed immediately. This option only places failed +allocations if the task group has rescheduling enabled. + +## Examples + +Evaluate the job with ID "job1": + +``` +$ nomad job eval job1 +Created eval ID: "6754c2e3-9abb-e7e9-dc92-76aab01751c8" +``` + +Evaluate the job with ID "job1", and reschedule any eligible failed allocations: + +``` +$ nomad job eval -force-reschedule job1 +Created eval ID: "6754c2e3-9abb-e7e9-dc92-76aab01751c8" +``` \ No newline at end of file diff --git a/website/source/layouts/docs.erb b/website/source/layouts/docs.erb index 4f48b934069..b0e3b7250fc 100644 --- a/website/source/layouts/docs.erb +++ b/website/source/layouts/docs.erb @@ -231,6 +231,9 @@ > dispatch + > + eval + > history