spiegel_podman/test/e2e
Matt Heon 023a354de7 Remove Libpod special-init conditions
Before this, for some special Podman commands (system reset,
system migrate, system renumber), Podman would create a first
Libpod runtime to do initialization and flag parsing, then stop
that runtime and create an entirely new runtime to perform the
actual task. This is an artifact of the pre-Podman 2.0 days, when
there was almost no indirection between Libpod and the CLI, and
we only used one runtime because we didn't need a second runtime
for flag parsing and basic init.

This system was clunky, and apparently, very buggy. When we
migrated to SQLite, some logic was introduced where we'd select a
different database location based on whether or not Libpod's
StaticDir was manually set - which differed between the first
invocation of Libpod and the second. So we'd get a different
database for some commands (like `system reset`) and they would
not be able to see existing containers, meaning they would not
function properly.

The immediate cause is obviously the SQLite behavior, but I'm
certain there's a lot more baggage hiding behind this multiple
Libpod runtime logic, so let's just refactor it out. It doesn't
make sense, and complicates the code. Instead, make Reset,
Renumber, and Migrate methods of the libpod Runtime. For Reset
and Renumber, we can shut the runtime down afterwards to achieve
the desired effect (no valid runtime after). Then pipe all of
them through the ContainerEngine so cmd/podman can access them.

As part of this, remove the SystemEngine part of pkg/domain. This
was supposed to encompass these "special" commands, but every
command in SystemEngine is actually a ContainerEngine command.
Reset, Renumber, Migrate - they all need a full Libpod and access
to all containers. There's no point to a separate engine if it
just wraps Libpod in the exact same way as ContainerEngine. This
consolidation saves us a bit more code and complexity.

Signed-off-by: Matt Heon <mheon@redhat.com>

<MH: Fixed cherry-pick conflicts for v4.8 branch>

