-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
"Error: lock … is not a read-only lock" failure with additionalimagestores
set
#9852
Comments
@rhatdan PTAL |
I've realised that if I pull in image into the primary storage location, terminate all container-related processes, replace the entire additional storage location tree with a copy of the primary one, and then attempt to launch containers then I can start containers from either location successfully. However, attempting to pull into the additional storage location or to commit a container to this location as an image fails with the above locking error. (I realise that the additional location is marked as 'read only' in, for example, |
I think you need to tell podman to not use the additional store if you are updating it directly. Could you attempt to override the mountoptions when you are updating? |
I'm not entirely sure how I'd do that 😯... something like:
? If it helps, I was looking at https://www.redhat.com/sysadmin/image-stores-podman... has this intentionally changed since the article was written? Update:
... doesn't seem to help :( |
(I'll admit, I'm not sure what the
... with the same result.) |
I am working on multiple fixes for you. With this change you would be able to do. STORAGE_OPTS= ./bin/podman --root /var/lib/shared pull alpine |
We define in the man page that this overrides the default storage options, but the code was appending to the existing options. This PR also makes a change to allow users to specify --storage-opt="". This will turn off all storage options. containers#9852 Signed-off-by: Daniel J Walsh <[email protected]>
additionalstorage
setadditionalimagestores
set
I've applied the patch above, and whilst it helps I think there are edge-cases which aren't yet addressed… It feels as if it would be helpful, as per my comment on #9911, if use of the I'm not sure if there's a command-line option (via In my particular case, I have a multi-stage build where an image is built from a Containerfile, this image is then run and the There doesn't appear to be a way even after the above patch to take a container run with one The eventual aim here is to have an amount of RAM carved-out as a block device, with the filesystem on this ramdisk used as the default With the above patch, Also, image operations would be more obvious if they applied across all currently specified
… when referring to the ID of the image specifically, I'd expect that the extra paths would also be searched and the first of these two removal commands to have succeeded. |
(It looks as if Skopeo also hasn't been updated to handle |
This may well be my mistake, but I've just noticed that I in my current working directory I have:
… which suggests that something somewhere has misinterpreted a path enclosed in quotes as starting and ending with literal quote characters. |
We define in the man page that this overrides the default storage options, but the code was appending to the existing options. This PR also makes a change to allow users to specify --storage-opt="". This will turn off all storage options. containers#9852 Signed-off-by: Daniel J Walsh <[email protected]>
We define in the man page that this overrides the default storage options, but the code was appending to the existing options. This PR also makes a change to allow users to specify --storage-opt="". This will turn off all storage options. containers#9852 Signed-off-by: Daniel J Walsh <[email protected]>
A friendly reminder that this issue had no activity for 30 days. |
@srcshelton Any further update on this? Do you still believe this is a Podman issue? |
As I've detailed in my three preceding comments, this never worked for me :( I was able to run containers from images in a separate store, but was never able to pull images to any additional store through manipulation of command-line arguments ( I'm awaiting feedback on what else I might try, or for further patches to enhance or fix this feature. |
Have you tried with the latest podman?
|
So, definitely an improvement: I can:
I doesn't appear possible to:
My suggestions would be:
See #10393. Do we have a solution to the original issue, above, of:
e.g. how can an image and container running from the main |
See #10394.
See #10391. |
See #10392. |
You are making too many suggestions in the same issue... Anyways, I am thinking --root implying --storage-opt="" makes some sense, since this was fairly difficult to discover. The original concept for --additional-stores was to serve them off of a network based file system, and allowing clients to modify them makes no sense, since they were likely to be share by other clients, and having images disappear would cause breakages in the other clients. |
Happy to break things out into separate issues if it'd help! |
… and I realise that this is a different use-case for the same feature - the question is whether it's a use-case you'd care to support. Obviously my suggestion would be it's so close to also meeting the (possibly unique?) use-case I have - but then, I'm biased ;) |
A friendly reminder that this issue had no activity for 30 days. |
Ran into the same issue. Running as root I get the error described here when not using the
Adding the option resolves the error for root:
However for a regular user the error is still thrown:
I'm using podman 3.2.3 (RHEL 8.4)
|
this won't work, the unprivileged users won't be able to read any file in the shared store. One way to make it work is to specify Anyway this looks like a different issue, that would be better to track separately. Since the original issue seems to be solved and the conversation moved to a different feature/issue, I am closing it. Let's discuss the new feature, if still needed, in a new issue |
Giuseppe we need to work on a blog on how to set this up. |
Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)
/kind bug
Description
Possibly related to #7309, if I have
additionalstorage
set instorage.conf
I always get, e.g.:(and the same with
--storage-opt=overlay.mountopt=nodev
also specified, as suggested in the above issue)I've tried creating
images.lock
(andlayers.lock
) as empty files, and also copying over the (~64byte?) files from the default storage location.If I temporarily edit
containers.conf
to swap thegraphRoot
andadditionalstorage
paths and then re-run the failing command (which is actually:) and remove the
--root
option then the operation succeeds, but in the original default storage location rather than the original additional storage location.What is the correct process to follow if I wish to maintain multiple storage locations to differentiate between (effectively) ephemeral images and images which should have longer life-spans?
Output of
podman version
:Output of
podman info --debug
:Have you tested with the latest version of Podman and have you checked the Podman Troubleshooting Guide?
Yes
The text was updated successfully, but these errors were encountered: