From 91a9118dfaf5314ee6eed8cef5d629af4f84fee8 Mon Sep 17 00:00:00 2001 From: Preetha Appan Date: Wed, 31 Jan 2018 15:54:10 -0600 Subject: [PATCH] Documentation for reschedule attempts in CLI/API --- website/source/api/allocations.html.md | 22 ++++++ website/source/api/jobs.html.md | 11 +++ .../docs/commands/alloc-status.html.md.erb | 73 ++++++++++--------- 3 files changed, 72 insertions(+), 34 deletions(-) diff --git a/website/source/api/allocations.html.md b/website/source/api/allocations.html.md index 335b9f0eb..e6c2ffee4 100644 --- a/website/source/api/allocations.html.md +++ b/website/source/api/allocations.html.md @@ -52,6 +52,17 @@ $ curl \ "EvalID": "5456bd7a-9fc0-c0dd-6131-cbee77f57577", "Name": "example.cache[0]", "NodeID": "fb2170a8-257d-3c64-b14d-bc06cc94e34c", + "PreviousAllocation": "516d2753-0513-cfc7-57ac-2d6fac18b9dc", + "NextAllocation": "cd13d9b9-4f97-7184-c88b-7b451981616b", + "RescheduleTracker": { + "Events": [ + { + "PrevAllocID": "516d2753-0513-cfc7-57ac-2d6fac18b9dc", + "PrevNodeID": "9230cd3b-3bda-9a3f-82f9-b2ea8dedb20e", + "RescheduleTime": 1517434161192946200 + }, + ] + }, "JobID": "example", "TaskGroup": "cache", "DesiredStatus": "run", @@ -184,6 +195,17 @@ $ curl \ "EvalID": "5456bd7a-9fc0-c0dd-6131-cbee77f57577", "Name": "example.cache[0]", "NodeID": "fb2170a8-257d-3c64-b14d-bc06cc94e34c", + "PreviousAllocation": "516d2753-0513-cfc7-57ac-2d6fac18b9dc", + "NextAllocation": "cd13d9b9-4f97-7184-c88b-7b451981616b", + "RescheduleTracker": { + "Events": [ + { + "PrevAllocID": "516d2753-0513-cfc7-57ac-2d6fac18b9dc", + "PrevNodeID": "9230cd3b-3bda-9a3f-82f9-b2ea8dedb20e", + "RescheduleTime": 1517434161192946200 + }, + ] + }, "JobID": "example", "Job": { "Region": "global", diff --git a/website/source/api/jobs.html.md b/website/source/api/jobs.html.md index 1143e6b32..c0bfad612 100644 --- a/website/source/api/jobs.html.md +++ b/website/source/api/jobs.html.md @@ -651,6 +651,17 @@ $ curl \ "EvalID": "a9c5effc-2242-51b2-f1fe-054ee11ab189", "Name": "example.cache[0]", "NodeID": "cb1f6030-a220-4f92-57dc-7baaabdc3823", + "PreviousAllocation": "516d2753-0513-cfc7-57ac-2d6fac18b9dc", + "NextAllocation": "cd13d9b9-4f97-7184-c88b-7b451981616b", + "RescheduleTracker": { + "Events": [ + { + "PrevAllocID": "516d2753-0513-cfc7-57ac-2d6fac18b9dc", + "PrevNodeID": "9230cd3b-3bda-9a3f-82f9-b2ea8dedb20e", + "RescheduleTime": 1517434161192946200 + }, + ] + }, "JobID": "example", "TaskGroup": "cache", "DesiredStatus": "run", diff --git a/website/source/docs/commands/alloc-status.html.md.erb b/website/source/docs/commands/alloc-status.html.md.erb index 36bf422cb..d0195d46f 100644 --- a/website/source/docs/commands/alloc-status.html.md.erb +++ b/website/source/docs/commands/alloc-status.html.md.erb @@ -12,7 +12,8 @@ The `alloc-status` command displays status information and metadata about an existing allocation and its tasks. It can be useful while debugging to reveal the underlying reasons for scheduling decisions or failures, as well as the current state of its tasks. As of Nomad 0.7.1, alloc status also shows allocation -modification time in addition to create time. +modification time in addition to create time. As of Nomad 0.8, alloc status shows +information about reschedule attempts. ## Usage @@ -65,20 +66,22 @@ Full status of an alloc, which shows one of the tasks dying and then being resta ``` $ nomad alloc-status 0af996ed -ID = 0af996ed -Eval ID = be9bde98 -Name = example.cache[0] -Node ID = 43c0b14e -Job ID = example -Job Version = 0 -Client Status = running -Client Description = -Desired Status = run -Desired Description = -Created = 5m ago -Modified = 5m ago -Deployment ID = 0c83a3b1 -Deployment Health = healthy +ID = 0af996ed +Eval ID = be9bde98 +Name = example.cache[0] +Node ID = 43c0b14e +Job ID = example +Job Version = 0 +Client Status = running +Client Description = +Desired Status = run +Desired Description = +Created = 5m ago +Modified = 5m ago +Deployment ID = 0c83a3b1 +Deployment Health = healthy +Replacement Alloc ID = 0bc894ca +Reschedule Attempts = 1/3 Task "redis" is "running" Task Resources @@ -119,25 +122,27 @@ Verbose status can also be accessed: ``` $ nomad alloc-status -verbose 0af996ed -ID = 0af996ed-aff4-8ddb-a566-e55ebf8969c9 -Eval ID = be9bde98-0490-1beb-ced0-012d10ddf22e -Name = example.cache[0] -Node ID = 43c0b14e-7f96-e432-a7da-06605257ce0c -Job ID = example -Job Version = 0 -Client Status = running -Client Description = -Desired Status = run -Desired Description = -Created = 07/25/17 16:12:48 UTC -Modified = 07/25/17 16:12:48 UTC -Deployment ID = 0c83a3b1-8a7b-136b-0e11-8383dc6c9276 -Deployment Health = healthy -Evaluated Nodes = 1 -Filtered Nodes = 0 -Exhausted Nodes = 0 -Allocation Time = 38.474µs -Failures = 0 +ID = 0af996ed-aff4-8ddb-a566-e55ebf8969c9 +Eval ID = be9bde98-0490-1beb-ced0-012d10ddf22e +Name = example.cache[0] +Node ID = 43c0b14e-7f96-e432-a7da-06605257ce0c +Job ID = example +Job Version = 0 +Client Status = running +Client Description = +Desired Status = run +Desired Description = +Created = 07/25/17 16:12:48 UTC +Modified = 07/25/17 16:12:48 UTC +Deployment ID = 0c83a3b1-8a7b-136b-0e11-8383dc6c9276 +Deployment Health = healthy +Replacement Alloc ID = 0bc894ca +Reschedule Attempts = 1/3 +Evaluated Nodes = 1 +Filtered Nodes = 0 +Exhausted Nodes = 0 +Allocation Time = 38.474µs +Failures = 0 Task "redis" is "running" Task Resources