Build remote apply

Aperta
#87 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à
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
45/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
bash, powershell
Ambito
cli, devops

Direzione di ricerca

Start from branch phase-5/remote-apply and read spec design 00 section 5. Examine the existing local apply command and approval queue logic, noting dependency #86. Write the bats and Pester acceptance tests listed before implementing remote apply --group with connection-loss coping and revert timer. Done when tests pass and a host reverts correctly on failed login or scored service failure.

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

Descrizione

area: core platform: linux platform: windows type: build

Read first

Read these before starting. If this issue and the spec disagree, the spec wins; say so in the pull request.

Summary

Build remote apply <phase> --group <group>, which runs the local apply on every host of a group from the control node (a hardened server that can reach every host) and brings back the logs and manifests. The lockout rotates the very passwords and SSH settings the control node connects with, so it must cope with being cut off. Instead of the on-host keep question, the control node keeps a host's run only when it can still log in over the admin path and no scored service that passed before now fails; otherwise the revert timer undoes that host.

Depends on

  • Blocked by #86 (the read-only remote plan). It is built only after remote plan has run safely in the lab.

Location & Context

  • Branch: phase-5/remote-apply. Spec: design 00, section 5.
  • The remote command from #86, in both runners (labyrinth.sh, labyrinth.ps1), with apply added. Record its options in Conventions 3.3 first, then add them to the manual and docs/Commands.md.
  • Tests: new bats and Pester files, and tests/manual/manual.bats. The lab pass uses the control node and several hosts (docs/lab/README.md).

Current Behavior

Changes can run only locally on each host. Remote apply is held back until remote plan has run safely in the lab.

Plan

  1. Build remote apply <phase> --group <group>: run the local apply and bring back logs and manifests.
  2. Keep each host's own approval queue; list a host's queue with -q on that host and apply chosen items there with -q -a (Conventions 3.3).
  3. Cope with losing the connection while credentials and SSH settings rotate.
  4. Keep a host's run only when it can still log in over the admin path and no scored service that passed before now fails; otherwise the timer reverts that host, except modules kept once verified (design 00, section 4, rule 9). The control node prints and records which hosts it kept and why.

Acceptance tests

Write these first, in bats and Pester:

  • A lost connection during rotation does not leave the host half-changed.
  • A host where a previously passing scored service fails is reverted by the timer, except modules kept once verified.
  • A host that cannot log in over the admin path is reverted.
  • A host whose scored service already failed its probe before the run, and still fails after it, is kept when the admin login works and no other service regressed; the control node reports the failing service (design 00, section 5).
  • Negative test: protected accounts and scored services are untouched before and after.

Done when

  • The Linux and Windows versions both pass CI.
  • The tests above pass in the lab on a control node and hosts of both platforms (docs/lab/README.md).
  • The command is in both runners, the manual, docs/Commands.md, its -h page, the Conventions table and both test suites, in one branch (Roadmap section 2). Help never runs anything.

Out of scope

  • The read-only plan: #86.
  • The break-glass check at the host's console, which still follows the run (design 03, section 6.3); an operator who cannot log in there undoes that host's run with laby -u ID.
  • Scheduled probes and checkpoints from the control node: #91.
Lingua principale
PowerShell
Stelle
0
Fork
0
Merge medio
2h 7m
PR unite (30g)
53

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 dotnetdork/Labyrinth

Tutte le issue di dotnetdork/Labyrinth

Issue simili

Altre issue su CLI

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.