| name | vastai-incident-runbook |
| description | Execute Vast.ai incident response for GPU instance failures and outages.
Use when responding to instance failures, investigating training crashes,
or handling spot preemption emergencies.
Trigger with phrases like "vastai incident", "vastai outage",
"vastai down", "vastai emergency", "vastai instance failed".
|
| allowed-tools | Read, Grep, Bash(vastai:*), Bash(curl:*), Bash(ssh:*) |
| version | 1.11.0 |
| license | MIT |
| author | Jeremy Longshore <jeremy@intentsolutions.io> |
| tags | ["saas","vast-ai","incident-response"] |
| compatibility | Designed for Claude Code, also compatible with Codex and OpenClaw |
Vast.ai Incident Runbook
Overview
Rapid incident response procedures for Vast.ai GPU instance failures. Covers triage, mitigation, recovery, and postmortem for common incident types: spot preemption, instance crashes, GPU failures, and billing issues.
Prerequisites
- Vast.ai CLI access
- SSH access to instances (if still running)
- Checkpoint storage accessible (S3/GCS)
Instructions
Triage: Assess Impact (< 2 minutes)
#!/bin/bash
set -euo pipefail
echo "=== INCIDENT TRIAGE ==="
echo "Time: $(date -u)"
echo -e "\n--- Instance Status ---"
vastai show instances --raw | python3 -c "
import sys, json
for inst in json.load(sys.stdin):
status = inst.get('actual_status', '?')
flag = 'ALERT' if status in ('error', 'exited', 'offline') else 'OK'
print(f' [{flag}] ID:{inst[\"id\"]} Status:{status} '
f'GPU:{inst.get(\"gpu_name\",\"?\")} \${inst.get(\"dph_total\",0):.3f}/hr')
"
echo -e "\n--- Recent Logs (last 20 lines) ---"
vastai logs ${INSTANCE_ID:-0} --tail 20 2>/dev/null || echo "No logs available"
echo -e "\n--- Account ---"
vastai show user --raw | python3 -c "import sys,json; u=json.load(sys.stdin); print(f'Balance: \${u.get(\"balance\",0):.2f}')"
Incident Type 1: Spot Preemption
Symptoms: Instance status changes from running to exited or offline without user action.
vastai show instance $ID --raw | python3 -c "
import sys, json; i=json.load(sys.stdin)
print(f'Status: {i.get(\"actual_status\")}')
print(f'Status msg: {i.get(\"status_msg\", \"none\")}')
"
aws s3 s3://bucket/checkpoints/ --recursive | -5
vastai search offers \
--order dph_total -- 3
vastai create instance --image --disk 50