Browse code

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>

Charles Smith authored on 2016/07/26 01:04:15
Showing 1 changed files
... ...
@@ -29,7 +29,6 @@ update delay:
29 29
       --replicas 3 \
30 30
       --name redis \
31 31
       --update-delay 10s \
32
-      --update-parallelism 1 \
33 32
       redis:3.0.6
34 33
 
35 34
     0u6a4s31ybk7yw2wyvtikmu50
... ...
@@ -37,18 +36,21 @@ update delay:
37 37
 
38 38
     You configure the rolling update policy at service deployment time.
39 39
 
40
-    The `--update-parallelism` flag configures the number of service tasks that
41
-    the scheduler can update simultaneously. When updates to individual tasks
42
-    return a state of `RUNNING` or `FAILED`, the scheduler schedules another
43
-    task to update until all tasks are updated.
44
-
45 40
     The `--update-delay` flag configures the time delay between updates to a
46
-    service task or sets of tasks.
41
+    service task or sets of tasks. You can describe the time `T` as a
42
+    combination of the number of seconds `Ts`, minutes `Tm`, or hours `Th`. So
43
+    `10m30s` indicates a 10 minute 30 second delay.
47 44
 
48
-    You can describe the time `T` as a combination of the number of seconds
49
-    `Ts`, minutes `Tm`, or hours `Th`. So `10m30s` indicates a 10 minute 30
50
-    second delay.
45
+    By default the scheduler updates 1 task at a time. You can pass the
46
+    `--update-parallelism` flag to configure the maximum number of service tasks
47
+    that the scheduler updates simultaneously.
51 48
 
49
+    By default, when an update to an individual task returns a state of
50
+    `RUNNING`, the scheduler schedules another task to update until all tasks
51
+    are updated. If, at any time during an update a task returns `FAILED`, the
52
+    scheduler pauses the update. You can control the behavior using the
53
+    `--update-failure-action` flag for `docker service create` or
54
+    `docker service update`.
52 55
 
53 56
 3. Inspect the `redis` service:
54 57
 
... ...
@@ -77,13 +79,15 @@ applies the update to nodes according to the `UpdateConfig` policy:
77 77
     redis
78 78
     ```
79 79
 
80
-    The scheduler applies rolling updates as follows:
80
+    The scheduler applies rolling updates as follows by default:
81 81
 
82
-    * Stop the initial number of tasks according to `--update-parallelism`.
83
-    * Schedule updates for the stopped tasks.
84
-    * Start the containers for the updated tasks.
85
-    * After an update to a task completes, wait for the specified delay
86
-    period before stopping the next task.
82
+    * Stop the first task.
83
+    * Schedule update for the stopped task.
84
+    * Start the container for the updated task.
85
+    * If the update to a task returns `RUNNING`, wait for the
86
+    specified delay period then stop the next task.
87
+    * If, at any time during the update, a task returns `FAILED`, pause the
88
+    update.
87 89
 
88 90
 5. Run `docker service inspect --pretty redis` to see the new image in the
89 91
 desired state: