Skip to content
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

podman pull writes to read only additional image store #22784

Open
ankurmalhotra07 opened this issue May 22, 2024 · 3 comments
Open

podman pull writes to read only additional image store #22784

ankurmalhotra07 opened this issue May 22, 2024 · 3 comments
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@ankurmalhotra07
Copy link

ankurmalhotra07 commented May 22, 2024

Issue Description

Describe your issue
I have created a read-only directory that will be used as an additional image store ('/var/lib/mycontainers')
However, when I try to pull an image, it throws the following error:
Error: creating lock file directory: mkdir /var/lib/mycontainers/overlay-images: read-only file system
script returned exit code 125

Steps to reproduce the issue

Steps to reproduce the issue
1.mkdir /var/lib/mycontainers
2. podman pull --storage-opt additionalimagestore=/var/lib/mycontainers alpine

Describe the results you received

Error: creating lock file directory: mkdir /var/lib/mycontainers/overlay-images: read-only file system

Describe the results you expected

podman pulls image to primary storage, reusing layers from additional image store. The lock file should only be created in primary storage, not additional image stores which are meant to be read-only

podman info output

Version v4.9

Podman in a container

Yes

Privileged Or Rootless

Privileged

Upstream Latest Release

Yes

Additional environment details

Additional environment details

Additional information

Additional information like issue happens only occasionally or issue happens with a particular architecture or on a particular setting

@ankurmalhotra07 ankurmalhotra07 added the kind/bug Categorizes issue or PR as related to a bug. label May 22, 2024
@ankurmalhotra07
Copy link
Author

@giuseppe do you know if the above is a bug? Its a blocker for our use case

@rhatdan
Copy link
Member

rhatdan commented May 22, 2024

You need to precreate the lock files in the additional store.

@ankurmalhotra07
Copy link
Author

ankurmalhotra07 commented May 23, 2024

We have a cron job that would populate the additional storage on the node but it might not be ready before client calls podman pull. Can you explain what's the purpose of that lock file?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

No branches or pull requests

2 participants