oddities re: explanations for libpod.conf, mounts.conf, storage.conf
was trying to summarize the possibilities for config files: - mounts.conf - storage.conf - libpod.conf and ended up falling into a maze of twisty passages, all alike. (all this is based on packaged podman-1.7.0 on fedora 31). first, from "man podman", those three files are explained thusly: libpod.conf (/usr/share/containers/libpod.conf) libpod.conf is the configuration file for all tools using libpod to manage containers, when run as root. Administrators can override the defaults file by creating `/etc/containers/libpod.conf`. When Podman runs in rootless mode, the file `$HOME/.config/containers/libpod.conf` is created and replaces some fields in the system configuration file. mounts.conf (/usr/share/containers/mounts.conf) The mounts.conf file specifies volume mount directories that are automatically mounted inside containers when executing the `podman run` or `podman start` commands. Administrators can override the defaults file by creating `/etc/containers/mounts.conf`. When Podman runs in rootless mode, the file $HOME/.config/con‐ tainers/mounts.conf will override the default if it exists. Please refer to containers-mounts.conf(5) for further details. storage.conf (/etc/containers/storage.conf) storage.conf is the storage configuration file for all tools using containers/storage When Podman runs in rootless mode, the file `$HOME/.config/containers/storage.conf` is used instead of the system defaults. so the first inconsistency(?) is that the first two files have a possibly default version under /usr/share/containers, while storage.conf does not -- according to "man podman", the default file will be in /etc/containers. it's not clear why the inconsistency. the next oddity is that the first two files are contributed by two different fedora packages: $ rpm -qf /usr/share/containers/libpod.conf podman-1.7.0-2.fc31.x86_64 $ rpm -qf /usr/share/containers/mounts.conf containers-common-0.1.40-4.fc31.x86_64 that may not sound like a big deal but it does allow for some inconsistency in how those two packages either supply or explain things, which is what you see when you "man containers-storage.conf": Distributions often provide a /usr/share/containers/stor‐ age.conf file to define default storage configuration. Adminis‐ trators can override this file by creating /etc/contain‐ ers/storage.conf to specify their own configuration. The stor‐ age.conf file for rootless users is stored in the $HOME/.con‐ fig/containers/storage.conf file. so "man podman" does *not* mention the possibility of /usr/share/containers/storage.conf, while "man containers-storage.conf" *does*. finally, i thought, "oh, just RTFS" to see what is really happening, and in libpod/config/config.go (amd i am *not* a go expert), it seems like libpod.conf is supported being under /usr/share/containers, but i don't see where the other two files (mounts.conf, storage.conf) are similarly supported, although i could be just misreading badly. i'm just trying to clarify the configuration file possibilities. rday
On 2020-01-30 09:44, Robert P. J. Day wrote:
was trying to summarize the possibilities for config files:
- mounts.conf - storage.conf - libpod.conf
and ended up falling into a maze of twisty passages, all alike. (all this is based on packaged podman-1.7.0 on fedora 31).
first, from "man podman", those three files are explained thusly:
libpod.conf (/usr/share/containers/libpod.conf)
libpod.conf is the configuration file for all tools using libpod to manage containers, when run as root. Administrators can override the defaults file by creating `/etc/containers/libpod.conf`. When Podman runs in rootless mode, the file `$HOME/.config/containers/libpod.conf` is created and replaces some fields in the system configuration file.
mounts.conf (/usr/share/containers/mounts.conf)
The mounts.conf file specifies volume mount directories that are automatically mounted inside containers when executing the `podman run` or `podman start` commands. Administrators can override the defaults file by creating `/etc/containers/mounts.conf`.
When Podman runs in rootless mode, the file $HOME/.config/con‐ tainers/mounts.conf will override the default if it exists. Please refer to containers-mounts.conf(5) for further details.
storage.conf (/etc/containers/storage.conf)
storage.conf is the storage configuration file for all tools using containers/storage
When Podman runs in rootless mode, the file `$HOME/.config/containers/storage.conf` is used instead of the system defaults.
so the first inconsistency(?) is that the first two files have a possibly default version under /usr/share/containers, while storage.conf does not -- according to "man podman", the default file will be in /etc/containers. it's not clear why the inconsistency.
I'm actually not sure why this is - per Dan Walsh, the paired config files in /usr/share and /etc are the way we want to handle all configs so I'm not sure why storage.conf isn't included in that list. Might be that it predates the policy?
the next oddity is that the first two files are contributed by two different fedora packages:
$ rpm -qf /usr/share/containers/libpod.conf podman-1.7.0-2.fc31.x86_64
$ rpm -qf /usr/share/containers/mounts.conf containers-common-0.1.40-4.fc31.x86_64
This is largely because libpod.conf is only for Podman, while the other files (storage.conf, mounts.conf) are used by Buildah as well.
that may not sound like a big deal but it does allow for some inconsistency in how those two packages either supply or explain things, which is what you see when you "man containers-storage.conf":
Distributions often provide a /usr/share/containers/stor‐ age.conf file to define default storage configuration. Adminis‐ trators can override this file by creating /etc/contain‐ ers/storage.conf to specify their own configuration. The stor‐ age.conf file for rootless users is stored in the $HOME/.con‐ fig/containers/storage.conf file.
so "man podman" does *not* mention the possibility of /usr/share/containers/storage.conf, while "man containers-storage.conf" *does*.
finally, i thought, "oh, just RTFS" to see what is really happening, and in libpod/config/config.go (amd i am *not* a go expert), it seems like libpod.conf is supported being under /usr/share/containers, but i don't see where the other two files (mounts.conf, storage.conf) are similarly supported, although i could be just misreading badly.
I know mounts.conf does support both locations, I've seen that code myself a while ago (though I can't for the life of me locate it now). I do not believe storage.conf has support now, but I'm not terribly familiar with containers/storage as a whole. Thanks, Matt Heon
i'm just trying to clarify the configuration file possibilities.
rday
_______________________________________________ Podman mailing list -- podman@lists.podman.io To unsubscribe send an email to podman-leave@lists.podman.io
participants (2)
-
Matt Heon -
Robert P. J. Day