-
Notifications
You must be signed in to change notification settings - Fork 230
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Confusing features, and locking semantics, of Mount/Unmount #1379
Comments
Looking into this further, any mount/unmount call can modify |
Note, to self and others: Carefully distinguish
It’s just way too much to keep track of, especially without explicit documentation and language help (#1389 ). |
This should be fixed, it just seems too hard to do without breaking API (and performance). So, just be clear about that to warn future readers. It's tracked in containers#1379 . Signed-off-by: Miloslav Trmač <mitr@redhat.com>
#1346 adds an in-process lock to synchronize these accesses (and eliminates some of the other accesses); but that doesn’t fix the (Nothing at all changes about the unclear ability to mount layers from additional stores.) |
Podman mount and unmount are attempting to count how many times an image is mounted, thus the count.
This should end up with 2 mounts of the image.
Down to zero. And the overlay mount can actually be unmounted. I don't believe this is a solved problem, and I think we have some flakes in podman CI system, caused by miscounting the mounts. |
I’m not at all arguing against the existence of the mount count (and yes, it is stored in the “RunDir”). This issue primarily about the ability / inability / correctness of mounting layers from additional stores, and the correctness of the concurrency implementation. |
This should be fixed, it just seems too hard to do without breaking API (and performance). So, just be clear about that to warn future readers. It's tracked in containers#1379 . Signed-off-by: Miloslav Trmač <mitr@redhat.com>
This should be fixed, it just seems too hard to do without breaking API (and performance). So, just be clear about that to warn future readers. It's tracked in containers#1379 . Signed-off-by: Miloslav Trmač <mitr@redhat.com>
This should be fixed, it just seems too hard to do without breaking API (and performance). So, just be clear about that to warn future readers. It's tracked in containers#1379 . Signed-off-by: Miloslav Trmač <mitr@redhat.com>
This should be fixed, it just seems too hard to do without breaking API (and performance). So, just be clear about that to warn future readers. It's tracked in containers#1379 . Signed-off-by: Miloslav Trmač <mitr@redhat.com>
This should be fixed, it just seems too hard to do without breaking API (and performance). So, just be clear about that to warn future readers. It's tracked in containers#1379 . Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Currently, both
store.Mount
andstore.Unmount
only work with the primary layer store, and lock it for writing:storage/store.go
Line 2745 in 7de6744
storage/store.go
Line 2850 in 7de6744
as of e84b264 .
Meanwhile,
Diff
reads all layer stores, and locks for reading:storage/store.go
Line 2940 in 7de6744
But the two are related:
Diff
can trigger mounts/unmounts viastorage/layers.go
Line 1474 in 7de6744
overlay
, implementDiffGetter
Note that
Diff
is, AFAICS, the only way to possibly trigger a mount/unmount from an additional layer store.Meanwhile,
Mount
andUnmount
nowadays reject attempts to modify them from read-only (= additional) stores:storage/layers.go
Line 950 in 7de6744
storage/layers.go
Line 1000 in 7de6744
More curiously,
Mount
has an exception for read-only stores as of 0ef62ee , butUnmount
doesn’t have a corresponding exceptionDiff
, does not set the “read-only” option, so it doesn’t fit that exception at all.Questions:
Diff
is incorrect, orMount
/Unmount
is locking excessively. At least 0183a29 suggests that the intent was to make read-only layer store locks to be sufficient.@nalind @vrothberg @rhatdan ?
The text was updated successfully, but these errors were encountered: