Log secure boot access failures at INFO level

Handle Supermicro BMC `OemLicenseNotPassed` error.

Story: 2011154
Change-Id: I288099bf276357c884bdee798be5200dea0cf046
This commit is contained in:
cid 2025-01-30 10:54:17 +01:00
parent 953dec09ef
commit 62a44faf6a
2 changed files with 14 additions and 1 deletions

@ -1165,11 +1165,20 @@ class RedfishManagement(base.ManagementInterface):
runtime error.
:raises: UnsupportedDriverExtension if secure boot is
not supported by the hardware.
:returns: Boolean
:returns: Boolean or None if status cannot be retrieved
"""
system = redfish_utils.get_system(task.node)
try:
return system.secure_boot.enabled
except sushy.exceptions.AccessError as e:
if 'OemLicenseNotPassed' in str(e):
# NOTE(cid): Supermicro gear requires a license to report
# secure boot status.
LOG.info("Secure boot status request through Redfish failed "
"for node %(node)s: %(error)s",
{'node': task.node.uuid, 'error': e})
return None
raise
except sushy.exceptions.MissingAttributeError:
raise exception.UnsupportedDriverExtension(
driver=task.node.driver, extension='get_secure_boot_state')

@ -0,0 +1,4 @@
---
fixes:
- |
Log non-recoverable secure boot status check failures at INFO level.