Tear down the qBittorrent E2E stack when it fails to start

Abierto
#2,908 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
68/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
docker-compose, rust
Área
devops, testing

Línea de trabajo

Start with DockerCompose::up in src/console/ci/compose.rs and inspect how RunningCompose handles teardown on drop and how --keep-containers is applied. Reproduce a failed docker compose up --wait --detach and check the project’s containers, networks, and volumes. Done when a failed start cleans up that project’s resources while preserving --keep-containers behavior.

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

Descripción

Parent EPIC: #2392

Goal

When docker compose up fails part-way, the qBittorrent E2E runner still removes every container, network and volume of its Compose project (release resources on success, failure and drop paths).

Background

Found in the review of the shared-resource audit (#2394, finding C9). DockerCompose::up (src/console/ci/compose.rs) runs docker compose up --wait --detach and returns the RunningCompose guard, whose drop runs docker compose down --volumes, only when the command succeeds. On failure it returns an error and no guard, so the containers, network and volumes already created stay on the Docker daemon, still running.

The project name and host ports are unique per run, so a leaked stack does not collide with another run; it accumulates. On the self-hosted runner each failed run leaves running containers (tracker, qBittorrent seeder and leecher, and MySQL or PostgreSQL) that hold memory and disk until someone removes them. The runner's prune script removes stopped resources, not running containers.

The plain E2E runner does not have this problem: its container guard removes the container by name, also after a failed docker run.

Approach

Run docker compose down --volumes for the project when up fails, or create the guard before up so its drop covers the failure path. Keep the --keep-containers behavior.

Tasks

  • Reproduce a failed start that leaves the stack running.
  • Tear the stack down on the failure path.
  • Recheck: a failed start leaves no containers, networks or volumes of its project.

The full specification is added to docs/issues/open/ by a spec-only pull request.

Lenguaje dominante
Rust
Estrellas
532
Forks
56
Merge medio
11 h 20 min
PR fusionados (30 d)
282

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

  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 torrust/torrust-tracker

Todos los issues de torrust/torrust-tracker

Issues similares

Más issues de Rust

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.