X Tutup
Skip to content

[20.10 backport] fix --update-order and --rollback-order flags#2963

Merged
silvin-lubecki merged 1 commit intodocker:20.10from
thaJeztah:20.10_backport_fix_update_rollback_order
Feb 18, 2021
Merged

[20.10 backport] fix --update-order and --rollback-order flags#2963
silvin-lubecki merged 1 commit intodocker:20.10from
thaJeztah:20.10_backport_fix_update_rollback_order

Conversation

@thaJeztah
Copy link
Member

backport of #2927

fixes moby/moby#41581

- What I did
Add missing flags in anyChanged function in two places, resolving moby/moby#41581

- How I did it
Just add the missing flags.

- How to verify it

  • docker service create --update-order start-first --restart-condition none --no-healthcheck --name start-first-test alpine tail -f /dev/null
  • docker inspect start-first-test

(Before this commit)

...
            "UpdateConfig": {
                "Parallelism": 1,
                "FailureAction": "pause",
                "Monitor": 5000000000,
                "MaxFailureRatio": 0,
                "Order": "stop-first"
            },
            "RollbackConfig": {
                "Parallelism": 1,
                "FailureAction": "pause",
                "Monitor": 5000000000,
                "MaxFailureRatio": 0,
                "Order": "stop-first"
            },
            "EndpointSpec": {
                "Mode": "vip"
            }
        },
        "Endpoint": {
            "Spec": {}
        }
    }
]

(After this commit):

...
            "UpdateConfig": {
                "Parallelism": 1,
                "FailureAction": "pause",
                "Monitor": 5000000000,
                "MaxFailureRatio": 0,
                "Order": "start-first"
            },
            "RollbackConfig": {
                "Parallelism": 1,
                "FailureAction": "pause",
                "Monitor": 5000000000,
                "MaxFailureRatio": 0,
                "Order": "start-first"
            },
            "EndpointSpec": {
                "Mode": "vip"
            }
        },
        "Endpoint": {
            "Spec": {}
        }
    }
]

- Description for the changelog

fix --update-order and --rollback-order flags when only --update-order or --rollback-order is provided.

- A picture of a cute animal (not mandatory but encouraged)
🦁

Signed-off-by: Jim Lin <b04705003@ntu.edu.tw>
(cherry picked from commit 26a6a72)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Copy link
Contributor

@silvin-lubecki silvin-lubecki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@silvin-lubecki silvin-lubecki merged commit 830d659 into docker:20.10 Feb 18, 2021
@thaJeztah thaJeztah deleted the 20.10_backport_fix_update_rollback_order branch February 18, 2021 11:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

X Tutup