feat: restart a workload in place, health-gated and audited
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 30/100
Rechercherichtung
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.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
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 (
-yto 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 auditentry: who, when, which workload, the release it belongs to, the reason and the result. - Does not change images, configuration or the recorded release.
ob statusstays 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 statusor 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.
- Vorherrschende Sprache
- Go
- Sterne
- 4
- Forks
- 0
- Ø Merge
- 36 Min.
- Gemergte PRs (30 T.)
- 13
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus labstack/onebox
-
bug
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 80/100
Maintainer antworten meist innerhalb von 1 Tag
-
bug
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 85/100
Maintainer antworten meist innerhalb von 1 Tag
-
enhancement
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 55/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 55/100
labstack/onebox#226 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
bug
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 65/100
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in labstack/onebox
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
tomasz-tomczyk/crit#1159 ·
Maintainer antworten meist innerhalb von 1 Tag
-
SelectOneHealthyInstance panics when instance weights are fractional (e.g. 0.5)Evtl. vergeben @Ajax-1 hat das heute übernommen. Offen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
nacos-group/nacos-sdk-go#929 ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
google/osv-scanner#3270 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Batch JSON validation reports the wrong input indexEvtl. vergeben @Dazhou-del hat das heute übernommen. Offentype/bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
gin-gonic/gin#4928 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 6 Tagen
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
Maintainer antworten meist innerhalb von 1 Tag