plan api docs
This commit is contained in:
parent
39c4ff78cd
commit
d935e78ca9
|
@ -9,7 +9,7 @@ description: |-
|
|||
|
||||
# /v1/client/allocation/allocation-id/stats
|
||||
|
||||
The `/allocation/<allocation-id>/stats` endpoint is used to query the actual resources consumed by an allocation.
|
||||
The `/allocation/<ID>/stats` endpoint is used to query the actual resources consumed by an allocation.
|
||||
The API endpoint is hosted by the Nomad client and requests have to be made to
|
||||
the nomad client whose resource usage metrics are of interest.
|
||||
|
||||
|
@ -26,7 +26,7 @@ the nomad client whose resource usage metrics are of interest.
|
|||
<dd>GET</dd>
|
||||
|
||||
<dt>URL</dt>
|
||||
<dd>`/v1/client/allocation/<allocation-id>/stats`</dd>
|
||||
<dd>`/v1/client/allocation/<ID>/stats`</dd>
|
||||
|
||||
<dt>Returns</dt>
|
||||
<dd>
|
||||
|
|
|
@ -25,7 +25,7 @@ be made to the Nomad client where the particular allocation was placed.
|
|||
<dd>GET</dd>
|
||||
|
||||
<dt>URL</dt>
|
||||
<dd>`/v1/client/fs/cat/<ALLOCATION-ID>`</dd>
|
||||
<dd>`/v1/client/fs/cat/<Allocation-ID>`</dd>
|
||||
|
||||
<dt>Parameters</dt>
|
||||
<dd>
|
||||
|
|
|
@ -25,7 +25,7 @@ client where the particular allocation was placed.
|
|||
<dd>GET</dd>
|
||||
|
||||
<dt>URL</dt>
|
||||
<dd>`/v1/client/fs/ls/<ALLOCATION-ID>`</dd>
|
||||
<dd>`/v1/client/fs/ls/<Allocation-ID>`</dd>
|
||||
|
||||
<dt>Parameters</dt>
|
||||
<dd>
|
||||
|
|
|
@ -25,7 +25,7 @@ Nomad client where the particular allocation was placed.
|
|||
<dd>GET</dd>
|
||||
|
||||
<dt>URL</dt>
|
||||
<dd>`/v1/client/fs/stat/<ALLOCATION-ID>`</dd>
|
||||
<dd>`/v1/client/fs/stat/<Allocation-ID>`</dd>
|
||||
|
||||
<dt>Parameters</dt>
|
||||
<dd>
|
||||
|
|
|
@ -24,7 +24,7 @@ be specified using the `?region=` query parameter.
|
|||
<dd>GET</dd>
|
||||
|
||||
<dt>URL</dt>
|
||||
<dd>`/v1/evaluation/<id>`</dd>
|
||||
<dd>`/v1/evaluation/<ID>`</dd>
|
||||
|
||||
<dt>Parameters</dt>
|
||||
<dd>
|
||||
|
@ -72,7 +72,7 @@ be specified using the `?region=` query parameter.
|
|||
<dd>GET</dd>
|
||||
|
||||
<dt>URL</dt>
|
||||
<dd>`/v1/evaluation/<id>/allocations`</dd>
|
||||
<dd>`/v1/evaluation/<ID>/allocations`</dd>
|
||||
|
||||
<dt>Parameters</dt>
|
||||
<dd>
|
||||
|
|
|
@ -23,7 +23,7 @@ region is used; another region can be specified using the `?region=` query param
|
|||
<dd>GET</dd>
|
||||
|
||||
<dt>URL</dt>
|
||||
<dd>`/v1/job/<id>`</dd>
|
||||
<dd>`/v1/job/<ID>`</dd>
|
||||
|
||||
<dt>Parameters</dt>
|
||||
<dd>
|
||||
|
@ -151,7 +151,7 @@ region is used; another region can be specified using the `?region=` query param
|
|||
<dd>GET</dd>
|
||||
|
||||
<dt>URL</dt>
|
||||
<dd>`/v1/job/<id>/allocations`</dd>
|
||||
<dd>`/v1/job/<ID>/allocations`</dd>
|
||||
|
||||
<dt>Parameters</dt>
|
||||
<dd>
|
||||
|
@ -199,7 +199,7 @@ region is used; another region can be specified using the `?region=` query param
|
|||
<dd>GET</dd>
|
||||
|
||||
<dt>URL</dt>
|
||||
<dd>`/v1/job/<id>/evaluations`</dd>
|
||||
<dd>`/v1/job/<ID>/evaluations`</dd>
|
||||
|
||||
<dt>Parameters</dt>
|
||||
<dd>
|
||||
|
@ -313,6 +313,212 @@ region is used; another region can be specified using the `?region=` query param
|
|||
</dd>
|
||||
</dl>
|
||||
|
||||
<dl>
|
||||
<dt>Description</dt>
|
||||
<dd>
|
||||
Invoke a dry-run of the scheduler for the job.
|
||||
</dd>
|
||||
|
||||
<dt>Method</dt>
|
||||
<dd>PUT or POST</dd>
|
||||
|
||||
<dt>URL</dt>
|
||||
<dd>`/v1/job/<ID>/plan`</dd>
|
||||
|
||||
<dt>Parameters</dt>
|
||||
<dd>
|
||||
<ul>
|
||||
<li>
|
||||
<span class="param">Job</span>
|
||||
<span class="param-flags">required</span>
|
||||
The JSON definition of the job. The general structure is given
|
||||
by the [job specification](/docs/jobspec/index.html), and matches
|
||||
the return response of GET.
|
||||
</li>
|
||||
<li>
|
||||
<span class="param">Diff</span>
|
||||
<span class="param-flags">optional</span>
|
||||
Whether the diff structure between the submitted and server side version
|
||||
of the job should be included in the response.
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
|
||||
<dt>Returns</dt>
|
||||
<dd>
|
||||
|
||||
```javascript
|
||||
{
|
||||
"Index": 0,
|
||||
"NextPeriodicLaunch": "0001-01-01T00:00:00Z",
|
||||
"Diff": {
|
||||
"Type": "Added",
|
||||
"TaskGroups": [
|
||||
{
|
||||
"Updates": {
|
||||
"create": 1
|
||||
},
|
||||
"Type": "Added",
|
||||
"Tasks": [
|
||||
{
|
||||
"Type": "Added",
|
||||
"Objects": [...],
|
||||
"Name": "redis",
|
||||
"Fields": [
|
||||
{
|
||||
"Type": "Added",
|
||||
"Old": "",
|
||||
"New": "docker",
|
||||
"Name": "Driver",
|
||||
"Annotations": null
|
||||
},
|
||||
{
|
||||
"Type": "Added",
|
||||
"Old": "",
|
||||
"New": "5000000000",
|
||||
"Name": "KillTimeout",
|
||||
"Annotations": null
|
||||
}
|
||||
],
|
||||
"Annotations": [
|
||||
"forces create"
|
||||
]
|
||||
}
|
||||
],
|
||||
"Objects": [...],
|
||||
"Name": "cache",
|
||||
"Fields": [...]
|
||||
}
|
||||
],
|
||||
"Objects": [
|
||||
{
|
||||
"Type": "Added",
|
||||
"Objects": null,
|
||||
"Name": "Datacenters",
|
||||
"Fields": [...]
|
||||
},
|
||||
{
|
||||
"Type": "Added",
|
||||
"Objects": null,
|
||||
"Name": "Constraint",
|
||||
"Fields": [...]
|
||||
},
|
||||
{
|
||||
"Type": "Added",
|
||||
"Objects": null,
|
||||
"Name": "Update",
|
||||
"Fields": [...]
|
||||
}
|
||||
],
|
||||
"ID": "example",
|
||||
"Fields": [...],
|
||||
...
|
||||
]
|
||||
},
|
||||
"CreatedEvals": [
|
||||
{
|
||||
"ModifyIndex": 0,
|
||||
"CreateIndex": 0,
|
||||
"SnapshotIndex": 0,
|
||||
"AnnotatePlan": false,
|
||||
"EscapedComputedClass": false,
|
||||
"NodeModifyIndex": 0,
|
||||
"NodeID": "",
|
||||
"JobModifyIndex": 0,
|
||||
"JobID": "example",
|
||||
"TriggeredBy": "job-register",
|
||||
"Type": "batch",
|
||||
"Priority": 50,
|
||||
"ID": "312e6a6d-8d01-0daf-9105-14919a66dba3",
|
||||
"Status": "blocked",
|
||||
"StatusDescription": "created to place remaining allocations",
|
||||
"Wait": 0,
|
||||
"NextEval": "",
|
||||
"PreviousEval": "80318ae4-7eda-e570-e59d-bc11df134817",
|
||||
"BlockedEval": "",
|
||||
"FailedTGAllocs": null,
|
||||
"ClassEligibility": {
|
||||
"v1:7968290453076422024": true
|
||||
}
|
||||
}
|
||||
],
|
||||
"JobModifyIndex": 0,
|
||||
"FailedTGAllocs": {
|
||||
"cache": {
|
||||
"CoalescedFailures": 3,
|
||||
"AllocationTime": 46415,
|
||||
"Scores": null,
|
||||
"NodesEvaluated": 1,
|
||||
"NodesFiltered": 0,
|
||||
"NodesAvailable": {
|
||||
"dc1": 1
|
||||
},
|
||||
"ClassFiltered": null,
|
||||
"ConstraintFiltered": null,
|
||||
"NodesExhausted": 1,
|
||||
"ClassExhausted": null,
|
||||
"DimensionExhausted": {
|
||||
"cpu exhausted": 1
|
||||
}
|
||||
}
|
||||
},
|
||||
"Annotations": {
|
||||
"DesiredTGUpdates": {
|
||||
"cache": {
|
||||
"DestructiveUpdate": 0,
|
||||
"InPlaceUpdate": 0,
|
||||
"Stop": 0,
|
||||
"Migrate": 0,
|
||||
"Place": 11,
|
||||
"Ignore": 0
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
</dd>
|
||||
|
||||
<dt>Field Reference</dt>
|
||||
<dd>
|
||||
<ul>
|
||||
<li>
|
||||
<span class="param">Diff</span>
|
||||
A diff structure between the submitted job and the server side version.
|
||||
The top-level object is a Job Diff which contains, Task Group Diffs
|
||||
which in turn contain Task Diffs. Each of these objects then has Object
|
||||
and Field Diff structures in-bedded.
|
||||
</li>
|
||||
<li>
|
||||
<span class="param">NextPeriodicLaunch</span>
|
||||
If the job being planned is periodic, this field will include the next
|
||||
launch time for the job.
|
||||
</li>
|
||||
<li>
|
||||
<span class="param">CreatedEvals</span>
|
||||
A set of evaluations that were created as a result of the dry-run. These
|
||||
evaluations can signify a follow-up rolling update evaluation or a
|
||||
blocked evaluation.
|
||||
</li>
|
||||
<li>
|
||||
<span class="param">JobModifyIndex</span>
|
||||
The JobModifyIndex of the server side version of this job.
|
||||
</li>
|
||||
<li>
|
||||
<span class="param">FailedTGAllocs</span>
|
||||
A set of metrics to understand any allocation failures that occured for
|
||||
the Task Group.
|
||||
</li>
|
||||
<li>
|
||||
<span class="param">Annotations</span>
|
||||
Annotations include the DesiredTGUpdates, which tracks what the
|
||||
scheduler would do given enough resources for each Task Group.
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
|
||||
<dl>
|
||||
<dt>Description</dt>
|
||||
<dd>
|
||||
|
|
|
@ -98,7 +98,7 @@ be specified using the `?region=` query parameter.
|
|||
<dd>GET</dd>
|
||||
|
||||
<dt>URL</dt>
|
||||
<dd>`/v1/node/<id>/allocations`</dd>
|
||||
<dd>`/v1/node/<ID>/allocations`</dd>
|
||||
|
||||
<dt>Parameters</dt>
|
||||
<dd>
|
||||
|
|
Loading…
Reference in New Issue