Matthew Heon
046c0e5fc2
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-22 17:47:01 -04:00
..
2023-02-03 08:42:20 -06:00
2024-04-25 22:17:06 +02:00
2023-11-23 20:07:48 +02:00
2024-01-23 07:28:40 -05:00
2023-08-22 16:19:06 +02:00
2024-02-19 08:58:17 -05:00
2024-02-19 08:53:38 -05:00
2023-08-02 15:01:16 +01:00
2023-07-24 19:23:04 +02:00
2023-05-28 18:57:43 +02:00
2023-05-16 15:10:33 -04:00
2024-02-19 15:18:51 -05:00
2023-05-16 15:10:33 -04:00
2023-05-16 15:10:33 -04:00
2024-01-23 07:28:40 -05:00
2024-02-19 15:18:51 -05:00
2023-07-23 17:31:29 +02:00
2023-07-23 17:31:29 +02:00
2023-05-28 18:57:43 +02:00
2024-02-19 15:19:40 -05:00
2024-02-29 10:20:21 -05:00
2024-02-19 15:53:03 -05:00
2024-04-17 08:23:50 -04:00
2024-02-17 13:54:14 -05:00
2024-02-18 12:26:33 -05:00
2024-02-18 08:02:29 -05:00
2024-02-18 08:02:29 -05:00
2024-02-18 08:02:29 -05:00
2024-02-18 08:02:29 -05:00
2024-02-18 08:02:29 -05:00
2024-02-08 18:05:32 +01:00
2023-05-16 15:10:33 -04:00
2024-03-11 09:03:36 +01:00
2023-08-03 06:58:53 -04:00
2024-02-17 13:54:15 -05:00
2022-09-06 09:37:13 -07:00
2024-02-20 05:38:19 -05:00
2024-02-18 07:41:47 -05:00
2024-02-18 07:41:47 -05:00
2024-02-18 07:41:47 -05:00
2024-02-18 07:41:47 -05:00
2024-02-18 07:41:47 -05:00
2024-02-18 07:41:47 -05:00
2023-05-18 16:44:24 -07:00
2024-02-18 07:41:47 -05:00
2024-02-18 07:41:47 -05:00
2024-02-18 07:41:47 -05:00
2023-05-28 18:57:43 +02:00
2024-02-20 05:39:27 -05:00
2024-02-18 12:26:33 -05:00
2024-02-17 13:54:19 -05:00
2024-01-23 07:28:40 -05:00
2024-02-20 05:45:41 -05:00
2024-02-19 10:06:05 -05:00
2023-11-06 14:53:35 +01:00
2023-05-16 15:10:33 -04:00
2024-02-20 14:58:35 -08:00
2024-04-25 14:12:27 -04:00
2024-04-04 09:28:21 -04:00
2024-01-25 15:59:18 -07:00
2024-03-28 13:04:47 -04:00
2024-02-18 19:10:40 -05:00
2023-07-24 11:18:25 +02:00
2024-01-23 07:28:40 -05:00
2024-02-29 13:38:43 -05:00
2024-05-17 17:53:28 +09:00
2024-01-23 07:28:40 -05:00
2024-01-23 07:28:40 -05:00
2023-02-15 14:48:12 -05:00
2024-02-18 08:43:12 -06:00
2024-01-23 07:28:40 -05:00
2024-01-23 07:28:40 -05:00
2024-01-23 07:28:40 -05:00
2024-01-23 07:28:40 -05:00
2024-01-23 07:28:40 -05:00
2024-02-18 08:43:12 -06:00
2024-02-29 11:47:44 -05:00
2024-02-29 11:47:44 -05:00
2024-02-29 11:47:44 -05:00
2024-02-17 13:54:04 -05:00
2024-01-23 07:28:40 -05:00
2024-02-17 13:54:04 -05:00
2024-02-17 13:54:04 -05:00
2024-01-27 19:03:35 -05:00
2024-02-29 11:47:44 -05:00
2024-02-19 15:22:23 -05:00
2024-02-18 07:48:08 -05:00
2024-02-05 13:57:24 +01:00
2024-02-18 07:48:08 -05:00
2024-02-18 07:48:08 -05:00
2024-02-28 16:33:26 +01:00
2024-02-18 07:48:08 -05:00
2024-02-18 07:48:08 -05:00
2024-02-18 07:48:08 -05:00
2024-02-18 07:48:08 -05:00
2024-02-18 07:48:08 -05:00
2023-11-06 10:45:59 +01:00
2024-02-18 12:42:07 -05:00
2024-01-30 14:59:02 +00:00
2024-01-30 14:59:02 +00:00
2024-02-19 10:03:30 -05:00
2024-02-19 10:03:30 -05:00
2024-02-19 10:03:30 -05:00
2024-02-19 10:03:30 -05:00
2024-02-19 10:03:30 -05:00
2024-01-23 07:28:40 -05:00
2024-01-23 07:28:40 -05:00
2024-04-18 19:53:33 -04:00
2024-02-19 10:03:30 -05:00
2024-02-19 10:03:30 -05:00
2024-02-19 10:03:30 -05:00
2024-01-23 07:28:40 -05:00
2024-01-23 07:28:40 -05:00
2024-02-19 10:03:30 -05:00
2023-05-28 18:57:43 +02:00
2024-02-20 05:46:41 -05:00
2024-04-10 14:24:23 +02:00
2024-04-21 19:46:39 -07:00
2024-02-29 10:20:21 -05:00
2023-09-17 07:37:14 -04:00
2024-01-23 07:28:40 -05:00
2024-01-23 07:28:40 -05:00
2024-02-17 13:54:24 -05:00
2023-05-28 18:57:43 +02:00
2024-02-29 10:20:21 -05:00
2024-01-23 07:28:40 -05:00
2024-02-05 11:37:01 -06:00
2024-02-24 19:00:54 +11:00
2023-05-16 15:10:33 -04:00
2024-01-23 07:28:40 -05:00
2024-03-22 15:11:29 +08:00
2024-01-23 07:28:40 -05:00
2023-04-03 15:33:50 +03:00
2024-02-17 13:54:25 -05:00
2024-02-20 05:49:04 -05:00
2024-01-23 07:28:40 -05:00
2024-02-20 08:18:51 -05:00
2024-02-20 08:18:51 -05:00
2024-02-20 08:18:51 -05:00
2024-02-20 08:18:51 -05:00
2024-02-20 08:18:51 -05:00
2024-02-20 08:18:51 -05:00
2024-02-20 08:18:51 -05:00
2023-05-16 15:10:33 -04:00
2023-09-18 07:41:28 -06:00
2023-05-16 15:10:33 -04:00
2024-01-23 07:28:40 -05:00
2024-01-23 07:28:40 -05:00
2023-05-28 18:57:43 +02:00
2024-05-08 16:00:28 +03:00
2024-01-23 07:28:40 -05:00
2024-01-23 07:28:40 -05:00
2024-02-19 15:22:23 -05:00
2024-02-18 12:42:07 -05:00
2024-02-17 13:54:29 -05:00
2024-01-23 07:28:40 -05:00
2024-04-17 08:23:51 -04:00
2022-09-15 09:59:32 -06:00
2024-04-03 10:18:49 +00:00
2023-05-16 15:10:33 -04:00
2024-01-23 07:28:40 -05:00
2024-01-23 07:28:40 -05:00
2024-05-22 17:47:01 -04:00
2024-01-23 07:28:40 -05:00
2024-02-19 10:09:06 -05:00
2024-01-23 07:28:40 -05:00
2024-01-23 07:28:40 -05:00
2024-01-23 07:28:40 -05:00
2024-02-19 10:09:06 -05:00
2023-05-28 18:57:43 +02:00
2024-01-25 15:59:18 -07:00
2024-04-17 08:23:50 -04:00
2023-09-30 17:33:17 +05:30