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

Ouverte
#2,764 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub

Les mainteneurs répondent en général sous 1 jour

Personne n'a encore pris cette issue.

Évaluation

Difficulté
3/5
Temps estimé
1-2 jours
Accessibilité débutants
57/100
Type d'issue
Bug
Clarté
Clairement spécifiée
Activité
Active
Stack technique
postgresql, rust
Domaine
backend, cli

Piste de recherche

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.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

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.

Langage dominant
Rust
Étoiles
2
Forks
0
Merge moyen
9 h 48 min
PR mergées (30 j)
151

Préparer son environnement

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de registrystack/registry-stack

Toutes les issues de registrystack/registry-stack

Issues similaires

Plus d'issues Rust

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.