spiegel_podman/pkg
Valentin Rothberg 6293ec2e2d fix handling of static/volume dir
The processing and setting of the static and volume directories was
scattered across the code base (including c/common) leading to subtle
errors that surfaced in #19938.

There were multiple issues that I try to summarize below:

 - c/common loaded the graphroot from c/storage to set the defaults for
   static and volume dir.  That ignored Podman's --root flag and
   surfaced in #19938 and other bugs.  c/common does not set the
   defaults anymore which gives Podman the ability to detect when the
   user/admin configured a custom directory (not empty value).

 - When parsing the CLI, Podman (ab)uses containers.conf structures to
   set the defaults but also to override them in case the user specified
   a flag.  The --root flag overrode the static dir which is wrong and
   broke a couple of use cases.  Now there is a dedicated field for in
   the "PodmanConfig" which also includes a containers.conf struct.

 - The defaults for static and volume dir and now being set correctly
   and adhere to --root.

 - The CONTAINERS_CONF_OVERRIDE env variable has not been passed to the
   cleanup process.  I believe that _all_ env variables should be passed
   to conmon to avoid such subtle bugs.

Overall I find that the code and logic is scattered and hard to
understand and follow.  I refrained from larger refactorings as I really
just want to get #19938 fixed and then go back to other priorities.

https://github.com/containers/common/pull/1659 broke three pkg/machine
tests.  Those have been commented out until getting fixed.

Fixes: #19938
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2023-09-25 14:14:30 +02:00
..
annotations Remove ReservedAnnotations from kube generate specification 2023-01-18 08:46:24 -05:00
api compat API: speed up network list 2023-09-20 13:08:42 +02:00
auth fix(deps): update module github.com/docker/docker to v24 2023-05-22 15:32:12 +02:00
autoupdate auto update: fix usage of --authfile 2023-07-05 08:30:39 +02:00
bindings vendor of containers/common 2023-09-20 08:39:49 -04:00
channel bump golangci-lint to v1.50.1 2022-12-15 13:39:56 +01:00
checkpoint Merge pull request #19951 from Luap99/small-remote 2023-09-14 15:27:45 +02:00
copy pkg: switch to golang native error wrapping 2022-07-08 08:54:47 +02:00
criu vendor: update checkpointctl to v1.1.0 2023-09-12 08:41:02 +01:00
ctime Replace deprecated ioutil 2022-09-20 15:34:27 -04:00
domain fix handling of static/volume dir 2023-09-25 14:14:30 +02:00
env fix(env): parsing --env incorrect in cli 2023-08-09 18:52:30 +08:00
errorhandling Fix typos 2023-02-11 18:23:24 +01:00
inspect pkg/inspect: remove unused ImageResult type 2022-05-24 16:07:39 +02:00
k8s.io kube: add DaemonSet support for generate 2023-09-12 10:30:57 +05:30
lookup source code comments and docs: fix typos, language, Markdown layout 2023-05-22 07:52:16 +02:00
machine Merge pull request #20115 from baude/hypervstarting 2023-09-24 19:24:50 -04:00
namespaces source code comments and docs: fix typos, language, Markdown layout 2023-05-22 07:52:16 +02:00
parallel Fix stutters 2022-09-10 07:52:00 -04:00
ps Cleanup CIDFile on podman-remote run --rm command 2023-08-01 14:24:55 -04:00
rctl pkg/rctl: Remove unused cgo dependency 2022-10-31 15:13:48 +00:00
rootless add a podman-compose command 2023-07-24 19:23:04 +02:00
seccomp pkg: switch to golang native error wrapping 2022-07-08 08:54:47 +02:00
selinux Fix SELinux functions names to not be repetitive 2020-04-23 15:57:34 -04:00
signal Run codespell on code 2022-11-04 10:57:41 -04:00
specgen specgen, rootless: fix mount of cgroup without a netns 2023-09-21 13:20:09 +02:00
specgenutil Add support for ramfs as well as tmpfs in volume mounts 2023-08-21 07:14:57 -04:00
strongunits introduce pkg/strongunits 2023-09-20 11:19:41 -05:00
systemd Automatically remove anonymous volumes when removing a container 2023-09-21 07:08:08 -04:00
terminal podman ssh work, using new c/common interface 2022-08-09 14:00:58 -04:00
timetype bump golangci-lint to v1.49.0 2022-10-17 09:19:41 +02:00
trust Revert the usage of home.GetConfigHome() 2023-07-17 18:29:06 +02:00
util uid/gid mapping flags 2023-08-28 20:21:04 +02:00