Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix service rollback options being cross-wired #1052

Merged
merged 1 commit into from
May 14, 2018

Commits on May 11, 2018

  1. Fix service rollback options being cross-wired

    The "update" and "rollback" configurations were cross-wired, as a result, setting
    `--rollback-*` options would override the service's update-options.
    
    Creating a service with both update, and rollback configuration:
    
        docker service create \
          --name=test \
          --update-failure-action=pause \
          --update-max-failure-ratio=0.6 \
          --update-monitor=3s \
          --update-order=stop-first \
          --update-parallelism=3 \
          --rollback-failure-action=continue \
          --rollback-max-failure-ratio=0.5 \
          --rollback-monitor=4s \
          --rollback-order=start-first \
          --rollback-parallelism=2 \
          --tty \
          busybox
    
    Before this change:
    
        docker service inspect --format '{{json .Spec.UpdateConfig}}' test \
        && docker service inspect --format '{{json .Spec.RollbackConfig}}' test
    
    Produces:
    
        {"Parallelism":3,"FailureAction":"pause","Monitor":3000000000,"MaxFailureRatio":0.6,"Order":"stop-first"}
        {"Parallelism":3,"FailureAction":"pause","Monitor":3000000000,"MaxFailureRatio":0.6,"Order":"stop-first"}
    
    After this change:
    
        {"Parallelism":3,"FailureAction":"pause","Monitor":3000000000,"MaxFailureRatio":0.6,"Order":"stop-first"}
        {"Parallelism":2,"FailureAction":"continue","Monitor":4000000000,"MaxFailureRatio":0.5,"Order":"start-first"}
    
    Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
    thaJeztah committed May 11, 2018
    Configuration menu
    Copy the full SHA
    f367aa9 View commit details
    Browse the repository at this point in the history