diff --git a/engine/swarm/how-swarm-mode-works/swarm-task-states.md b/engine/swarm/how-swarm-mode-works/swarm-task-states.md index ea7bd055b3..de95bc8a26 100644 --- a/engine/swarm/how-swarm-mode-works/swarm-task-states.md +++ b/engine/swarm/how-swarm-mode-works/swarm-task-states.md @@ -6,8 +6,9 @@ redirect_from: - /datacenter/ucp/2.2/guides/admin/monitor-and-troubleshoot/troubleshoot-task-state/ --- -Docker lets you create services, which can start tasks. A service is a description of a desired state, and a task does the work. -Work is scheduled on swarm nodes in this sequence: +Docker lets you create services, which can start tasks. A service is a +description of a desired state, and a task does the work. Work is scheduled on +swarm nodes in this sequence: 1. Create a service by using `docker service create` or the UCP web UI or CLI. 2. The request goes to a Docker manager node. @@ -15,9 +16,13 @@ Work is scheduled on swarm nodes in this sequence: 4. Each service can start multiple tasks. 5. Each task has a life cycle, with states like `NEW`, `PENDING`, and `COMPLETE`. -Tasks are execution units that run once to completion. When a task stops, it isn't executed again, but a new task may take its place. +Tasks are execution units that run once to completion. When a task stops, it +isn't executed again, but a new task may take its place. -Tasks advance through a number of states until they complete or fail. Tasks are initialized in the `NEW` state. The task progresses forward through a number of states, and its state doesn't go backward. For example, a task never goes from `COMPLETE` to `RUNNING`. +Tasks advance through a number of states until they complete or fail. Tasks are +initialized in the `NEW` state. The task progresses forward through a number of +states, and its state doesn't go backward. For example, a task never goes from +`COMPLETE` to `RUNNING`. Tasks go through the states in the following order: