Add --force in docker volume rm to fix out-of-band volume driver deletion
This fix tries to address the issue in raised #23367 where an out-of-band volume driver deletion leaves some data in docker. This prevent the reuse of deleted volume names (by out-of-band volume driver like flocker). This fix adds a `--force` field in `docker volume rm` to forcefully purge the data of the volume that has already been deleted. Related documentations have been updated. This fix is tested manually with flocker, as is specified in #23367. An integration test has also been added for the scenario described. This fix fixes #23367. Signed-off-by: Yong Tang <yong.tang.github@outlook.com> Upstream-commit: 6c5c34d50d377d1c5318a255240fb2dc9c23cf92 Component: engine
This commit is contained in:
@ -119,6 +119,7 @@ This section lists each version from latest to oldest. Each listing includes a
|
||||
* `POST /containers/create` now takes `AutoRemove` in HostConfig, to enable auto-removal of the container on daemon side when the container's process exits.
|
||||
* `GET /containers/json` and `GET /containers/(id or name)/json` now return `"removing"` as a value for the `State.Status` field if the container is being removed. Previously, "exited" was returned as status.
|
||||
* `GET /containers/json` now accepts `removing` as a valid value for the `status` filter.
|
||||
* `DELETE /volumes/(name)` now accepts a `force` query parameter to force removal of volumes that were already removed out of band by the volume driver plugin.
|
||||
|
||||
### v1.24 API changes
|
||||
|
||||
|
||||
@ -3062,6 +3062,11 @@ Instruct the driver to remove the volume (`name`).
|
||||
|
||||
HTTP/1.1 204 No Content
|
||||
|
||||
**Query Parameters**:
|
||||
|
||||
- **force** - 1/True/true or 0/False/false, Force the removal of the volume.
|
||||
Default `false`.
|
||||
|
||||
**Status codes**:
|
||||
|
||||
- **204** - no error
|
||||
|
||||
Reference in New Issue
Block a user