feat: restart a workload in place, health-gated and audited

Abierto
#219 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
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
30/100
Tipo de issue
Nueva funcionalidad
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
docker, go
Área
cli, devops

Línea de trabajo

Start from the existing ob deploy path, which keeps replicas when images are unchanged (runtime_unchanged), and from the deploy lock/fence, the rolling/converge path, and the journal and ob audit code the issue names. The payload names no specific files or tests, so locate these by searching the repository. Done means ob restart shows a plan, asks for confirmation, restarts replicas one at a time with health gating, records a journal and audit entry, and leaves the release and ob status unchanged.

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

Descripción

enhancement
The problem

An operator sometimes needs to restart a running workload without releasing anything new. A typical case: a singleton worker misses an upstream event, and only its startup catch-up recovers it. The image and configuration have not changed; the process just needs to start again.

Onebox has no command for this. ob deploy with unchanged images retains the workload (runtime_unchanged), and neither the top-level commands nor ob service offer a restart.

Proposed change

ob restart <workload> [--reason TEXT], using the same guarantees as a deploy, without changing the release:

  • Shows what will restart and asks for confirmation (-y to skip). Takes the deploy lock/fence, so it cannot race a concurrent deploy or resume.
  • Restarts multi-replica workloads one replica at a time, health-gated, using the existing rolling/converge path. A replica that fails its health check stops the restart and reports it.
  • Restarts a single-replica workload, waits for it to become healthy, and reports the outcome.
  • Records a journal entry and an ob audit entry: who, when, which workload, the release it belongs to, the reason and the result.
  • Does not change images, configuration or the recorded release. ob status stays consistent.

The same could later cover supporting services (ob service restart <name>), where a restart may affect the data plane and should say so in the plan.

Current workaround

ssh <host> docker restart <container>. It works because the container, image and configuration stay the same, but it bypasses Onebox:

  • no confirmation and no deploy-lock fencing;
  • no health gate, so a failed start shows up only in ob status or in logs;
  • no rolling for multi-replica workloads;
  • nothing in the journal or ob audit, so the restart is invisible in the deployment history.
Scope and safety

It stays inside the one-application, one-host scope. It acts on a running production system only on an explicit operator command, after showing a plan and getting confirmation, and it changes no release state.

Lenguaje dominante
Go
Estrellas
4
Forks
0
Merge medio
36 min
PR fusionados (30 d)
13

Preparar el entorno

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 labstack/onebox

Todos los issues de labstack/onebox

Issues similares

Más issues de Go

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.