diff options
author | Charles Smith <charles.smith@docker.com> | 2016-07-25 09:04:15 -0700 |
---|---|---|
committer | Tibor Vass <tibor@docker.com> | 2016-07-27 14:55:30 -0700 |
commit | 7f6a1d9fb78ca8c2fc312c1f24178acee57b1812 (patch) | |
tree | ae19b2249dbc0093a4e32012f162a671b1d6f0c0 | |
parent | c46db363d67c86e8887eec5be521134ae4e31f4c (diff) | |
download | docker-7f6a1d9fb78ca8c2fc312c1f24178acee57b1812.tar.gz |
update rolling update tutorial to reflect default parallelism and update on failure
Signed-off-by: Charles Smith <charles.smith@docker.com>
(cherry picked from commit 6440cacd49226e97b2dcb64eb31cb32b87b1ff18)
Signed-off-by: Tibor Vass <tibor@docker.com>
-rw-r--r-- | docs/swarm/swarm-tutorial/rolling-update.md | 36 |
1 files changed, 20 insertions, 16 deletions
diff --git a/docs/swarm/swarm-tutorial/rolling-update.md b/docs/swarm/swarm-tutorial/rolling-update.md index 6090e1691c..5f27a51800 100644 --- a/docs/swarm/swarm-tutorial/rolling-update.md +++ b/docs/swarm/swarm-tutorial/rolling-update.md @@ -29,7 +29,6 @@ update delay: --replicas 3 \ --name redis \ --update-delay 10s \ - --update-parallelism 1 \ redis:3.0.6 0u6a4s31ybk7yw2wyvtikmu50 @@ -37,18 +36,21 @@ update delay: You configure the rolling update policy at service deployment time. - The `--update-parallelism` flag configures the number of service tasks that - the scheduler can update simultaneously. When updates to individual tasks - return a state of `RUNNING` or `FAILED`, the scheduler schedules another - task to update until all tasks are updated. - The `--update-delay` flag configures the time delay between updates to a - service task or sets of tasks. + service task or sets of tasks. You can describe the time `T` as a + combination of the number of seconds `Ts`, minutes `Tm`, or hours `Th`. So + `10m30s` indicates a 10 minute 30 second delay. - You can describe the time `T` as a combination of the number of seconds - `Ts`, minutes `Tm`, or hours `Th`. So `10m30s` indicates a 10 minute 30 - second delay. + By default the scheduler updates 1 task at a time. You can pass the + `--update-parallelism` flag to configure the maximum number of service tasks + that the scheduler updates simultaneously. + By default, when an update to an individual task returns a state of + `RUNNING`, the scheduler schedules another task to update until all tasks + are updated. If, at any time during an update a task returns `FAILED`, the + scheduler pauses the update. You can control the behavior using the + `--update-failure-action` flag for `docker service create` or + `docker service update`. 3. Inspect the `redis` service: @@ -77,13 +79,15 @@ applies the update to nodes according to the `UpdateConfig` policy: redis ``` - The scheduler applies rolling updates as follows: + The scheduler applies rolling updates as follows by default: - * Stop the initial number of tasks according to `--update-parallelism`. - * Schedule updates for the stopped tasks. - * Start the containers for the updated tasks. - * After an update to a task completes, wait for the specified delay - period before stopping the next task. + * Stop the first task. + * Schedule update for the stopped task. + * Start the container for the updated task. + * If the update to a task returns `RUNNING`, wait for the + specified delay period then stop the next task. + * If, at any time during the update, a task returns `FAILED`, pause the + update. 5. Run `docker service inspect --pretty redis` to see the new image in the desired state: |