Skip to content
Prev Previous commit
Next Next commit
Add 'rollback' command as allowed for failure_action
Signed-off-by: Nikolay Murga <[email protected]>
  • Loading branch information
NikolayMurha authored and shin- committed Aug 10, 2018
commit 185f72723ab8bac589e73e58be64f1665472762e
4 changes: 2 additions & 2 deletions docker/types/services.py
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ class UpdateConfig(dict):
delay (int): Amount of time between updates.
failure_action (string): Action to take if an updated task fails to
run, or stops running during the update. Acceptable values are
``continue`` and ``pause``. Default: ``continue``
``continue``, ``rollback`` and ``pause``. Default: ``continue``
monitor (int): Amount of time to monitor each updated task for
failures, in nanoseconds.
max_failure_ratio (float): The fraction of tasks that may fail during
Expand All @@ -385,7 +385,7 @@ def __init__(self, parallelism=0, delay=None, failure_action='continue',
self['Parallelism'] = parallelism
if delay is not None:
self['Delay'] = delay
if failure_action not in ('pause', 'continue'):
if failure_action not in ('pause', 'continue', 'rollback'):
raise errors.InvalidArgument(
'failure_action must be either `pause` or `continue`.'
)
Expand Down