mirror of
https://github.com/Studio-Saelix/sencho.git
synced 2026-08-27 18:57:09 +00:00
fix(compose): move atomic backup out of stack folder, silence stale stats 404s (#498)
The Skipper/Admiral atomic deploy/update path used to create .sencho-backup/ inside the user's stack folder, which silently failed with EACCES whenever a container had chowned the bind mount (swag, tautulli, linuxserver/* images, etc). That broke auto-rollback and the manual rollback endpoint for those stacks. Stack backups now live under <DATA_DIR>/backups/<stackName>/ next to sencho.db, which is always writable by the Sencho user. While stress-testing the same scenario, MonitorService also flooded the error log with "Error parsing stats for container ... 404 no such container" because per-container stats polls (30s tick) raced with docker compose recreating containers. The 404 case is now skipped silently; non-404 stats failures still log at error level.
This commit is contained in:
@@ -294,6 +294,14 @@ export class MonitorService {
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
// Containers can be removed between getRunningContainers() and the
|
||||
// per-container stats call (e.g., during a stack update). Dockerode
|
||||
// throws a 404 in that case. That's expected churn, not a real
|
||||
// error, so skip silently rather than flooding the logs.
|
||||
const err = e as { statusCode?: number; reason?: string };
|
||||
if (err?.statusCode === 404 || err?.reason === 'no such container') {
|
||||
continue;
|
||||
}
|
||||
console.error(`Error parsing stats for container ${container.Id} on node ${node.name}`, e);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user