This commit optimizes the SEL event monitoring script used during
subcloud enrollment. The script now runs a single ipmitool sel list -v
command instead of invoking ipmitool sel list followed by multiple
ipmitool sel get calls.
A new mode has been added to the monitoring script that monitors for
all success events, returning the last one, allowing the caller to
detect if multiple events were sent and skip directly to the latest
completed phase. If a failure event is detected, the script exits
immediately.
The IPMI codes used by auto-restore and enrollment have been updated
from OEM-reserved codes to the “System Event” sensor type, which the
BMC never interprets as an error.
Additionally, the script now stops sending the expected_region_name
restore override for factory restores, since the factory-installed
subcloud region name is not expected to match the system controller's
region name.
Test Plan:
01. PASS – Run subcloud enrollment and verify the following:
- Events sent sequentially with delays are returned individually.
- Events sent quickly without delays return only the latest event
captured in the polling interval.
- A failure event is returned immediately when detected.
- Success events followed by a failure event return the failure
event as soon as it appears.
- If no events are detected, the script exits with a timeout error.
02. PASS – Run subcloud auto-restore and factory restore to verify the
new codes are used and that both operations complete successfully.
03. PASS – Time the full enroll-init operation on a slow BMC and verify
it completes faster than the previous implementation.
Story: 2011455
Task: 52858
Change-Id: Ib379e4e4c8308361357914f21fd8d73ab5bafbb4
Signed-off-by: Gustavo Herzmann <gustavo.herzmann@windriver.com>