-
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
"PodName" property in Containers object never filled by the Rest API #7214
Comments
Does the pod actually have a name? |
Sure, with sudo podman pod inspect I can see the Name property, I double verified now. |
The code is looking for a opts.Pod option to be set to get this information.
|
@rhatdan Oh right - my fault. The documentation clearly says it, https://podman.readthedocs.io/en/latest/_static/api.html#operation/libpodListContainers That opts.Pod should be set to get information about the pod (Id, Name) when listing containers. It was confusing because I did not set that parameter, but the PodId was present in the container details (which should be missing according to the docs) - in my case only the PodName was missing. |
Yes, this is mainly performance - Pod ID is free, pod name requires a
lookup in the DB for each container.
…On Tue, Aug 4, 2020, 08:38 Daniel J Walsh ***@***.***> wrote:
I am wondering why we don't return it always. I think this might be a
performance issue.
@mheon <https://github.com/mheon> @baude <https://github.com/baude> Ideas?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#7214 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AB3AOCCFYE3I7RJ5E76ML3LR676NVANCNFSM4PUG7KWA>
.
|
ill take this one and look into it. |
talked to @mheon , we have a good way to do this and not make it too much a perf hit. |
as such, @mheon is taking this over as it in involves a db call. |
The ListContainers API previously had a Pod parameter, which determined if pod name was returned (but, notably, not Pod ID, which was returned unconditionally). This was fairly confusing, so we decided to deprecate/remove the parameter and return it unconditionally. To do this without serious performance implications, we need to avoid expensive JSON decodes of pod configuration in the DB. The way our Bolt tables are structured, retrieving name given ID is actually quite cheap, but we did not expose this via the Libpod API. Add a new GetName API to do this. Fixes containers#7214 Signed-off-by: Matthew Heon <[email protected]>
The ListContainers API previously had a Pod parameter, which determined if pod name was returned (but, notably, not Pod ID, which was returned unconditionally). This was fairly confusing, so we decided to deprecate/remove the parameter and return it unconditionally. To do this without serious performance implications, we need to avoid expensive JSON decodes of pod configuration in the DB. The way our Bolt tables are structured, retrieving name given ID is actually quite cheap, but we did not expose this via the Libpod API. Add a new GetName API to do this. Fixes containers#7214 Signed-off-by: Matthew Heon <[email protected]>
The ListContainers API previously had a Pod parameter, which determined if pod name was returned (but, notably, not Pod ID, which was returned unconditionally). This was fairly confusing, so we decided to deprecate/remove the parameter and return it unconditionally. To do this without serious performance implications, we need to avoid expensive JSON decodes of pod configuration in the DB. The way our Bolt tables are structured, retrieving name given ID is actually quite cheap, but we did not expose this via the Libpod API. Add a new GetName API to do this. Fixes containers#7214 Signed-off-by: Matthew Heon <[email protected]>
/kind bug
Description
When listing containers through the Rest API there is PodName property which should be there according to the documentation but it's always empty string. "Pod" property contains the Pod ID and can be used to identify the pods instead.
Steps to reproduce the issue:
Output of
podman version
:Output of
podman info --debug
:Package info (e.g. output of
rpm -q podman
orapt list podman
):The text was updated successfully, but these errors were encountered: