compose attach sometimes loses the input in TestComposeAttach

Abierto
#5,335 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 3 días

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
45/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
go
Área
cli

Línea de trabajo

Start with TestComposeAttach from #5302 and compare its compose up/attach path with TestAttach, which uses plain nerdctl run -it. Reproduce the intermittent failure by running the CI subtest repeatedly; done means the commands sent through compose attach reliably reach and run in the container before detaching.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

Description

TestComposeAttach from #5302 sometimes loses everything sent through nerdctl compose attach. Attach does read the detach keys and exits, but none of the commands it got before that reach the shell in the container.

On a failing run the container was still running, /bin/sh was PID 1 and sleeping, fds 0-2 were there, and the file the commands write was never created. So the shell looks fine, the input just gets lost somewhere between attach and the container console. It happened on a few different jobs (rootless and rootful, arm), maybe 1 in 10 runs.

The service runs with stdin_open and tty, so compose up starts it with nerdctl run -it in a subprocess and the test detaches from that before attaching. TestAttach does the same thing with a plain nerdctl run -it and I haven't seen it fail this way, so I suspect something in the compose up path.

Steps to reproduce the issue
  1. Run TestComposeAttach from #5302 in CI a few times
  2. Check the "attaches to the service container" subtest
Describe the results you received and expected

Expected the commands sent through compose attach to run in the container. Sometimes none of them do. I'm marking the subtest flaky in #5302 with a link here and will keep digging.

What version of nerdctl are you using?

main + #5302

Lenguaje dominante
Go
Estrellas
10.5k
Forks
853
Merge medio
6 d 14 h
PR fusionados (30 d)
38

Preparar el entorno

  • Incluye un Dockerfile o un archivo de Docker Compose
  • Sin plantilla de pull request
  • Sin guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de containerd/nerdctl

Todos los issues de containerd/nerdctl

Issues similares

Más issues de Go

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.