BReg: status reports ready on a restored copy that is not adopted

Aperta
#2,764 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
57/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
postgresql, rust
Ambito
backend, cli

Direzione di ricerca

Start with the status command path in crates/registry-breg and the tests named in the issue: a_restored_copy_refuses_to_serve_until_adopted in crates/registry-breg/tests/postgres_startup.rs and real_postgres_an_activation_keeps_a_claim_that_names_another_database in crates/registry-breg/tests/postgres_migration.rs. Compare how claim-status derives matches: false with whatever status reads, then add a diagnostic field without changing the exit code or the ready answer. Done means status still exits 0 on an unadopted copy while saying the claim names another database and that bregctl instance-claim adopt is needed; check deploy/stack_operator.py (adopt-restored) still parses the output.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

area:breg enhancement

bregctl status reports an activated database as ready even when its instance claim names another database. That is the state of a logically restored copy before bregctl instance-claim adopt. The same copy refuses to serve, and readiness fails on a running server, until an operator adopts it (a_restored_copy_refuses_to_serve_until_adopted in crates/registry-breg/tests/postgres_startup.rs).

In a manual restore through the reference operator, claim-status answered matches: false. status on the same database exited 0 with ok: true, maintenanceStatus: ready and no diagnostic. An operator who reads only status sees a ready Registry that will not serve.

status must keep answering on an unadopted copy. adopt-restored in deploy/stack_operator.py reads it before adoption to compare the restored activation with the backup receipt, and real_postgres_an_activation_keeps_a_claim_that_names_another_database in crates/registry-breg/tests/postgres_migration.rs pins that.

Proposal: keep the answer and the exit code, and add a diagnostic or field that says the instance claim names another database and the copy needs bregctl instance-claim adopt before it serves. doctor could report the same.

Lingua principale
Rust
Stelle
2
Fork
0
Merge medio
9h 48m
PR unite (30g)
151

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di registrystack/registry-stack

Tutte le issue di registrystack/registry-stack

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.