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

未关闭
#1,565 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
55/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
bash
领域
devops, tooling

调研方向

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.

由索引模型根据 Issue 内容生成。

描述

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.

主要语言
Python
星标
0
派生
4
平均合并
5 小时 36 分钟
30 天内合并 PR
509

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

Controlvar/controlvar 的其他 Issue

查看 Controlvar/controlvar 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。