-
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
[BUG] Podman REST API return a list of containers with partial/missing "Mounts" attribute values #24878
Comments
This is calling into the podman ps api.
Not sure if that is correct, but this is the way it is coded. |
As opposed to the podman inspect api.
|
I guess that, unlike |
I just tested docker API by the container list call and docker API works well:
Output: ...
"Mounts": [
{
"Type": "bind",
"Source": "/home/athena/Exegol/exegol-resources",
"Destination": "/opt/resources",
"Mode": "",
"RW": true,
"Propagation": "rprivate"
},
{
"Type": "bind",
"Source": "/home/athena",
"Destination": "/workspaces",
"Mode": "",
"RW": true,
"Propagation": "rprivate"
}
]
... I think podman container listing API should be fixed to show the same consistent information. |
I tend to agree with you. It looks like the Docker API does the correct thing and looks up the mounts on the server side. |
Should be a simple enough fix, but most of us are on PTO so I doubt it'll be touched until the new year. |
In terms of time effort, in your opinion how much time is it needed to work on the code to fix it? |
Probably a few hours? From what I can see, the results from |
The containers.list function is calling docker_containers = client.containers.list(all=True, filters={"name": "exegol-"}) Which is the same thing as |
Issue Description
Podman REST API container list returns a list of containers with partial/missing Mounts attribute values.
Steps to reproduce the issue
To simplify the reproduction, let's use Podman py:
Run this script. It will create a
exegol-default
container with differentmounts
elements.One note: when the container is created, the container attribute
mounts
has the right values. When the container is listed (so when the/containers/json
API is invoked), no.Then, enable API service:
and run:
It will return only
target
info ofmounts
, instead of other information:Describe the results you received
Describe the results you expected
I expect that Podman API return all the elements of
Mounts
, so not onlytarget
but alsosource
,type
and so on. I expect a result as occurs by docker API when running:By docker API the output is correct:
podman info output
Podman in a container
No
Privileged Or Rootless
Rootless
Upstream Latest Release
Yes
Additional environment details
Arch Linux
Additional information
Initial issue reported to containers/podman-py#488
The text was updated successfully, but these errors were encountered: