Skip to content

Allow --detach and --quiet flags when using --rollback - #144

Merged
dnephin merged 1 commit into
docker:masterfrom
thaJeztah:allow-some-flags-during-rollback
Jun 1, 2017
Merged

Allow --detach and --quiet flags when using --rollback#144
dnephin merged 1 commit into
docker:masterfrom
thaJeztah:allow-some-flags-during-rollback

Conversation

@thaJeztah

@thaJeztahthaJeztah commented Jun 1, 2017

Copy link
Copy Markdown
Member

Commit 78c204e (moby/moby@f9bd8ec / moby/moby#31108 in the moby repo) added a validation to prevent --rollback from being used in combination with other flags that update the service spec.

This validation was not taking into account that some flags only affect the CLI behavior, and are okay to be used when rolling back.

This patch updates the validation, and adds --quiet and --detach to the list of allowed flags.

relates to moby/moby#33444 (comment)

Commit 78c204e added
(f9bd8ec in the moby repo)
a validation to prevent `--rollback` from being used
in combination with other flags that update the
service spec.
This validation was not taking into account that
some flags only affect the CLI behavior, and
are okay to be used when rolling back.
This patch updates the validation, and adds
`--quiet` and `--detach` to the list of allowed
flags.
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
@aaronlehmann

Copy link
Copy Markdown

LGTM

@dnephindnephin left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@codecov-io

codecov-io commented Jun 1, 2017

Copy link
Copy Markdown

Codecov Report

Merging #144 into master will not change coverage.
The diff coverage is 0%.

@@ Coverage Diff @@## master #144 +/- ##
=======================================
Coverage 44.96% 44.96% =======================================
Files 169 169 Lines 11378 11378 =======================================
Hits 5116 5116 Misses 5970 5970 Partials 292 292

@cpuguy83

Copy link
Copy Markdown
Collaborator

Kind of stinks we can't specify the rollback order when rolling back.

@aaronlehmann

Copy link
Copy Markdown

@cpuguy83: For the swarm manager to know it's doing a rollback, the rollback has to happen server-side instead of the client just submitting PreviousSpec as the new spec. But if the spec is being rolled back on the server side, there is no mechanism to tell the swarm manager "use the previous spec, except change X and Y and Z".

@thaJeztah

Copy link
Copy Markdown
MemberAuthor

Also related to this; #142

For the swarm manager to know it's doing a rollback, the rollback has to happen server-side instead of the client just submitting PreviousSpec as the new spec.

Perhaps a PATCH request could be used to allow updating the spec while rolling back (i.e., just allow setting some options)? Anyway, that's a different discussion 😄

@vdemeestervdemeester left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM 🐸

@vdemeestervdemeester mentioned this pull request Jun 1, 2017
23 tasks
@dnephin
dnephin merged commit 30af879 into docker:masterJun 1, 2017
@GordonTheTurtleGordonTheTurtle added this to the 17.06.0 milestone Jun 1, 2017
@thaJeztah
thaJeztah deleted the allow-some-flags-during-rollback branch June 1, 2017 18:48
@thaJeztahthaJeztah mentioned this pull request Jun 7, 2017
40 tasks
nobiit pushed a commit to nobidev/docker-cli that referenced this pull request Nov 19, 2025
Sign up for freeto 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.

7 participants

@thaJeztah@aaronlehmann@codecov-io@cpuguy83@vdemeester@dnephin@GordonTheTurtle