docker serve: make Create idempotent to avoid "volume already exists" after restart
Docker may re-send Create requests for volumes that already exist, especially after a plugin restart. Previously this returned ErrVolumeExists which Docker surfaced as "volume name must be unique". Now if a volume with the same name already exists, Create returns success (no-op), matching the Docker volume plugin protocol's expectation of idempotent operations.
This commit is contained in:
@@ -20,7 +20,6 @@ import (
|
||||
// Errors
|
||||
var (
|
||||
ErrVolumeNotFound = errors.New("volume not found")
|
||||
ErrVolumeExists = errors.New("volume already exists")
|
||||
ErrMountpointExists = errors.New("non-empty mountpoint already exists")
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user