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

Is there any way to override the storage.conf options? #7309

Closed
ziXet opened this issue Aug 12, 2020 · 9 comments
Closed

Is there any way to override the storage.conf options? #7309

ziXet opened this issue Aug 12, 2020 · 9 comments
Assignees
Labels
kind/feature Categorizes issue or PR as related to a new feature. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. stale-issue

Comments

@ziXet
Copy link

ziXet commented Aug 12, 2020

I would like to run some podman commands with different options in the storage.conf.

Without this option I need to use "sed" to comment and uncomment specific lines in the storage.conf before and after running my special podman command which is not ideal with multiprocessing.

I'd prefer to run something like this:
podman image pull --storage storage.options.additionalimagestores=["/storage"]

Is it possible?

@giuseppe
Copy link
Member

podman --storage-opt...? Is that what you would like to use?

@ziXet
Copy link
Author

ziXet commented Aug 12, 2020

podman --storage-opt...? Is that what you would like to use?

Thanks for the response.
I would like to override the value of additionalimagestores in the storage.conf. I think --storage-opt is for overriding "storage driver options".

Please correct me if I'm wrong

@giuseppe
Copy link
Member

I think you are right. I don't see a way to change the additionalimagestores using --storage-opt.

Anyway, I think that allowing a different additionalimagestores per container could cause some issues. For example how would we find the image referred by the container if the stores can change? We would need to store the configuration per each container

@ziXet
Copy link
Author

ziXet commented Aug 13, 2020

My use case is a bit special. I would like to pull the images to the additional storage using:
podman image pull myimage:v1 --root /storage
If I run this command while I have additionalstorage=['/storage'] in my storage.conf, I get this error:
Error: lock "/storage/overlay-images/images.lock" is not a read-only lock
To solve this issue, I need to set the additionalstorage=[] or comment it out. after pulling a readonly image, I can put the '/storage' back to the additionalstorage.

@rhatdan
Copy link
Member

rhatdan commented Aug 13, 2020

I am working on a better fix for this, but this will work.

podman image pull myimage:v1 --storage-opt=overlay.mountopt=nodev --root /storage

@ziXet
Copy link
Author

ziXet commented Aug 13, 2020

I am working on a better fix for this, but this will work.

podman image pull myimage:v1 --storage-opt=overlay.mountopt=nodev --root /storage

Thanks Dan! it actually worked!

@rhatdan
Copy link
Member

rhatdan commented Sep 11, 2020

I have a PR for this, just need to get it merged.

@rhatdan rhatdan self-assigned this Oct 7, 2020
@rhatdan rhatdan added the kind/feature Categorizes issue or PR as related to a new feature. label Oct 7, 2020
@github-actions
Copy link

github-actions bot commented Nov 7, 2020

A friendly reminder that this issue had no activity for 30 days.

@rhatdan
Copy link
Member

rhatdan commented Nov 7, 2020

This is now fixed in master branch.

@rhatdan rhatdan closed this as completed Nov 7, 2020
@github-actions github-actions bot added the locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. label Sep 22, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 22, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
kind/feature Categorizes issue or PR as related to a new feature. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. stale-issue
Projects
None yet
Development

No branches or pull requests

3 participants