spiegel_podman/vendor/github.com/containers/common/pkg/config
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
..
config.go fix handling of static/volume dir 2023-09-25 14:14:30 +02:00
config_darwin.go Update vendor of containers/(storage,image) 2023-07-24 10:35:59 -04:00
config_freebsd.go Update vendor of containers/(storage,image) 2023-07-24 10:35:59 -04:00
config_linux.go Update vendor of containers/(storage,image) 2023-07-24 10:35:59 -04:00
config_local.go vendor: bump c/image and c/common 2023-08-01 22:05:54 +05:30
config_remote.go vendor c/common@0ededd18a1 2022-03-18 15:18:30 +01:00
config_unsupported.go vendor c/common@0ededd18a1 2022-03-18 15:18:30 +01:00
config_windows.go Update vendor of containers/(storage,image) 2023-07-24 10:35:59 -04:00
containers.conf vendor: bump c/common to v0.56.1-0.20230919073449-d1d9d38d8282 2023-09-19 14:48:14 +05:30
containers.conf-freebsd vendor: bump c/common to v0.56.1-0.20230919073449-d1d9d38d8282 2023-09-19 14:48:14 +05:30
db_backend.go vendor c/common@852ca05a1f 2023-02-21 14:06:42 +01:00
default.go fix handling of static/volume dir 2023-09-25 14:14:30 +02:00
default_common.go update c/{common,image,storage} to latest 2023-06-13 16:27:51 +02:00
default_darwin.go add a podman-compose command 2023-07-24 19:23:04 +02:00
default_freebsd.go add a podman-compose command 2023-07-24 19:23:04 +02:00
default_linux.go vendor of containers/(common, storage, image) 2023-09-11 13:52:23 -04:00
default_unsupported.go add --module flag 2023-08-16 14:32:35 +02:00
default_windows.go add --module flag 2023-08-16 14:32:35 +02:00
modules.go add --module flag 2023-08-16 14:32:35 +02:00
new.go add --module flag 2023-08-16 14:32:35 +02:00
nosystemd.go vendor c/common@0ededd18a1 2022-03-18 15:18:30 +01:00
pod_exit_policy.go vendor c/common@main 2022-05-02 11:16:14 +02:00
pull_policy.go Vendor in containers/(storage,image, common, buildah) 2022-07-18 10:42:04 -04:00
systemd.go system df: fix image-size calculations 2022-10-19 11:20:41 +02:00