storage: improve error message on image mount from r/o store#945
Conversation
| } | ||
| // check if the layer is in a read-only store, and return a better error message | ||
| for _, store := range lstores { | ||
| if err := store.startReading(); err != nil { |
There was a problem hiding this comment.
We already hold all of these locks; and due to the underlying implementation of sync.RWLock, it seems possible this might actually cause a deadlock.
There was a problem hiding this comment.
Read lock acquisition code removed.
For reference, existing lock was already acquired here
container-libs/storage/store.go
Line 2996 in 498ccd1
Signed-off-by: Michele Comignano <mcdev@playlinux.net>
|
This seems to have caused a regression in buildah tests podman-container-tools/buildah#6940 Since ErrLayerUnknown is no longer being returned buildah cannot catch that |
|
I propose a revert for now #965 |
This reverts commit 006839b. This is causes test failures in both podman and buildah tests[1]. The return error was changed so buildah can no longer match it. For the next podman release we need to vendor some pasta changes so we like a working container-libs. This can be reapplied once podman/buildah are known to work with this. #945 (comment) Signed-off-by: Paul Holzinger <pholzing@redhat.com>
|
If my understanding is correct, the changed error message slips away from the check at The failing check ultimately makes buildah exit with non-zero status, unlike what expected by the test at https://github.com/comick/buildah/blob/d1bb55d0dafd73be07ceb05e1d439dc2223650d1/tests/bud.bats#L9392 Compared to the original one, a more sophisticated change is needed. I see a couple options:
First option is certainly the easiest. What do you think? |
|
@comick The An earlier comment here points at podman-container-tools/buildah@a20e251 , and in that case recognizing the “trying to mount from a layer store” error instead of a misleading “image not found” would make sense. Either way, I think we’ll need a coordinated set of PRs, one here, and one in each of Buildah + Podman exercising the full test suite with the proposed update (and proposing/demonstrating/testing any other adjustments in the callers that may be necessary). |
The PR follows an analysis available in podman repository at podman-container-tools/podman#29001