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

Alignment with moby swagger definition for ContainerConfig.entrypoint #14513

Closed
milenkovicm opened this issue Jun 7, 2022 · 5 comments
Closed
Labels
kind/bug Categorizes issue or PR as related to a bug. locked - please file new issue/PR Assist humans wanting to comment on an old issue or PR with locked comments. stale-issue

Comments

@milenkovicm
Copy link

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

/kind bug

Description

running podman inspect <running container> returns schema which is not aligned to current https://github.com/moby/moby/blob/master/api/swagger.yaml definition. Json returned by inspect command diverges from schema in at least two situations:

  1. ContainerConfig.entrypoint which is returned by podman as string but according to definition https://github.com/moby/moby/blob/master/api/swagger.yaml#L1271-L1281` it should be array of strings. "Entrypoint": "",
  2. ContainerConfig.StopSignal is returned as integer, schema defines it as string at it might be integer value of signal or string value. https://github.com/moby/moby/blob/aca813e1359f1a3501f1b7453e05b10b3425a90d/api/swagger.yaml#L1306-L1311

This problem is annoying as strongly typed languages (e.g rust) do not like having discrepancy between types.

Steps to reproduce the issue:

  1. run any container
  2. podman inspect <container_id>
  3. observe Entrypoint and StopSignal returned in output

Describe the results you received:

entrypoint and stopsignal have wrong types (as per swagger definition)

Describe the results you expected:

I'd expect them to be string array and string

Additional information you deem important (e.g. issue happens only occasionally):

Output of podman version:

podman version 4.1.0

but issues is available in earlier versions as well

(paste your output here)

Output of podman info --debug:

(paste your output here)

Package info (e.g. output of rpm -q podman or apt list podman):

(paste your output here)

Have you tested with the latest version of Podman and have you checked the Podman Troubleshooting Guide? (https://github.com/containers/podman/blob/main/troubleshooting.md)

Yes

Additional environment details (AWS, VirtualBox, physical, etc.):

@openshift-ci openshift-ci bot added the kind/bug Categorizes issue or PR as related to a bug. label Jun 7, 2022
@milenkovicm milenkovicm changed the title Alignment with moby swagger definition Alignment with moby swagger definition for ContainerConfig.entrypoint Jun 7, 2022
@Luap99
Copy link
Member

Luap99 commented Jun 14, 2022

Changing the podman inspect format will break the podman API, see #13811

If you need 100% compatible docker output I recommend to use the compat API.

@milenkovicm
Copy link
Author

@Luap99 if compat API is podman-docker, it has the same problem, those two properties have wrong type there as well

@Luap99
Copy link
Member

Luap99 commented Jun 14, 2022

No the compat API is the actual podman api service, podman-docker just calls podman ...

The podman rest API which provides all docker API endpoints (except swarm), https://docs.podman.io/en/latest/_static/api.html

@milenkovicm
Copy link
Author

all right @Luap99 , will have a look at it.
as far as i can see types align there.

feel free to close this one if you wish

@github-actions
Copy link

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

@rhatdan rhatdan closed this as completed Jul 15, 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/bug Categorizes issue or PR as related to a bug. 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