Fix force-remove for cluster volumes#44224
Merged
cpuguy83 merged 1 commit intomoby:masterfrom Oct 25, 2022
Merged
Conversation
Signed-off-by: Drew Erny <derny@mirantis.com>
9306d2e to
3246db3
Compare
Member
|
Moved to 22.06 as @dperny considers this a blocker for the Swarm-Cluster-Volume support in that release. I'll create a backport after this is merged. |
corhere
approved these changes
Oct 25, 2022
cpuguy83
approved these changes
Oct 25, 2022
Member
|
Backport is at #44360. |
Member
|
(Moved the milestone for this PR (for master) to v-next, and the backport to v22.06) |
thaJeztah
reviewed
Mar 9, 2023
| return err | ||
| // when a removal is forced, if the volume does not exist, no error will be | ||
| // returned. this means that to ensure forcing works on swarm volumes as | ||
| // well, we should always also force remove aginst the cluster. |
Member
There was a problem hiding this comment.
Suggested change
| // well, we should always also force remove aginst the cluster. | |
| // well, we should always also force remove against the cluster. |
Comment on lines
+174
to
175
| } | ||
| } |
Member
There was a problem hiding this comment.
I think we're missing an return err here; docker/cli#4082 (comment)
This was referenced Mar 12, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Signed-off-by: Drew Erny derny@mirantis.com
- What I did
Fixes force remove functionality for Swarm Cluster Volumes
- How I did it
Previously, the code assumed that attempting to force remove a local volume that did not exist would return a Not Found error. This is not the case; force-remove always returns no error. To correctly force-remove volumes, we must force locally and then send a force remove to Swarm.