Widen Komodo health probe: try container endpoints, snippet on failure
GetDeployment returns config, not runtime state, so the health check was always coming back with 'no container state found in response'. For deployment-type servers the probe now tries GetDeploymentContainer, InspectDeploymentContainer, and GetDeploymentStatus first, falling back to GetDeployment only if those aren't available. The extractor also recognizes more shapes (Health.Status, container_state, deployment_state, etc.) and accepts more healthy strings (running, healthy, ok, started, up). When nothing matches, the truncated raw response snippet rides along in the error field so the deployment/beta UI shows exactly which field to teach the extractor next time. Currently-stuck deployment_server rows are still 'pending', so the sweep will retry them on its next 15s tick — no manual reset needed. Once one of the widened endpoints resolves, those rows advance to 'done' automatically. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -127,7 +127,27 @@ async function advance(row: BetaServerActiveRow): Promise<void> {
|
||||
}
|
||||
case 'awaiting-health': {
|
||||
const h = await komodoInspectHealthy(row.server);
|
||||
if (!h.ok) return; // hold — try next tick
|
||||
if (!h.ok) {
|
||||
// Record the failure reason (including any snippet) so the
|
||||
// beta detail UI can surface why we're stuck.
|
||||
const snippet = h.snippet ? ` snippet=${h.snippet.slice(0, 400)}` : '';
|
||||
setStage().run(
|
||||
'awaiting-health',
|
||||
`unhealthy: ${h.reason}${snippet}`,
|
||||
nowIso(),
|
||||
'awaiting-health',
|
||||
'awaiting-health',
|
||||
nowIso(),
|
||||
'awaiting-health',
|
||||
'awaiting-health',
|
||||
nowIso(),
|
||||
'awaiting-health',
|
||||
nowIso(),
|
||||
row.beta_id,
|
||||
row.server
|
||||
);
|
||||
return;
|
||||
}
|
||||
const rcon = await rconStatusResult(row.server);
|
||||
if (!rcon.ok) return; // container reports up but game not answering yet
|
||||
const next = row.wait_for_match ? 'awaiting-match' : 'ready';
|
||||
|
||||
Reference in New Issue
Block a user