API: `docker top` ignores the ps arguments (`ps_args`)
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 55/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- docker, rust
- Área
- backend-api-design
Línea de trabajo
Start at the daemon handler for GET /containers/{id}/top and trace how it handles ps_args; compare that path with the Docker Engine API behavior described in the issue. The report includes no source file or test names, so first locate the endpoint and its tests. Done means supported arguments such as aux and -eo pid,rss,args affect the returned process columns, or unsupported arguments return an error.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Kiri version and system
- Kiri 0.2.1 (engine 27.5.1), docker CLI 29.9.3
- macOS 27.2, Apple M4 Pro
~/.kiri/vm.json:{"cpus":6,"memory_mib":16384}
What you did
docker run -d -i --name top-a busybox:1.37 cat
docker top top-a
docker top top-a aux
docker top top-a -eo pid,rss,args
curl --unix-socket ~/.kiri/run/docker.sock 'http://localhost/v1.47/containers/top-a/top?ps_args=aux'
What happened
All three docker top commands print the same default columns, and the API answers the same for ps_args=aux, so the arguments are dropped in the daemon, not in the CLI:
UID PID PPID C STIME TTY TIME CMD
root 22838 1 0 05:43 ? 00:00:00 cat
{"Processes":[["root","22838","1","0","05:43","?","00:00:00","cat"]],"Titles":["UID","PID","PPID","C","STIME","TTY","TIME","CMD"]}
What you expected instead
The Engine API defines ps_args on GET /containers/{id}/top as the arguments passed to ps, with -ef as the default. With Docker, docker top top-a aux lists the columns of ps aux (USER, PID, %CPU, %MEM, VSZ, RSS, …), and -eo pid,rss,args lists PID, RSS and COMMAND.
If only the default can be supported, an error for other ps_args would at least make the difference visible.
Anything else
I hit this while reading a server's memory in an image without a shell or ps, where docker top CONTAINER -eo pid,rss,args is the way to get it without changing the container. Under Kiri the command succeeds but has no memory column.
- Lenguaje dominante
- Rust
- Estrellas
- 7.5k
- Forks
- 329
- Merge medio
- 7 h 48 min
- PR fusionados (30 d)
- 105
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de libracoder/kiri
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
libracoder/kiri#364 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
libracoder/kiri#289 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 4/5 3-5 días Aptitud para principiantes 47/100
libracoder/kiri#365 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 35/100
libracoder/kiri#362 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 3/5 1-2 días Aptitud para principiantes 47/100
libracoder/kiri#359 ·
Los mantenedores suelen responder en 1 día
Todos los issues de libracoder/kiri
Issues similares
-
benchmark-review
Dificultad 2/5 1-3 horas Aptitud para principiantes 63/100
Los mantenedores suelen responder en 1 día
-
area:filesystem bug need-triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
Captions panel does not offer to show an existing transcriptPosiblemente ocupada @thedavidweng la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
CapSoftware/Cap#4276 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
matrix-org/matrix-rust-sdk#7495 ·
Los mantenedores suelen responder en 1 día