Skip to content

Commit 185f727

Browse files
NikolayMurhashin-
authored andcommitted
Add 'rollback' command as allowed for failure_action
Signed-off-by: Nikolay Murga <[email protected]>
1 parent d4345b5 commit 185f727

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docker/types/services.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,7 @@ class UpdateConfig(dict):
371371
delay (int): Amount of time between updates.
372372
failure_action (string): Action to take if an updated task fails to
373373
run, or stops running during the update. Acceptable values are
374-
``continue`` and ``pause``. Default: ``continue``
374+
``continue``, ``rollback`` and ``pause``. Default: ``continue``
375375
monitor (int): Amount of time to monitor each updated task for
376376
failures, in nanoseconds.
377377
max_failure_ratio (float): The fraction of tasks that may fail during
@@ -385,7 +385,7 @@ def __init__(self, parallelism=0, delay=None, failure_action='continue',
385385
self['Parallelism'] = parallelism
386386
if delay is not None:
387387
self['Delay'] = delay
388-
if failure_action not in ('pause', 'continue'):
388+
if failure_action not in ('pause', 'continue', 'rollback'):
389389
raise errors.InvalidArgument(
390390
'failure_action must be either `pause` or `continue`.'
391391
)

0 commit comments

Comments
 (0)