d80dac222209da40950998fa9de50d1f1277a2f0
The Redfish API at 127.0.0.1 is only accessible from within the IOM's
own shell, not directly from the host over the serial cable. The previous
approach of making urllib HTTPS requests from the host to 127.0.0.1 was
fundamentally incorrect.
Changes:
- serial_port.py: add optional per-call timeout override to
read_until_quiet() so curl responses have enough time to arrive
- workflow_serial.py:
- add _login_serial_console() — sends username/password over serial
and waits for a shell prompt before proceeding
- add _serial_redfish_request() — builds and sends a curl command
over the serial session, parses HTTP status and JSON from the output
- fetch_current_config(), apply_configuration(), _apply_iom() now
accept and use a SerialPort instance via _serial_redfish_request()
- configure_shelf() calls _login_serial_console() after collecting
the password, before making any Redfish calls
- remove unused _redfish_request import (HTTP transport no longer
used in the serial workflow)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
ES24N IOM Configuration Tool
An interactive CLI tool for configuring network settings and updating firmware on TrueNAS ES24N expansion shelf IOM (I/O Module) controllers via the Redfish API.
Requirements
- Python 3 (standard library only — no external dependencies)
- Root or serial device group permissions (for serial-based configuration)
Usage
python3 es24n_conf.py
If the serial device is inaccessible, re-run with sudo:
sudo python3 es24n_conf.py
Features
Serial Network Configuration
Connects to the IOM over a USB serial cable and configures each IOM's management network interface via the Redfish API over the serial loopback (127.0.0.1). Used for initial setup when the IOM has no IP address yet.
- Supports both Static IP and DHCP configuration
- Configures IOM1 and IOM2 independently in a single session
- Displays current network settings before making any changes
- Supports configuring multiple shelves back-to-back in one session
Firmware Updates
Connects to each IOM directly over the network and updates IOM and/or Fabric Card firmware via the Redfish API.
- Select IOM1 only, IOM2 only, or both
- Update IOM firmware, Fabric Card firmware, or both in a single run
- Scans the current working directory for firmware files automatically
- Displays current firmware versions before and after the update
- Polls update task progress automatically
Workflow
Configure a Shelf (Serial)
- Connect the serial cable from the ES24N IOM1 port to the controller's USB port
- Run the tool and select Configure a new ES24N shelf
- The tool detects the serial device, opens the connection, and prompts for the BMC admin password
- Current network settings for IOM1 and IOM2 are displayed
- Choose to apply a new Static IP or DHCP configuration, or leave settings unchanged
- Changes are applied via Redfish PATCH over the serial loopback (
127.0.0.1) - Verify each expander appears in TrueNAS under System Settings > Enclosure > NVMe-oF Expansion Shelves before disconnecting the serial cable
Update Firmware
- Ensure this system has network access to the IOM management interfaces
- Run the tool and select Update IOM / Fabric Card Firmware
- Enter the admin password and select which IOM(s) to update
- Enter the IP address(es) for the selected IOM(s)
- Select what to update (IOM firmware, Fabric Card firmware, or both)
- Select firmware file(s) from the auto-detected list or enter a custom path
- The tool uploads, applies, and monitors each update, then restarts the affected components
HA Systems: Update the passive IOM first. After updating both IOMs on one controller, initiate a TrueNAS failover and re-run the tool for the other controller.
File Structure
es24n_conf.py ← Entry point — run this
modules/
ui.py ← Display helpers and input prompts
serial_port.py ← Serial port driver (no pyserial required)
models.py ← IOMConfig and ShelfConfig data classes
redfish.py ← Redfish API client (shared by all workflows)
workflow_serial.py ← Serial-based network configuration workflow
workflow_firmware.py ← Firmware update workflow
Notes
- Setting a static IP requires two sequential Redfish PATCH requests due to a known ES24N firmware bug. The tool handles this automatically.
- Firmware uploads are performed over the network — uploading over the 115200-baud serial connection would be impractically slow.
- The firmware file must be re-uploaded between the IOM firmware and Fabric Card firmware steps as it does not persist after the first update.
Description
Languages
Python
100%