Signed-off-by: Matt Heon <mheon@redhat.com>
2024-01-15 12:14:17 -05:00
..
build remote,test: remove .dockerignore which is a symlink 2023-11-03 20:39:02 +05:30
cdi build(deps): bump github.com/container-orchestrated-devices/container-device-interface 2023-02-20 14:51:04 +01:00
config Read kube_generate_type from containers.conf 2023-04-11 09:15:05 -04:00
quadlet Quadlet - add support for UID and GID Mapping 2023-11-15 12:10:22 +02:00
sign e2e: reduce dependency on /tmp for e2e tests 2023-01-26 22:20:15 +09:00
testdata Add (podman {image,manifest} push --sign-by-sigstore=param-file.yaml) 2023-01-27 16:47:32 +01:00
attach_test.go e2e: use ExitCleanly() in attach & build tests 2023-09-06 17:11:38 -06:00
build_test.go remote,test: remove .dockerignore which is a symlink 2023-11-03 20:39:02 +05:30
checkpoint_image_test.go e2e: use ExitCleanly() in checkpoint tests 2023-09-07 20:20:28 -06:00
checkpoint_test.go vendor: update checkpointctl to v1.1.0 2023-09-12 08:41:02 +01:00
cleanup_test.go e2e: use ExitCleanly() in cleanup_test.go 2023-09-11 06:33:18 -06:00
commit_test.go Add status messages to podman --remote commit 2023-11-01 14:31:09 -04:00
common_test.go CI: test overlay and vfs 2023-11-17 05:48:50 -07:00
config.go CI: stop using registry.k8s.io 2023-10-23 11:50:41 -06:00
config_amd64.go CI: test overlay and vfs 2023-11-17 05:48:50 -07:00
config_arm64.go CI: test overlay and vfs 2023-11-17 05:48:50 -07:00
config_ppc64le.go CI: test overlay and vfs 2023-11-17 05:48:50 -07:00
container_clone_test.go e2e: container_clone_test.go: use ExitCleanly() 2023-09-11 07:59:32 -06:00
container_create_volume_test.go e2e: more ExitCleanly(): low-hanging fruit 2023-09-12 06:21:00 -06:00
container_inspect_test.go e2e: more ExitCleanly(): low-hanging fruit 2023-09-12 06:21:00 -06:00
containers_conf_test.go Automatic code cleanups - JetBrains 2023-11-07 14:05:15 -06:00
cp_test.go e2e: more ExitCleanly(): low-hanging fruit 2023-09-12 06:21:00 -06:00
create_staticip_test.go e2e: more ExitCleanly(): low-hanging fruit 2023-09-12 06:21:00 -06:00
create_staticmac_test.go e2e: more ExitCleanly(): low-hanging fruit 2023-09-12 06:21:00 -06:00
create_test.go CI: e2e: fix a smattering of test bugs that slipped in 2023-11-10 13:41:34 -07:00
diff_test.go e2e: diff_test: use ExitCleanly() 2023-09-12 13:47:35 -06:00
events_test.go lint: fix warnings found by perfsprint 2023-10-20 16:27:46 +02:00
exec_test.go unbreak CI: useradd not found 2023-09-25 11:48:35 +02:00
exists_test.go e2e: ExitCleanly(): low-hanging fruit, part 1 2023-09-19 10:26:06 -06:00
export_test.go e2e: ExitCleanly(): the final fron^Wcommit 2023-09-27 16:04:59 -06:00
farm_test.go Fix farm update to check for connections 2023-09-22 15:16:21 -04:00
generate_kube_test.go e2e: ExitCleanly(): generate_kube_test.go 2023-09-20 14:41:41 -06:00
generate_spec_test.go e2e: more ExitCleanly(): dumb string replacements 2023-09-12 19:16:18 -06:00
generate_systemd_test.go test/e2e: use GinkgoT().TempDir() over MkdirTemp() 2023-07-05 10:40:26 +02:00
healthcheck_run_test.go Automatic code cleanups - JetBrains 2023-11-07 14:05:15 -06:00
history_test.go image history: fix walking layers 2023-10-18 09:19:24 +02:00
image_scp_test.go e2e: more ExitCleanly(): dumb string replacements 2023-09-12 19:16:18 -06:00
image_sign_test.go e2e: more ExitCleanly(): dumb string replacements 2023-09-12 19:16:18 -06:00
images_test.go CI: stop using registry.k8s.io 2023-10-23 11:50:41 -06:00
import_test.go e2e: more ExitCleanly(): manual test fixes 2023-09-12 21:07:11 -06:00
info_test.go CI: test overlay and vfs 2023-11-17 05:48:50 -07:00
init_test.go e2e: continuing ExitCleanly(): just the replacements 2023-09-14 10:12:44 -06:00
inspect_test.go Support passing of Ulimits as -1 to mean max 2023-11-01 08:46:55 -04:00
kill_test.go e2e: continuing ExitCleanly(): just the replacements 2023-09-14 10:12:44 -06:00
libpod_suite_remote_test.go test/e2e: wait for socket 2023-07-10 17:27:11 +02:00
libpod_suite_test.go test/e2e: switch to GinkgoWriter 2023-05-02 11:27:38 +02:00
load_test.go e2e: ExitCleanly(): manual fixes to get tests passing 2023-09-22 06:10:02 -06:00
login_logout_test.go Add support for --compat-auth-file in login/logout 2023-11-17 16:44:06 +01:00
logs_test.go CI VMs: bump to f39 + f38 2023-09-28 11:22:58 -06:00
manifest_test.go test, manifest: test push retry 2023-10-03 20:38:02 +05:30
mount_rootless_test.go e2e: ExitCleanly(): manual test fixes 2023-09-14 10:12:44 -06:00
mount_test.go e2e: continuing ExitCleanly(): just the replacements 2023-09-14 10:12:44 -06:00
negative_test.go test/e2e: dedup Before/AfterEach nodes 2023-05-15 16:56:18 +02:00
network_connect_disconnect_test.go e2e: ExitCleanly(): low-hanging fruit, part 1 2023-09-19 10:26:06 -06:00
network_create_test.go e2e: continuing ExitCleanly() work: manual tweaks 2023-09-18 16:51:05 -06:00
network_test.go e2e: continuing ExitCleanly() work: manual tweaks 2023-09-18 16:51:05 -06:00
pause_test.go e2e: ExitCleanly(): low-hanging fruit, part 1 2023-09-19 10:26:06 -06:00
play_build_test.go Kube Play - set ReportWriter when building an image 2023-12-11 16:05:26 +05:30
play_kube_test.go Automatic code cleanups - JetBrains 2023-11-07 14:05:15 -06:00
pod_clone_test.go e2e: ExitCleanly(): low-hanging fruit, part 1 2023-09-19 10:26:06 -06:00
pod_create_test.go lint: fix warnings found by perfsprint 2023-10-20 16:27:46 +02:00
pod_infra_container_test.go Automatic code cleanups - JetBrains 2023-11-07 14:05:15 -06:00
pod_initcontainers_test.go e2e: use safe fedora-minimal image 2023-09-25 09:01:53 -06:00
pod_inspect_test.go e2e: ExitCleanly(): low-hanging fruit, part 1 2023-09-19 10:26:06 -06:00
pod_kill_test.go e2e: ExitCleanly(): low-hanging fruit, part 1 2023-09-19 10:26:06 -06:00
pod_pause_test.go e2e: ExitCleanly(): low-hanging fruit, part 1 2023-09-19 10:26:06 -06:00
pod_pod_namespaces_test.go e2e: ExitCleanly(): low-hanging fruit, part 1 2023-09-19 10:26:06 -06:00
pod_prune_test.go e2e: ExitCleanly(): low-hanging fruit, part 1 2023-09-19 10:26:06 -06:00
pod_ps_test.go e2e: ExitCleanly(): low-hanging fruit, part 1 2023-09-19 10:26:06 -06:00
pod_restart_test.go e2e: ExitCleanly(): low-hanging fruit, part 1 2023-09-19 10:26:06 -06:00
pod_rm_test.go e2e: ExitCleanly(): low-hanging fruit, part 1 2023-09-19 10:26:06 -06:00
pod_start_test.go e2e: ExitCleanly(): low-hanging fruit, part 1 2023-09-19 10:26:06 -06:00
pod_stats_test.go e2e: ExitCleanly(): low-hanging fruit, part 1 2023-09-19 10:26:06 -06:00
pod_stop_test.go e2e: ExitCleanly(): low-hanging fruit, part 1 2023-09-19 10:26:06 -06:00
pod_top_test.go e2e: ExitCleanly(): low-hanging fruit, part 1 2023-09-19 10:26:06 -06:00
port_test.go e2e: ExitCleanly(): low-hanging fruit, part 1 2023-09-19 10:26:06 -06:00
prune_test.go e2e: ExitCleanly(): low-hanging fruit, part 1 2023-09-19 10:26:06 -06:00
ps_test.go e2e: ExitCleanly(): low-hanging fruit, part 2 2023-09-19 10:26:06 -06:00
pull_test.go Update tests for a c/common error message change 2023-11-17 16:44:06 +01:00
push_test.go e2e: ExitCleanly(): manual fixes to get tests passing 2023-09-22 06:10:02 -06:00
quadlet_test.go Merge pull request #20671 from ygalblum/quadlet-uidmap 2023-11-16 15:40:37 +00:00
rename_test.go e2e: ExitCleanly(): low-hanging fruit, part 1 2023-09-19 10:26:06 -06:00
restart_test.go e2e: ExitCleanly(): manual special cases 2023-09-27 16:04:59 -06:00
rm_test.go e2e: ExitCleanly(): low-hanging fruit, part 1 2023-09-19 10:26:06 -06:00
rmi_test.go e2e: ExitCleanly(): low-hanging fruit, part 1 2023-09-19 10:26:06 -06:00
run_aardvark_test.go e2e: ExitCleanly(): more low-hanging fruit 2023-09-19 18:09:08 -06:00
run_apparmor_test.go e2e: ExitCleanly(): more low-hanging fruit 2023-09-19 18:09:08 -06:00
run_cgroup_parent_test.go e2e: ExitCleanly(): more low-hanging fruit 2023-09-19 18:09:08 -06:00
run_cleanup_test.go e2e: ExitCleanly(): more low-hanging fruit 2023-09-19 18:09:08 -06:00
run_cpu_test.go e2e: ExitCleanly(): more low-hanging fruit 2023-09-19 18:09:08 -06:00
run_device_test.go Automatic code cleanups - JetBrains 2023-11-07 14:05:15 -06:00
run_dns_test.go e2e: ExitCleanly(): more low-hanging fruit 2023-09-19 18:09:08 -06:00
run_entrypoint_test.go e2e: ExitCleanly(): more low-hanging fruit 2023-09-19 18:09:08 -06:00
run_env_test.go e2e: ExitCleanly(): more low-hanging fruit 2023-09-19 18:09:08 -06:00
run_exit_test.go e2e: ExitCleanly(): more low-hanging fruit 2023-09-19 18:09:08 -06:00
run_memory_test.go e2e: ExitCleanly(): more low-hanging fruit 2023-09-19 18:09:08 -06:00
run_networking_test.go lint: fix warnings found by perfsprint 2023-10-20 16:27:46 +02:00
run_ns_test.go e2e: ExitCleanly(): more low-hanging fruit 2023-09-19 18:09:08 -06:00
run_passwd_test.go Automatic code cleanups - JetBrains 2023-11-07 14:05:15 -06:00
run_privileged_test.go e2e: ExitCleanly(): more low-hanging fruit 2023-09-19 18:09:08 -06:00
run_restart_test.go e2e: ExitCleanly(): more low-hanging fruit 2023-09-19 18:09:08 -06:00
run_seccomp_test.go e2e: ExitCleanly(): more low-hanging fruit 2023-09-19 18:09:08 -06:00
run_security_labels_test.go e2e: ExitCleanly(): manual special cases 2023-09-27 16:04:59 -06:00
run_selinux_test.go e2e: ExitCleanly(): more low-hanging fruit 2023-09-19 18:09:08 -06:00
run_signal_test.go e2e: ExitCleanly(): more low-hanging fruit 2023-09-19 18:09:08 -06:00
run_staticip_test.go e2e: ExitCleanly(): more low-hanging fruit 2023-09-19 18:09:08 -06:00
run_test.go Test fixes for debian 2023-11-16 15:14:36 -07:00
run_transient_test.go e2e: ExitCleanly(): more low-hanging fruit 2023-09-19 18:09:08 -06:00
run_userns_test.go lint: fix warnings found by perfsprint 2023-10-20 16:27:46 +02:00
run_volume_test.go unbreak CI: useradd not found 2023-09-25 11:48:35 +02:00
run_working_dir_test.go e2e: ExitCleanly(): more low-hanging fruit 2023-09-19 18:09:08 -06:00
runlabel_test.go e2e: ExitCleanly(): manual fixes to get tests working 2023-09-26 08:47:16 -06:00
save_test.go e2e: ExitCleanly(): manual fixes to get tests passing 2023-09-22 06:10:02 -06:00
search_test.go (Temporary) Emergency CI fix: quay search is broken 2023-11-13 06:52:10 -07:00
secret_test.go e2e: ExitCleanly(): low-hanging fruit, part 1 2023-09-19 10:26:06 -06:00
start_test.go e2e: ExitCleanly(): low-hanging fruit, part 1 2023-09-19 10:26:06 -06:00
stats_test.go CI VMs: bump to f39 + f38 2023-09-28 11:22:58 -06:00
stop_test.go e2e: ExitCleanly(): low-hanging fruit, part 2 2023-09-19 10:26:06 -06:00
system_connection_test.go e2e: ExitCleanly(): manual special cases 2023-09-27 16:04:59 -06:00
system_df_test.go e2e: ExitCleanly(): low-hanging fruit, part 1 2023-09-19 10:26:06 -06:00
system_dial_stdio_test.go e2e: ExitCleanly(): more low-hanging fruit 2023-09-19 18:09:08 -06:00
system_reset_test.go Remove Libpod special-init conditions 2024-01-15 12:14:17 -05:00
system_service_test.go test/e2e: dedup Before/AfterEach nodes 2023-05-15 16:56:18 +02:00
systemd_activate_test.go e2e: ExitCleanly(): the final fron^Wcommit 2023-09-27 16:04:59 -06:00
systemd_test.go e2e: ExitCleanly(): the final fron^Wcommit 2023-09-27 16:04:59 -06:00
tag_test.go e2e: ExitCleanly(): low-hanging fruit, part 1 2023-09-19 10:26:06 -06:00
toolbox_test.go Automatic code cleanups - JetBrains 2023-11-07 14:05:15 -06:00
top_test.go Fix output of podman --remote top 2023-10-16 17:25:10 -04:00
tree_test.go e2e: ExitCleanly(): low-hanging fruit, part 1 2023-09-19 10:26:06 -06:00
trust_test.go e2e: ExitCleanly(): more low-hanging fruit 2023-09-19 18:09:08 -06:00
unshare_test.go e2e: ExitCleanly(): more low-hanging fruit 2023-09-19 18:09:08 -06:00
untag_test.go e2e: ExitCleanly(): low-hanging fruit, part 1 2023-09-19 10:26:06 -06:00
update_test.go e2e: ExitCleanly(): more low-hanging fruit 2023-09-19 18:09:08 -06:00
version_test.go e2e: ExitCleanly(): low-hanging fruit, part 1 2023-09-19 10:26:06 -06:00
volume_create_test.go e2e: ExitCleanly(): more low-hanging fruit 2023-09-19 18:09:08 -06:00
volume_exists_test.go e2e: ExitCleanly(): more low-hanging fruit 2023-09-19 18:09:08 -06:00
volume_inspect_test.go e2e: ExitCleanly(): more low-hanging fruit 2023-09-19 18:09:08 -06:00
volume_ls_test.go e2e: ExitCleanly(): more low-hanging fruit 2023-09-19 18:09:08 -06:00
volume_plugin_test.go e2e: ExitCleanly(): more low-hanging fruit 2023-09-19 18:09:08 -06:00
volume_prune_test.go e2e: ExitCleanly(): more low-hanging fruit 2023-09-19 18:09:08 -06:00
volume_rm_test.go e2e: ExitCleanly(): more low-hanging fruit 2023-09-19 18:09:08 -06:00
wait_test.go e2e: ExitCleanly(): low-hanging fruit, part 1 2023-09-19 10:26:06 -06:00