1

I have been trying to find out the complete list of values for 'state' in the responses from https://puppet.com/docs/pe/2017.3/orchestrator/orchestrator_api_jobs_endpoint.html#puppet-orchestrator-api-jobs-endpoint

There are a number of states. The ones I have identified until now are errored finished new ready running Are there anymore and what do the mean. Does ready signify completed, or ready to start and waiting for a chance?

smcp
  • 129
  • 2
  • 8
  • Ready probably means the latter. The docs mostly seem to have this: https://puppet.com/docs/pe/2017.3/orchestrator/reviewing_jobs_in_the_console.html, but this differs from the API responses you listed. I would check the source code on this, but it seems like I do not have access to that repo. – Matthew Schuchard Dec 22 '17 at 13:38
  • Which repo? I guess if you can't get into it neither can I. – smcp Dec 22 '17 at 15:05

2 Answers2

1

The possible job states are: new, ready, running, stopping, stopped, finished, failed.

The transitions from new -> ready -> running usually happen very quickly. A job ultimately will have a status of one of these three: stopped, finished, failed.

State       | Description                          
------------|------------------------------------------------------------
new         | Job is recording the initial details
ready       | Job is recorded but no nodes are running or queued
running     | Job has nodes that are running or queued
stopping    | Stop command issued but some nodes in job are still running
stopped     | Job had stop command issued and is "completed"
finished    | Job completed successfully on all nodes
failed      | Job completed but some nodes had errors/failures

The console maps these strings in the Status column with these job state values from the Orchestrator API:

Console Status         | api state
-----------------------|-----------
Queued                 | new, ready
In progress            | running
Stopping               | stopping
Succeeded              | finished 
Finished with failures | failed 
Stopped                | stopped
steveax
  • 17,527
  • 6
  • 44
  • 59
0

From Matt's answer I see there are two states I haven't explicitly seen in the API documentation stopping stopped With a bit of imagination I can come up with this mapping Page API In progress - new, ready, running Succeeded - finished Finished with failures - errored Stopping - ? stopping Stopped - ? stopped Always nice when things are consistent :-/

Would be nice if someone could confirm this

smcp
  • 129
  • 2
  • 8