podman/libpod
Matthew Heon 259c79963f Improve robustness of `podman system reset`
Firstly, reset is now managed by the runtime itself as a part of
initialization. This ensures that it can be used even with
runtimes that would otherwise fail to be created - most notably,
when the user has changed a core path
(runroot/root/tmpdir/staticdir).

Secondly, we now attempt a best-effort removal even if the store
completely fails to be configured.

Third, we now hold the alive lock for the entire reset operation.
This ensures that no other Podman process can start while we are
running a system reset, and removes any possibility of a race
where a user tries to create containers or pull images while we
are trying to perform a reset.

[NO NEW TESTS NEEDED] we do not test reset last I checked.

Fixes #9075

Signed-off-by: Matthew Heon <mheon@redhat.com>
2022-06-03 12:54:08 -04:00
..
common fix a number of `godot` issues 2022-03-22 13:04:35 +01:00
define Merge pull request #14383 from jwhonce/wip/info_todo 2022-05-27 10:55:35 -04:00
driver bump go module to version 4 2022-01-18 12:47:07 +01:00
events events: drop TODO comment 2022-05-25 12:26:43 +02:00
layers
linkmode go fmt: use go 1.18 conditional-build syntax 2022-03-18 09:11:53 +01:00
lock test: use `T.TempDir` to create temporary test directory 2022-05-05 21:09:41 +08:00
logs enable gocritic linter 2022-04-26 18:12:22 +02:00
plugin Remove more FIXMEs 2022-05-25 14:10:02 -04:00
shutdown Fix CI flake on time of shutdown for API service 2021-10-12 09:53:19 -07:00
boltdb_state.go Instead of erroring, clean up after dangling IDs in DB 2022-05-23 11:21:15 -04:00
boltdb_state_internal.go libpod: unset networks before storing container conf 2022-05-02 13:23:16 +02:00
boltdb_state_linux.go go fmt: use go 1.18 conditional-build syntax 2022-03-18 09:11:53 +01:00
common_test.go bump go module to version 4 2022-01-18 12:47:07 +01:00
container.go First batch of resolutions to FIXMEs 2022-05-25 13:28:04 -04:00
container_api.go Add API support for NoOverwriteDirNonDir 2022-05-26 16:31:15 -07:00
container_commit.go container-commit: support --squash to squash layers into one 2022-02-23 17:38:28 +05:30
container_config.go fix podman container restore without CreateNetNS 2022-05-31 16:49:40 +02:00
container_copy_linux.go Add API support for NoOverwriteDirNonDir 2022-05-26 16:31:15 -07:00
container_exec.go First batch of resolutions to FIXMEs 2022-05-25 13:28:04 -04:00
container_graph.go bump go module to version 4 2022-01-18 12:47:07 +01:00
container_graph_test.go bump go module to version 4 2022-01-18 12:47:07 +01:00
container_inspect.go k8systemd: run k8s workloads in systemd 2022-05-17 10:18:58 +02:00
container_internal.go pod: add exit policies 2022-05-02 13:29:59 +02:00
container_internal_linux.go First batch of resolutions to FIXMEs 2022-05-25 13:28:04 -04:00
container_internal_linux_test.go test: use `T.TempDir` to create temporary test directory 2022-05-05 21:09:41 +08:00
container_internal_test.go test: fix failing TestPostDeleteHooks 2022-05-05 21:39:46 +08:00
container_linux.go go fmt: use go 1.18 conditional-build syntax 2022-03-18 09:11:53 +01:00
container_log.go Add option for pod logs to display different colors per container. 2022-03-29 17:29:13 +02:00
container_log_linux.go Fix --tail log on restart problem 2022-04-13 14:07:15 -04:00
container_log_unsupported.go Add option for pod logs to display different colors per container. 2022-03-29 17:29:13 +02:00
container_path_resolution.go document that using libpod package directly is not supported 2022-03-23 19:05:29 +01:00
container_stat_linux.go enable gocritic linter 2022-04-26 18:12:22 +02:00
container_top_linux.go contain_top_linux.go: s/TODO/NOTE/ 2022-05-24 13:40:02 +02:00
container_validate.go k8systemd: run k8s workloads in systemd 2022-05-17 10:18:58 +02:00
diff.go fix --init with /dev bind mount 2022-05-23 13:59:05 +02:00
doc.go document that using libpod package directly is not supported 2022-03-23 19:05:29 +01:00
events.go auto update: create an event 2022-05-23 14:11:29 +02:00
healthcheck.go healthcheck, libpod: Read healthcheck event output from os pipe 2022-02-04 21:15:03 +05:30
healthcheck_linux.go enable staticcheck linter 2022-04-22 12:51:29 +02:00
info.go Refactor populating uptime 2022-05-26 15:46:04 -07:00
info_test.go Robust whitespace split of cpu utilization line from /proc/stat 2022-05-14 00:34:56 +00:00
kube.go Use containers/common/pkg/util.StringToSlice 2022-05-23 12:16:54 -04:00
mounts_linux.go go fmt: use go 1.18 conditional-build syntax 2022-03-18 09:11:53 +01:00
networking_linux.go Use containers/common/pkg/util.StringToSlice 2022-05-23 12:16:54 -04:00
networking_linux_test.go enable unparam linter 2022-04-25 13:23:20 +02:00
networking_machine.go enable gocritic linter 2022-04-26 18:12:22 +02:00
networking_slirp4netns.go enable gocritic linter 2022-04-26 18:12:22 +02:00
oci.go bump go module to version 4 2022-01-18 12:47:07 +01:00
oci_attach_linux.go libpod: treat ECONNRESET as EOF 2022-05-04 15:43:12 +02:00
oci_conmon.go
oci_conmon_exec_linux.go play kube log tag handling 2022-05-06 15:59:06 -04:00
oci_conmon_linux.go sdnotify: send MAINPID only once 2022-05-12 11:11:37 +02:00
oci_missing.go bump go module to version 4 2022-01-18 12:47:07 +01:00
oci_util.go bump go module to version 4 2022-01-18 12:47:07 +01:00
options.go Improve robustness of `podman system reset` 2022-06-03 12:54:08 -04:00
pod.go play kube: service container 2022-05-12 10:51:13 +02:00
pod_api.go Remove more FIXMEs 2022-05-25 14:10:02 -04:00
pod_internal.go bump go module to version 4 2022-01-18 12:47:07 +01:00
pod_status.go bump go module to version 4 2022-01-18 12:47:07 +01:00
pod_top_linux.go libpod/pod_top_linux.go: s/TODO/NOTE/ 2022-05-25 12:30:19 +02:00
reset.go Improve robustness of `podman system reset` 2022-06-03 12:54:08 -04:00
runtime.go Improve robustness of `podman system reset` 2022-06-03 12:54:08 -04:00
runtime_cstorage.go Remove the runtime lock 2022-02-22 11:05:26 -05:00
runtime_ctr.go Use containers/common/pkg/util.StringToSlice 2022-05-23 12:16:54 -04:00
runtime_img.go play kube: service container 2022-05-12 10:51:13 +02:00
runtime_migrate.go enable unparam linter 2022-04-25 13:23:20 +02:00
runtime_pod.go Use containers/common/pkg/util.StringToSlice 2022-05-23 12:16:54 -04:00
runtime_pod_linux.go play kube: service container 2022-05-12 10:51:13 +02:00
runtime_renumber.go auto update: create an event 2022-05-23 14:11:29 +02:00
runtime_volume.go Remove the runtime lock 2022-02-22 11:05:26 -05:00
runtime_volume_linux.go volume: add new option -o o=noquota 2022-04-28 13:29:01 +02:00
runtime_worker.go work queue: simplify and use a wait group 2022-05-25 10:17:46 +02:00
service.go k8systemd: run k8s workloads in systemd 2022-05-17 10:18:58 +02:00
state.go use libnetwork from c/common 2022-01-12 17:07:30 +01:00
state_test.go bump go module to version 4 2022-01-18 12:47:07 +01:00
stats.go podman stats: improve cpu average calc 2022-03-22 17:44:58 +01:00
storage.go bump go module to version 4 2022-01-18 12:47:07 +01:00
util.go enable errcheck linter 2022-04-29 14:06:38 +02:00
util_linux.go go fmt: use go 1.18 conditional-build syntax 2022-03-18 09:11:53 +01:00
util_linux_test.go
util_test.go bump go module to version 4 2022-01-18 12:47:07 +01:00
volume.go volume: add new option -o o=noquota 2022-04-28 13:29:01 +02:00
volume_inspect.go bump go module to version 4 2022-01-18 12:47:07 +01:00
volume_internal.go volume: add new option -o o=noquota 2022-04-28 13:29:01 +02:00
volume_internal_linux.go Add podman volume mount support 2022-02-28 14:26:22 -05:00