automation-tests/libpod
Matthew Heon 25cc43c376 Add ContainerStateRemoving
When Libpod removes a container, there is the possibility that
removal will not fully succeed. The most notable problems are
storage issues, where the container cannot be removed from
c/storage.

When this occurs, we were faced with a choice. We can keep the
container in the state, appearing in `podman ps` and available for
other API operations, but likely unable to do any of them as it's
been partially removed. Or we can remove it very early and clean
up after it's already gone. We have, until now, used the second
approach.

The problem that arises is intermittent problems removing
storage. We end up removing a container, failing to remove its
storage, and ending up with a container permanently stuck in
c/storage that we can't remove with the normal Podman CLI, can't
use the name of, and generally can't interact with. A notable
cause is when Podman is hit by a SIGKILL midway through removal,
which can consistently cause `podman rm` to fail to remove
storage.

We now add a new state for containers that are in the process of
being removed, ContainerStateRemoving. We set this at the
beginning of the removal process. It notifies Podman that the
container cannot be used anymore, but preserves it in the DB
until it is fully removed. This will allow Remove to be run on
these containers again, which should successfully remove storage
if it fails.

Fixes #3906

Signed-off-by: Matthew Heon <mheon@redhat.com>
2019-11-19 15:38:03 -05:00
..
common Set blob cache directory based on GraphDriver 2019-03-29 08:27:33 -04:00
config libpod/config: default: use `crun` on Cgroups v2 2019-11-07 13:55:41 +00:00
define Add ContainerStateRemoving 2019-11-19 15:38:03 -05:00
driver removMergeDir from inspect result if not mounted 2019-08-13 15:13:20 -04:00
events codespell: spelling corrections 2019-11-13 08:15:00 +11:00
image Merge pull request #4502 from vrothberg/fix-3359 2019-11-18 15:10:09 +01:00
layers Initial checkin from CRI-O repo 2017-11-01 11:24:59 -04:00
lock codespell: spelling corrections 2019-11-13 08:15:00 +11:00
logs logs: support --tail 0 2019-10-31 19:55:36 +01:00
boltdb_state.go codespell: spelling corrections 2019-11-13 08:15:00 +11:00
boltdb_state_internal.go Add a MissingRuntime implementation 2019-10-15 15:59:20 -04:00
boltdb_state_linux.go podman-remote inspect 2019-01-18 15:43:11 -06:00
boltdb_state_unsupported.go podman-remote inspect 2019-01-18 15:43:11 -06:00
common_test.go add libpod/config 2019-10-31 17:42:37 +01:00
container.go podman: add support for specifying MAC 2019-11-06 16:22:19 +01:00
container.log.go libpod removal from main (phase 2) 2019-06-27 07:56:24 -05:00
container_api.go Add ContainerStateRemoving 2019-11-19 15:38:03 -05:00
container_commit.go bump containers/image to v5.0.0, buildah to v1.11.4 2019-10-29 13:35:18 -04:00
container_graph.go generate systemd: support pods and geneartig files 2019-08-21 17:28:30 +02:00
container_graph_test.go generate systemd: support pods and geneartig files 2019-08-21 17:28:30 +02:00
container_inspect.go add libpod/config 2019-10-31 17:42:37 +01:00
container_internal.go Add ContainerStateRemoving 2019-11-19 15:38:03 -05:00
container_internal_linux.go Add ContainerStateRemoving 2019-11-19 15:38:03 -05:00
container_internal_test.go Potentially breaking: Make hooks sort order locale-independent 2019-04-09 21:08:44 +02:00
container_internal_unsupported.go When restoring containers, reset cgroup path 2019-10-10 14:53:29 -04:00
container_linux.go Do not fetch pod and ctr State on retrieval in Bolt 2018-07-31 14:19:50 +00:00
container_log_linux.go logs: support --tail 0 2019-10-31 19:55:36 +01:00
container_log_unsupported.go libpod removal from main (phase 2) 2019-06-27 07:56:24 -05:00
container_top_linux.go Add support for launching containers without CGroups 2019-09-10 10:52:37 -04:00
container_top_unsupported.go libpod removal from main (phase 2) 2019-06-27 07:56:24 -05:00
container_unsupported.go Do not fetch pod and ctr State on retrieval in Bolt 2018-07-31 14:19:50 +00:00
diff.go Add function to get a filtered tarstream diff 2019-07-11 14:43:34 +02:00
events.go get last container event 2019-07-07 08:54:20 -05:00
healthcheck.go codespell: spelling corrections 2019-11-13 08:15:00 +11:00
healthcheck_linux.go golangci-lint pass number 2 2019-07-11 09:13:06 -05:00
healthcheck_unsupported.go remove libpod from main 2019-06-25 13:51:24 -05:00
in_memory_state.go add libpod/config 2019-10-31 17:42:37 +01:00
info.go Merge pull request #4220 from mheon/null_runtime 2019-10-11 20:55:37 +02:00
kube.go codespell: spelling corrections 2019-11-13 08:15:00 +11:00
mounts_linux.go set root propagation based on volume properties 2018-11-26 13:55:02 +01:00
networking_linux.go podman: add support for specifying MAC 2019-11-06 16:22:19 +01:00
networking_unsupported.go remove libpod from main 2019-06-25 13:51:24 -05:00
oci.go Add a MissingRuntime implementation 2019-10-15 15:59:20 -04:00
oci_attach_linux.go Allow users to disable detach keys 2019-11-05 14:10:43 -05:00
oci_attach_linux_cgo.go Implement conmon exec 2019-07-22 15:57:23 -04:00
oci_attach_linux_nocgo.go Implement conmon exec 2019-07-22 15:57:23 -04:00
oci_attach_unsupported.go Implement conmon exec 2019-07-22 15:57:23 -04:00
oci_conmon_linux.go Merge pull request #4352 from vrothberg/config-package 2019-10-31 19:21:46 +01:00
oci_conmon_unsupported.go add libpod/config 2019-10-31 17:42:37 +01:00
oci_missing.go Add a MissingRuntime implementation 2019-10-15 15:59:20 -04:00
oci_util.go add libpod/config 2019-10-31 17:42:37 +01:00
options.go Add ContainerStateRemoving 2019-11-19 15:38:03 -05:00
pod.go Allow customizing pod hostname 2019-08-18 03:48:40 +00:00
pod_api.go codespell: spelling corrections 2019-11-13 08:15:00 +11:00
pod_internal.go add libpod/config 2019-10-31 17:42:37 +01:00
pod_top_linux.go libpod removal from main (phase 2) 2019-06-27 07:56:24 -05:00
pod_top_unsupported.go remove libpod from main 2019-06-25 13:51:24 -05:00
runtime.go add libpod/config 2019-10-31 17:42:37 +01:00
runtime_cstorage.go Unwrap errors before comparing them 2019-10-14 13:49:06 -04:00
runtime_ctr.go Add ContainerStateRemoving 2019-11-19 15:38:03 -05:00
runtime_img.go bump containers/image to v5.0.0, buildah to v1.11.4 2019-10-29 13:35:18 -04:00
runtime_img_test.go switch projectatomic to containers 2018-08-16 17:12:36 +00:00
runtime_migrate.go Migrate can move containers to a new runtime 2019-10-10 10:25:06 -04:00
runtime_migrate_unsupported.go system: migrate stops the pause process 2019-05-17 20:48:25 +02:00
runtime_pod.go remove libpod from main 2019-06-25 13:51:24 -05:00
runtime_pod_infra_linux.go rootless: Rearrange setup of rootless containers 2019-09-24 11:01:28 +02:00
runtime_pod_linux.go add libpod/config 2019-10-31 17:42:37 +01:00
runtime_pod_unsupported.go remove libpod from main 2019-06-25 13:51:24 -05:00
runtime_renumber.go Re-add locks to volumes. 2019-08-28 11:35:00 -04:00
runtime_volume.go codespell: spelling corrections 2019-11-13 08:15:00 +11:00
runtime_volume_linux.go Return a better error for volume name conflicts 2019-10-23 16:34:32 -04:00
runtime_volume_unsupported.go remove libpod from main 2019-06-25 13:51:24 -05:00
state.go add libpod/config 2019-10-31 17:42:37 +01:00
state_test.go add libpod/config 2019-10-31 17:42:37 +01:00
stats.go stats: fix calculation for the CPU time 2019-11-02 20:11:19 +01:00
stats_config.go changes to allow for darwin compilation 2018-06-29 20:44:09 +00:00
stats_unsupported.go remove libpod from main 2019-06-25 13:51:24 -05:00
storage.go bump containers/image to v5.0.0, buildah to v1.11.4 2019-10-29 13:35:18 -04:00
util.go Add ContainerStateRemoving 2019-11-19 15:38:03 -05:00
util_linux.go rm: add containers eviction with `rm --force` 2019-09-25 19:44:38 +02:00
util_test.go Stage3 Image Library 2018-03-14 20:21:31 +00:00
util_unsupported.go rm: add containers eviction with `rm --force` 2019-09-25 19:44:38 +02:00
volume.go When first mounting any named volume, copy up 2019-09-09 17:17:39 -04:00
volume_inspect.go Show volume options in 'volume inspect' 2019-10-18 13:42:31 -04:00
volume_internal.go When first mounting any named volume, copy up 2019-09-09 17:17:39 -04:00
volume_internal_linux.go Wait for `mount` command to finish when mounting volume 2019-10-30 14:41:16 -04:00
volume_internal_unsupported.go Add ability for volumes with options to mount/umount 2019-09-05 17:12:27 -04:00