opencontainers / runtime-spec

OCI Runtime Specification
http://www.opencontainers.org
Apache License 2.0
3.13k stars 535 forks source link

lifecycle: which pid the Query State operation returns is underspecified #1166

Open corhere opened 1 year ago

corhere commented 1 year ago

The "Query State" operation "MUST return the state of a container as specified in the State section." The State section defines the pid field as follows:

pid (int, REQUIRED when status is created or running on Linux, OPTIONAL on other platforms) is the ID of the container process. For hooks executed in the runtime namespace, it is the pid as seen by the runtime. For hooks executed in the container namespace, it is the pid as seen by the container.

"Query State" operation is not a hook, so it is ambiguous whether it should return the container pid as seen by the runtime or as seen by the container.