From 3aa22cb1be83dbe322c3fabec29b231bdc1be141 Mon Sep 17 00:00:00 2001 From: maybe-sybr <58414429+maybe-sybr@users.noreply.github.com> Date: Wed, 1 Jul 2020 09:49:44 +1000 Subject: APIv2:fix: Handle docker volume force as expected In response to input regarding the semantic difference for the `force` parameter for volume removal between Docker and us, this change ensures that we emulate the Dockr behaviour correctly when this parameter is specified. Signed-off-by: Matt Brindley <58414429+maybe-sybr@users.noreply.github.com> --- pkg/api/server/register_volumes.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'pkg/api/server') diff --git a/pkg/api/server/register_volumes.go b/pkg/api/server/register_volumes.go index 7a64a27ec..0f4f18b0a 100644 --- a/pkg/api/server/register_volumes.go +++ b/pkg/api/server/register_volumes.go @@ -186,7 +186,10 @@ func (s *APIServer) registerVolumeHandlers(r *mux.Router) error { // - in: query // name: force // type: boolean - // description: force removal + // description: | + // Force removal of the volume. This actually only causes errors due + // to the names volume not being found to be suppressed, which is the + // behaviour Docker implements. // produces: // - application/json // responses: -- cgit v1.2.3-54-g00ecf