diff options
author | Marco Vedovati <mvedovati@suse.com> | 2019-07-05 12:54:07 +0200 |
---|---|---|
committer | Marco Vedovati <mvedovati@suse.com> | 2019-09-25 19:44:38 +0200 |
commit | dacbc5beb2a8841e52cf8ea7f544b4d302469c1d (patch) | |
tree | 59789993d8dafec7b96ca1eb7a31b3959c50e7b0 /cmd/podman/varlink | |
parent | 83b2348313c52cc3e20d72285a9d81d3d72c2d5d (diff) | |
download | podman-dacbc5beb2a8841e52cf8ea7f544b4d302469c1d.tar.gz podman-dacbc5beb2a8841e52cf8ea7f544b4d302469c1d.tar.bz2 podman-dacbc5beb2a8841e52cf8ea7f544b4d302469c1d.zip |
rm: add containers eviction with `rm --force`
Add ability to evict a container when it becomes unusable. This may
happen when the host setup changes after a container creation, making it
impossible for that container to be used or removed.
Evicting a container is done using the `rm --force` command.
Signed-off-by: Marco Vedovati <mvedovati@suse.com>
Diffstat (limited to 'cmd/podman/varlink')
-rw-r--r-- | cmd/podman/varlink/io.podman.varlink | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/cmd/podman/varlink/io.podman.varlink b/cmd/podman/varlink/io.podman.varlink index 4692525e3..3434a2bcb 100644 --- a/cmd/podman/varlink/io.podman.varlink +++ b/cmd/podman/varlink/io.podman.varlink @@ -727,10 +727,12 @@ method GetAttachSockets(name: string) -> (sockets: Sockets) # or name, a [ContainerNotFound](#ContainerNotFound) error is returned. method WaitContainer(name: string, interval: int) -> (exitcode: int) -# RemoveContainer requires the name or ID of container as well a boolean representing whether a running container can be stopped and removed, and a boolean +# RemoveContainer requires the name or ID of a container as well as a boolean that +# indicates whether a container should be forcefully removed (e.g., by stopping it), and a boolean # indicating whether to remove builtin volumes. Upon successful removal of the # container, its ID is returned. If the # container cannot be found by name or ID, a [ContainerNotFound](#ContainerNotFound) error will be returned. +# See also [EvictContainer](EvictContainer). # #### Example # ~~~ # $ varlink call -m unix:/run/podman/io.podman/io.podman.RemoveContainer '{"name": "62f4fd98cb57"}' @@ -740,6 +742,20 @@ method WaitContainer(name: string, interval: int) -> (exitcode: int) # ~~~ method RemoveContainer(name: string, force: bool, removeVolumes: bool) -> (container: string) +# EvictContainer requires the name or ID of a container as well as a boolean that +# indicates to remove builtin volumes. Upon successful eviction of the container, +# its ID is returned. If the container cannot be found by name or ID, +# a [ContainerNotFound](#ContainerNotFound) error will be returned. +# See also [RemoveContainer](RemoveContainer). +# #### Example +# ~~~ +# $ varlink call -m unix:/run/podman/io.podman/io.podman.EvictContainer '{"name": "62f4fd98cb57"}' +# { +# "container": "62f4fd98cb57f529831e8f90610e54bba74bd6f02920ffb485e15376ed365c20" +# } +# ~~~ +method EvictContainer(name: string, removeVolumes: bool) -> (container: string) + # DeleteStoppedContainers will delete all containers that are not running. It will return a list the deleted # container IDs. See also [RemoveContainer](RemoveContainer). # #### Example |