From 4e0a17429bb8800d279438c5644e39e2dc16e0ed Mon Sep 17 00:00:00 2001 From: scott Date: Tue, 17 Mar 2026 17:23:56 -0400 Subject: [PATCH] Surface per-IOM Redfish error details in network config query Previously fetch_current_config silently dropped the error string when an IOM failed to respond, showing only "No response". Now the specific error (HTTP status, connection refused, timeout, etc.) is printed below the table to aid diagnosis. Co-Authored-By: Claude Sonnet 4.6 --- es24n_conf.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/es24n_conf.py b/es24n_conf.py index b6a791f..fbb4587 100755 --- a/es24n_conf.py +++ b/es24n_conf.py @@ -809,6 +809,7 @@ def fetch_current_config(cfg: ShelfConfig) -> bool: any_ok = False rows = [] + errors = [] for iom in ("IOM1", "IOM2"): path = f"/redfish/v1/Managers/{iom}/EthernetInterfaces/1" @@ -852,6 +853,7 @@ def fetch_current_config(cfg: ShelfConfig) -> bool: rows.append([iom, mode_str, origin, ip, gateway, netmask]) else: rows.append([iom, _c(C.RED, "No response"), "--", "--", "--", "--"]) + errors.append((iom, str(data))) draw_table( ["IOM", "Mode", "Origin", "IP Address", "Gateway", "Subnet Mask"], @@ -860,6 +862,11 @@ def fetch_current_config(cfg: ShelfConfig) -> bool: ) print() + if errors: + for iom, err in errors: + error(f"{iom} query failed: {err}") + print() + if not any_ok: error("Neither IOM responded to the Redfish query.") error("Check that the serial cable is connected and the IOM is booted.")