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

[additionalimagestores] Rename image ls 'R/O' column and show store path #10391

Closed
srcshelton opened this issue May 18, 2021 · 13 comments
Closed
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.

Comments

@srcshelton
Copy link
Contributor

Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)

/kind feature

Description

Right now, when additionalimagestores is set and any image exists in one of the defined additional stores, the output of podman image ls gains a R/O column:

$ podman image ls
REPOSITORY                             TAG        IMAGE ID      CREATED         SIZE     R/O
localhost/gentoo-build-root            latest     c2c952975d5e  26 seconds ago  680 MB   true
localhost/gentoo-base                  latest     3796c18e4e0b  32 hours ago    1.56 GB  false
localhost/service.net-dns.bind         9.16.12    1abeea31ed8d  2 days ago      351 MB   false

However, these additional images aren't actually read-only (although they do need additional command-line options to access) and there is no indication of which store the additional images have been discovered in - simply that they exist.

My suggestion is to rename R/O to STORE, and change the value from a simple boolean to main (or graphRoot, or the graphRoot path?) or the path of the defined additional imagestore in which the image exists, e.g.:

$ podman image ls
REPOSITORY                             TAG        IMAGE ID      CREATED         SIZE     STORE
localhost/gentoo-build-root            latest     c2c952975d5e  26 seconds ago  680 MB   main
localhost/gentoo-base                  latest     3796c18e4e0b  32 hours ago    1.56 GB  /storage/images
localhost/service.net-dns.bind         9.16.12    1abeea31ed8d  2 days ago      351 MB   /storage/build

For context see #9852.

@rhatdan
Copy link
Member

rhatdan commented May 19, 2021

I am fine with adding the additional field, but adding a path will make the display difficult. I usually use /var/lib/shared. I still believe we should treat the additional store as read/only for the point of view of the current store. If the user wants to modify the additional store, they will need to make it primary.

@srcshelton
Copy link
Contributor Author

Displaying a path is difficult due to the potential length or formatting issues, or because the store location isn't readily available to the code rendering the output?

Is there any link back to the storage location of the image? If the path is inaccessible, then if possible even a counter:

$ podman image ls
REPOSITORY                             TAG        IMAGE ID      CREATED         SIZE     STORE
localhost/gentoo-build-root            latest     c2c952975d5e  26 seconds ago  680 MB   1
localhost/gentoo-base                  latest     3796c18e4e0b  32 hours ago    1.56 GB  2
localhost/service.net-dns.bind         9.16.12    1abeea31ed8d  2 days ago      351 MB   2
localhost/service.net-im.bitlbee       3.6-r1     51436d6982b3  3 weeks ago     101 MB   3

… would at least give some indication of where the image is (although without a means to get a store location to number mapping, it's not a huge improvement…)

Consider the use-case:

… so there may be a cleverer solution, but without this enhancement is looks to me as if the only option is to loop over every image store with the --root option until one is found where the image is listed in the primary store?!

@rhatdan
Copy link
Member

rhatdan commented May 19, 2021

I think it would be best to leak the information in containers/storage into the image struct. Then you would have access to it in podman.

@github-actions
Copy link

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

@baude
Copy link
Member

baude commented Jul 2, 2021

@vrothberg wdyt here? is this something we can efficiently do in our image lib?

@baude
Copy link
Member

baude commented Jul 2, 2021

could we just consider putting image stores in something like podman info ? less costly?

@rhatdan rhatdan self-assigned this Jul 4, 2021
@rhatdan
Copy link
Member

rhatdan commented Jul 4, 2021

That would not solve the issue of where does this specific image come from.

I will take a look at this.

@github-actions
Copy link

github-actions bot commented Aug 4, 2021

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

@rhatdan
Copy link
Member

rhatdan commented Aug 4, 2021

podman info
...
    overlay.imagestore: /var/lib/shared

Now displays the image store. Not sure if we can do much better.

@github-actions
Copy link

github-actions bot commented Sep 4, 2021

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

@vrothberg
Copy link
Member

@vrothberg wdyt here? is this something we can efficiently do in our image lib?

Apologies for missing the ping. Yes, I am sure we can assemble the storage path in libimage.

@github-actions
Copy link

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

@rhatdan
Copy link
Member

rhatdan commented Mar 10, 2022

Since podman info will show the additional store, I think that is good enough.

@rhatdan rhatdan closed this as completed Mar 10, 2022
@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 20, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 20, 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.
Projects
None yet
Development

No branches or pull requests

4 participants