Sim health check reports WARNING for "just restarted", pageing on every deploy — give Unknown its own tag and a startup grace window
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 72/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Tranquilo
- Stack tecnológico
- java
- Área
- observability-sre
Línea de trabajo
Start in vcell-api/src/main/java/org/vcell/rest/health/HealthService.java: read the NagiosStatus factory methods around :85-95, the healthEvents deque at :103, the loop timing constants at :36-40, and getRunsimStatus at :283-310 to see where Unknown() is returned. Then track service start time and introduce a distinct startup/starting state for now-startTime < SIMULATION_LOOP_START_DELAY + SIMULATION_TIMEOUT, keeping Unknown alertable after that window; the dispatch path is HealthRestlet.java:93. Done when a fresh pod's response body contains no WARNING keyword while a wedged loop still does — note the Better Stack monitor greps the response, so its tag config must change together, and run the vcell-api tests covering health responses.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Summary
GET /api/v0/health?check=sim reports the same WARNING tag for two conditions that mean opposite
things:
- "simulations are degraded" — a real signal
- "this pod started less than ~2 minutes ago and hasn't finished its first test simulation" —
not a signal at all
Better Stack alerts on the literal keyword WARNING in the response body, so a freshly started
api pod pages the on-call. Any deploy, node drain, eviction or reschedule can trigger it.
Mechanism
HealthService keeps its event history in an in-memory deque
(HealthService.java:103):
final ConcurrentLinkedDeque<HealthEvent> healthEvents = new ConcurrentLinkedDeque<>();
A restart empties it. The monitor loop then sleeps before doing anything
(HealthService.java:173, SIMULATION_LOOP_START_DELAY = 60s), submits a test simulation, and
only records RUNSIM_SUCCESS/RUNSIM_FAILED when it finishes. Until then getRunsimStatus
finds nothing in its 15-minute lookback and returns (HealthService.java:309):
if (loginCompleteEvent==null) {
return NagiosStatus.Unknown(); // no completed simulation attempts
}
and Unknown() carries the alerting keyword (HealthService.java:94):
static NagiosStatus Unknown() {
return new NagiosStatus("Unknown", 3, null, null, "WARNING");
}
So the wire response is
{"nagiosStatusName":"Unknown","nagiosStatusCode":3,"tags":"WARNING"}
which is byte-identical whether the pod just booted or the simulation subsystem is broken.
How this showed up
The VCell Release Health - Sim - Warning monitor fired on 2026-08-18 at 2:00:15 PM —
fifteen seconds after the top of the hour. restart-api-cron in prod ran
kubectl -n prod rollout restart deployment/api every hour, so a fresh pod was always
available to be hit just after :00.
It paged only intermittently because the rolling restart leaves older pods (which still have event
history) serving alongside new ones — the check has to land on a fresh pod inside its first ~1–2
minutes.
That cron has since been suspended
(vcell-fluxcd#51) now that
#1899 fixed the memory growth it was mitigating. That removes the frequency, not the defect.
Every deploy still carries the same false-alarm window.
Why Unknown is the wrong tag
The other three statuses are all measurements (HealthService.java:85-95):
| status | code | tags | means |
|---|---|---|---|
OK |
0 | UP |
sim completed under 45 s |
Warning |
1 | UP WARNING |
sim completed, but slower than SIMULATION_TIME_WARNING |
Critical |
2 | DOWN |
sim failed, or exceeded SIMULATION_TIMEOUT |
Unknown |
3 | WARNING |
no measurement exists yet |
Unknown is the only one that is an absence of information, and it is the only one whose tag
does not describe an observed state. Nagios convention agrees: exit code 3 is "cannot determine",
deliberately distinct from 1 "warning".
Proposed fix
Distinguish "not yet known" from "known bad". Two parts, either useful alone:
- Give
Unknownits own tag — e.g.tags: "UNKNOWN"rather than"WARNING"— so a keyword
monitor can choose. This alone fixes the paging, and is a one-line change. - Add a startup grace window. Track service start time; while
now - startTime < SIMULATION_LOOP_START_DELAY + SIMULATION_TIMEOUT, report a distinct
starting state rather than an indeterminate one. After the grace window with still no
completed simulation,Unknownis genuinely worth alerting on — the loop thread may have died,
which today is indistinguishable from a normal boot.
The second point matters and is easy to miss: a permanently wedged monitor thread and a
healthy fresh pod currently produce the same output forever. Fixing (1) without (2) would make
a dead health loop silent.
Also worth considering: persist or seed the event history so a restart does not lose the
picture entirely, though this is a bigger change and may not be worth it for a 3-replica
deployment.
Acceptance
- A pod restart does not produce a response that a
WARNINGkeyword monitor matches. - A health loop that dies, or simulations that stop completing, does still alert after the grace
window. - Better Stack config updated to match whatever tags are chosen — the monitor greps the body, so
the two have to be changed together.
Files
vcell-api/src/main/java/org/vcell/rest/health/HealthService.java—:94Unknown(),
:103event store,:283-310getRunsimStatus,:36-40timing constantsvcell-api/src/main/java/org/vcell/rest/health/HealthRestlet.java:93— thecheck=simdispatch
Refs #1899, virtualcell/vcell-fluxcd#51
- Lenguaje dominante
- Java
- Estrellas
- 140
- Forks
- 35
- Merge medio
- 22 h 6 min
- PR fusionados (30 d)
- 14
Preparar el entorno
- Incluye un Dockerfile o un archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de virtualcell/vcell
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
virtualcell/vcell#2193 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Accessibility Requirement Java-based User Interface
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
virtualcell/vcell#2138 ·
Los mantenedores suelen responder en 1 día
-
Accessibility Requirement Java-based
Dificultad 2/5 1-3 horas Aptitud para principiantes 80/100
virtualcell/vcell#2137 ·
Los mantenedores suelen responder en 1 día
-
Accessibility Requirement User Interface
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
virtualcell/vcell#2135 ·
Los mantenedores suelen responder en 1 día
-
Accessibility Requirement Java-based User Interface
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
virtualcell/vcell#2134 ·
Los mantenedores suelen responder en 1 día
Todos los issues de virtualcell/vcell
Issues similares
-
Keyboard crashes Chrome tabsAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 73/100
Julow/Unexpected-Keyboard#1490 ·
Los mantenedores suelen responder en 4 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 67/100
Vakore/ZappierGames#275 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
unitycatalog/unitycatalog#2148 ·
Los mantenedores suelen responder en 2 días
-
enhancement priority: low
Dificultad 1/5 Menos de una hora Aptitud para principiantes 92/100
Riptide-Labs/riptide#1060 ·
Los mantenedores suelen responder en 1 día
-
bug key bindings source editor
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
Los mantenedores suelen responder en 1 día