Nomad: [question] Detailed Documentation about Task Status and Desired Status

Created on 29 Nov 2016  路  3Comments  路  Source: hashicorp/nomad

Is there somewhere a detailed documentation of the "status" and "desired" status a task can have? And especially how do they affect the task-group and job status?

const (
    AllocDesiredStatusRun   = "run"   // Allocation should run
    AllocDesiredStatusStop  = "stop"  // Allocation should stop
    AllocDesiredStatusEvict = "evict" // Allocation should stop, and was evicted
)

const (
    AllocClientStatusPending  = "pending"
    AllocClientStatusRunning  = "running"
    AllocClientStatusComplete = "complete"
    AllocClientStatusFailed   = "failed"
    AllocClientStatusLost     = "lost"
)

When I search the codebase I find all possible States but in particular I don't understand the difference between running and complete or when is a task lost and not failed? Is there a correlation between lost and evict?

Thanks in advance.

stagwaiting-reply themdocs

Most helpful comment

Hey I agree we should document this better.

In the mean time to answer your question:

  • Desired status is what the schedulers want the allocation to do
  • Client status is the emergent state of the allocation
  • Running means the tasks are currently running
  • Complete means the tasks finished successfully
  • Failed means the tasks finished but not successfully (non-zero exit code)
  • Lost means the node that was running the tasks has failed or has been partitioned. As such the servers do not know its state.

All 3 comments

Hey I agree we should document this better.

In the mean time to answer your question:

  • Desired status is what the schedulers want the allocation to do
  • Client status is the emergent state of the allocation
  • Running means the tasks are currently running
  • Complete means the tasks finished successfully
  • Failed means the tasks finished but not successfully (non-zero exit code)
  • Lost means the node that was running the tasks has failed or has been partitioned. As such the servers do not know its state.

Hey there

Since this issue hasn't had any activity in a while - we're going to automatically close it in 30 days. If you're still seeing this issue with the latest version of Nomad, please respond here and we'll keep this open and take another look at this.

Thanks!

This issue will be auto-closed because there hasn't been any activity for a few months. Feel free to open a new one if you still experience this problem :+1:

Was this page helpful?
0 / 5 - 0 ratings