volume create error on conflict option

Signed-off-by: Kun Zhang <zkazure@gmail.com>
Upstream-commit: 0ff3123eba071166def8072d8c7f3aa9afa0b56f
Component: engine
This commit is contained in:
Kun Zhang
2015-10-04 20:09:51 +08:00
parent b34ed2cbab
commit 6841b07f52
4 changed files with 37 additions and 0 deletions

View File

@ -863,4 +863,13 @@ var (
Description: "While verifying the container's 'HostConfig', cpuset memory nodes provided aren't available in the container's cgroup available set",
HTTPStatusCode: http.StatusInternalServerError,
})
// ErrorVolumeNameTaken is generated when an error occurred while
// trying to create a volume that has existed using different driver.
ErrorVolumeNameTaken = errcode.Register(errGroup, errcode.ErrorDescriptor{
Value: "VOLUME_NAME_TAKEN",
Message: "A volume name %s already exists with the %s driver. Choose a different volume name.",
Description: "An attempt to create a volume using a driver but the volume already exists with a different driver",
HTTPStatusCode: http.StatusInternalServerError,
})
)