installer: a Ctrl-C during the certificate or stack waits can be lost

Aperta
#1,565 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
55/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
bash
Ambito
devops, tooling

Direzione di ricerca

Start with the installer's cv_wait_certificate and uninstall's cv_un_wait_for_stacks, where each poll runs $(date +%s), and with cv_deploy_wait, where now has no starting value. Read the static test that checks cv_deploy_wait's lines, plus the helpers it calls (cv_wait, cv_sleep, cv_bg, cv_kill, cv_log). Done means both waits read the clock without a command substitution or through one shared helper, each has an interrupt test with a held clock read, the static test covers the helpers, and now is initialised to 0.

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

Descrizione

bug post-launch

A follow-up to #1558 / #1563, which made an interrupt during the installer's deploy step always count.

Two other waits poll with a command substitution on every pass, so a Ctrl-C that arrives at that moment can be lost and the wait carries on until a second Ctrl-C:

  • cv_wait_certificate (the deadline check reads the clock with $(date +%s));
  • uninstall's cv_un_wait_for_stacks (its clock read and its heartbeat's clock read).

Measured with the real functions and a held clock read: the INT is lost every time on bash 3.2 and 5.3; TERM is always handled. No test signals these waits, so they do not make CI flaky, and a second Ctrl-C stops them.

Also from the #1563 review:

  • cv_deploy_wait declares now without a value; under set -u, bash 5 stops with "now: unbound variable" if the clock file cannot be read on the first pass (only when the run's tmp/ is already broken). Give it a starting value.
  • The static test reads only cv_deploy_wait's own lines; a command substitution added to a helper it calls on every pass (cv_wait, cv_sleep, cv_bg, cv_kill, cv_log) would pass it.

Expected

The certificate and stack waits read the clock without a command substitution (or through one shared helper), each has a held-read interrupt test, the static test covers the helpers, and now starts at 0.

Priority

LOW: a lost first Ctrl-C leaves a harmless wait running.

Lingua principale
Python
Stelle
0
Fork
4
Merge medio
5h 19m
PR unite (30g)
503

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 Controlvar/controlvar

Tutte le issue di Controlvar/controlvar

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.