System Erase's post-reset "wait for iDRAC, then power on" step: PowerShell's fixed wait has ~0 margin in practice; Python's retry loop looks unguarded against connection-level failures
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 58/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- powershell, python
- Ambito
- api, infrastructure
Direzione di ricerca
Inizia da Redfish PowerShell/Invoke-SystemEraseREDFISH.psm1 e Redfish Python/SystemEraseREDFISH.py, concentrandoti sui percorsi di attesa e riconnessione successivi a BIOS System Erase. Confrontali con il pattern esistente "wait for iDRAC" menzionato nell’issue. Il lavoro è completato quando entrambe le implementazioni eseguono il polling entro un limite massimo vincolato e Python ritenta sia in caso di errori a livello di connessione sia in caso di risposte HTTP non riuscite.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Scope: PowerShell (Set-DeviceFirmwareSimpleUpdateREDFISH's System Erase path is not involved here — this is specifically Invoke-SystemEraseREDFISH.psm1 and its Python counterpart SystemEraseREDFISH.py, both under Redfish PowerShell/ / Redfish Python/). Related to, but distinct from, the break-escaping-caller's-loop issue reported separately.
Summary
After a System Erase job that includes the BIOS component completes, both implementations wait a fixed amount of time for iDRAC to come back up before attempting to power the server back on:
- PowerShell (
Invoke-SystemEraseREDFISH.psm1): waits a fixed 5 minutes, then attempts to reconnect essentially once (two closely-spaced POST attempts with no delay or retry loop between them), giving up immediately on failure. - Python (
SystemEraseREDFISH.py): waits a fixed 6 minutes, then retries up to 5 times with a 60-second delay between attempts if the connection succeeds but returns a non-success HTTP status — but therequests.post(...)calls in that retry loop aren't wrapped in atry/except, so a connection-level failure (iDRAC not yet listening at all, rather than iDRAC responding with an error) looks like it would raise an unhandled exception and crash the script outright, rather than being retried the way an HTTP-level error is.
Real timing data
Ran a System Erase (CryptographicErasePD,IDRAC,BIOS) against a PowerEdge R6615 and captured full timestamped logs. Two independent runs both hit the PowerShell 5-minute wait's failure case; here's the exact breakdown from the more recent one:
18:13:51.447 Stage 1 starts - about to call Invoke-SystemEraseREDFISH
18:22:59.430 Cmdlet's buffered output appears (call has returned) -
includes "System Erase job execution time: Minutes: 4, Seconds: 0"
and two "Unable to connect to the remote server" failures
after the documented "wait 5 minutes for iDRAC" step
- Total call duration: 547.98s
- Erase job's own reported polling time: 240s (4:00)
- Remainder (setup + the 5-minute wait + 2 failed reconnects + overhead): 307.98s — only 7.98 seconds of that is not the nominal 300s wait, meaning both reconnect attempts fired right at the 5:00 mark with essentially no margin.
- Our own follow-up connectivity check, run immediately after the cmdlet returned (2.35s later, after closing an unrelated browser window), succeeded on its first attempt in 42ms.
So iDRAC was reachable only a few seconds after the module gave up — the wait wasn't drastically too short, it just had zero margin, and across 2/2 real attempts that margin wasn't enough.
Suggested fix
Rather than picking a new fixed number (hardware/network variability means any constant will eventually be violated again), replace the fixed-wait-then-give-up pattern with a bounded polling loop: check every 15–30s for up to some generous ceiling (10–15 minutes), succeeding as soon as iDRAC responds instead of gambling on one guessed duration. This is the same pattern already used successfully elsewhere for "wait for iDRAC" scenarios.
For the Python side specifically, independent of the wait duration: wrapping the requests.post(...) calls in that retry loop in a try/except for connection errors (treating them the same as a non-success status code — log and retry after the existing 60s delay) would close what looks like a real gap, since the scenario the retry loop exists to handle (iDRAC not up yet) is exactly the case most likely to raise a connection error rather than return an HTTP status at all.
Environment
- Windows PowerShell 5.1, Dell PowerEdge R6615, iDRAC9
- Checked against the current
masterbranch of both the PowerShell and Python implementations
- Lingua principale
- PowerShell
- Stelle
- 739
- Fork
- 310
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di dell/iDRAC-Redfish-Scripting
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 42/100
dell/iDRAC-Redfish-Scripting#391 · 2 commenti ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 15/100
dell/iDRAC-Redfish-Scripting#390 · 3 commenti ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
dell/iDRAC-Redfish-Scripting#384 · 1 commento ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
dell/iDRAC-Redfish-Scripting#342 · 7 commenti ·
Tutte le issue di dell/iDRAC-Redfish-Scripting
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
apache/rocketmq-dashboard#7250 ·
I maintainer di solito rispondono entro 3 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
HarperFast/rocksdb-js#945 ·
I maintainer di solito rispondono entro 1 giorno
-
[BUG]: `GitHubRestAdapter.check_user_permission` and `has_write_access` raise `TypeError` (missing `params`), silently disabling the inactivity lifecycleForse già presa @tarunagnihotri534 l’ha presa oggi. Apertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 67/100
AOSSIE-Org/Gitcord-GithubDiscordBot#167 · 1 commento ·
I maintainer di solito rispondono entro 2 giorni
-
Missing example coverage: getClockForse già presa @camunda-sdk-automation l’ha presa oggi. Apertanew-operations
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
camunda/orchestration-cluster-api-go#75 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
vitest-dev/vitest#11656 ·
I maintainer di solito rispondono entro 1 giorno