fix(proxmox): vorübergehende Störungen wiederholen statt abbrechen

Der Feldtest auf einem ausgelasteten pve-demo scheiterte an Verbindungswacklern, nicht an Proxmox: pveproxy meldete „Broken pipe“ (Backend weg), schloss Keep-Alive-Verbindungen, Storage-Abfragen dauerten 15 s. GET wird bis zu dreimal wiederholt, Schreibendes nur bei sicher nicht angekommener Anfrage; Schreibaufrufe dürfen 120 s dauern, Keep-Alive 2 s.

Refs #020

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-23 14:14:47 +02:00
co-authored by Claude Opus 5.5
parent 420aca3994
commit 64859b3637
6 changed files with 162 additions and 26 deletions
+6
View File
@@ -26,6 +26,8 @@ export type MockAntwort = {
statusText?: string;
data?: unknown;
errors?: Record<string, string>;
/** Verbindung ohne Antwort hart trennen – wie ein pveproxy, der eine Keep-Alive-Verbindung schließt. */
trennen?: boolean;
};
export type MockRoute = (
anfrage: MockAnfrage,
@@ -124,6 +126,10 @@ export class ProxmoxMock {
if (!treffer) continue;
try {
const antwort = await route(anfrage, treffer);
if (antwort.trennen) {
res.socket?.destroy();
return;
}
senden(antwort.status ?? 200, antwort.statusText ?? "OK", {
data: antwort.data ?? null,
...(antwort.errors ? { errors: antwort.errors } : {}),