Repository navigation
Commit 6dc76a3
committed
fix(orchestrator): persist checkpoint snapshot when resume-fresh fails
checkpointResumeFresh caches the snapshot successfully, then resumes a
fresh replacement sandbox from it. If that replacement fails to start
(e.g. "mmap memfd: cannot allocate memory" when the host hugepage pool
is exhausted), the handler returned before runCheckpointUpload ran, so
the already-valid snapshot was never uploaded to remote storage. The
build was left marked failed with local-only bytes, and restoring it
returned 404: template not found.
Upload the snapshot on the resume-failure path before returning the
error, so it stays restorable. This is safe because resume-fresh never
defers the rootfs export and never keeps a CoW memory window
(snapshotAndCacheSandbox is called with deferRootfsExport=false and
maintainSandbox=false), so the snapshot bytes are fully materialized in
the local cache by the time the resume is attempted. The upload is
best-effort: a failure is logged and never masks the resume error.
Addresses the checkpoint half of #3658.
Signed-off-by: AdaAibaby <ada@users.noreply.github.com>1 parent 132dadd commit 6dc76a3
1 file changed
Lines changed: 14 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1417 | 1417 | | |
1418 | 1418 | | |
1419 | 1419 | | |
| 1420 | + | |
| 1421 | + | |
| 1422 | + | |
| 1423 | + | |
| 1424 | + | |
| 1425 | + | |
| 1426 | + | |
| 1427 | + | |
| 1428 | + | |
| 1429 | + | |
| 1430 | + | |
| 1431 | + | |
| 1432 | + | |
| 1433 | + | |
1420 | 1434 | | |
1421 | 1435 | | |
1422 | 1436 | | |
| |||
0 commit comments