spiegel_podman/docs/source
Matthew Heon 6ad6132987 Only stop chowning volumes once they're not empty
When an empty volume is mounted into a container, Docker will
chown that volume appropriately for use in the container. Podman
does this as well, but there are differences in the details. In
Podman, a chown is presently a one-and-done deal; in Docker, it
will continue so long as the volume remains empty. Mount into a
dozen containers, but never add content, the chown occurs every
time. The chown is also linked to copy-up; it will always occur
when a copy-up occurred, despite the volume now not being empty.
This PR changes our logic to (mostly) match Docker's.

For some reason, the chowning also stops if the volume is chowned
to root at any point. This feels like a Docker bug, but as they
say, bug for bug compatible.

In retrospect, using bools for NeedsChown and NeedsCopyUp was a
mistake. Docker isn't actually tracking this stuff; they're just
doing a copy-up and permissions change unconditionally as long as
the volume is empty. They also have the two linked as one
operation, seemingly, despite happening at very different times
during container init. Replicating that in our stateful system is
nontrivial, hence the need for the new CopiedUp field. Basically,
we never want to chown a volume with contents in it, except if
that data is a result of a copy-up that resulted from mounting
into the current container. Tracking who did the copy-up is the
easiest way to do this.

Fixes #22571

Signed-off-by: Matthew Heon <matthew.heon@pm.me>
2024-05-23 12:35:08 +00:00
..
_static Show API doc for several versions 2022-02-09 18:17:52 +01:00
locale/ja/LC_MESSAGES Use single persistent ssh key for all machines 2024-01-04 23:47:49 -05:00
markdown Only stop chowning volumes once they're not empty 2024-05-23 12:35:08 +00:00
Commands.rst xref-helpmsgs-manpages: cross-check Commands.rst 2024-03-18 09:09:25 -06:00
conf.py Add Japanese locale and translation of index 2023-08-31 13:53:48 +09:00
includes.rst [CI:DOCS] Fix GitHub URL to Podman logo 2021-07-21 11:22:01 -04:00
index.rst [CI:DOCS] Add link to podman py docs 2023-11-17 07:18:59 -05:00
Introduction.rst Fix broken code block markup in Introduction.rst 2023-10-26 18:51:45 +08:00
Reference.rst update API doc version to 5.0.0 2024-03-12 12:06:15 +01:00
Search.rst [CI:DOCS] Docs revamp. 2020-05-21 17:16:10 -04:00
Tutorials.rst [CI:DOCS] Tutorials.rst: add socket activation 2022-07-15 17:36:33 +02:00