fix: seed bb_phase=1,pct=0 at surface_validate start (1.0.0-45)
Previously the parser only wrote bb_phase to the DB when state *changed* — so for the first several minutes of a 14 TB burn-in (before badblocks emits its first 'X% done' line), bb_phase stayed NULL and the drawer's per-pattern meters didn't render at all. Looked broken to operators. Now we write phase=1, phase_pct=0 immediately on stage entry. The parser keeps overwriting on every subsequent tick. Drawer shows empty meters with 0xaa label highlighted blue from t=0.
This commit is contained in:
parent
30062affc2
commit
1393ba0bc8
2 changed files with 12 additions and 1 deletions
|
|
@ -495,6 +495,17 @@ async def _stage_surface_validate_ssh(job_id: int, devname: str, drive_id: int)
|
||||||
pid_seen = False
|
pid_seen = False
|
||||||
progress = _BadblocksProgress()
|
progress = _BadblocksProgress()
|
||||||
|
|
||||||
|
# Seed bb_phase=1, bb_phase_pct=0 immediately so the
|
||||||
|
# drawer's per-pattern meters have something to render
|
||||||
|
# before badblocks emits its first "X% done" line. On a
|
||||||
|
# 14 TB drive that first line can be several minutes in,
|
||||||
|
# and a blank meter strip looks broken to the operator.
|
||||||
|
await _update_stage_bb_phase(
|
||||||
|
job_id, "surface_validate",
|
||||||
|
progress.phase, progress.phase_pct,
|
||||||
|
)
|
||||||
|
_push_update()
|
||||||
|
|
||||||
async def _drain(stream, is_stderr: bool):
|
async def _drain(stream, is_stderr: bool):
|
||||||
nonlocal bad_blocks_total, pid_seen
|
nonlocal bad_blocks_total, pid_seen
|
||||||
async for raw in stream:
|
async for raw in stream:
|
||||||
|
|
|
||||||
|
|
@ -86,7 +86,7 @@ class Settings(BaseSettings):
|
||||||
ssh_key: str = "" # PEM private key content (paste full key including headers)
|
ssh_key: str = "" # PEM private key content (paste full key including headers)
|
||||||
|
|
||||||
# Application version — used by the /api/v1/updates/check endpoint
|
# Application version — used by the /api/v1/updates/check endpoint
|
||||||
app_version: str = "1.0.0-44"
|
app_version: str = "1.0.0-45"
|
||||||
|
|
||||||
# ---- Authentication (1.0.0-22) ----
|
# ---- Authentication (1.0.0-22) ----
|
||||||
# session_secret: HMAC key for signing session cookies. Empty = generate
|
# session_secret: HMAC key for signing session cookies. Empty = generate
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue