Merge pull request #26074 from allencloud/return-err-when-remove-container-in-progress

make client side know container removal in progress
Upstream-commit: 97d4b9c46528c2d263a448658a6cf78ffd943075
Component: engine
This commit is contained in:
Vincent Demeester
2016-09-27 18:48:03 +02:00
committed by GitHub
4 changed files with 8 additions and 10 deletions

View File

@ -6,7 +6,6 @@ import (
"io"
"net/http"
"strconv"
"strings"
"syscall"
"time"
@ -386,10 +385,6 @@ func (s *containerRouter) deleteContainers(ctx context.Context, w http.ResponseW
}
if err := s.backend.ContainerRm(name, config); err != nil {
// Force a 404 for the empty string
if strings.Contains(strings.ToLower(err.Error()), "prefix can't be empty") {
return fmt.Errorf("no such container: \"\"")
}
return err
}