Files
Riccardo Pittau 97605e7724 Add read_timeout and connect_timeout parameters for faster BMC failure
When a BMC is unreachable, sushy would wait up to 60 seconds per
connection attempt before timing out. This can cause significant
delays in scenarios where nodes are being deleted with invalid BMC
addresses.

This change adds two new parameters to the Sushy class:

- read_timeout: HTTP read timeout in seconds (default: 60, unchanged
  from previous behavior)
- connect_timeout: TCP connection timeout in seconds (default: None)

When connect_timeout is specified, sushy uses separate timeouts for
establishing the TCP connection versus waiting for response data.
This allows faster failure when a BMC is unreachable (e.g., 10s)
while still allowing longer read timeouts for slow BMCs (e.g., 60s).

The change is fully backwards compatible - existing code works
unchanged, and the new parameters are opt-in.

Assisted-By: Claude Sonnet 4.5
Change-Id: Ib9fa5ea0decf20768dc92abd8e7512187e80e353
Signed-off-by: Riccardo Pittau <elfosardo@gmail.com>
2025-12-23 09:55:36 +01:00
..