fix idrac9 version handling in redfish vmedia boot interface

Fixes the redfish-virtual-media boot interface logic to provide more
clarity to a user when an error occurs as Dell iDRAC10s do not work
with the present virtual media code, and users should instead use
the idrac interface variant.

Change-Id: I96642a5e9b65eb08c3c42da3e35f376d5e264fbc
Signed-off-by: Julia Kreger <juliaashleykreger@gmail.com>
This commit is contained in:
Julia Kreger
2025-10-01 06:42:36 -07:00
parent 76fcfd7a09
commit 8acd96fb29
3 changed files with 42 additions and 5 deletions

View File

@@ -683,13 +683,19 @@ class RedfishVirtualMediaBoot(base.BootInterface):
if m.manager_type == sushy.MANAGER_TYPE_BMC]
if bmc_manager:
fwv = bmc_manager[0].firmware_version.split('.')
if int(fwv[0]) >= 6:
if int(fwv[0]) in [6, 7]:
return
# NOTE(TheJulia) Dell iDRAC10 reverted to 2.x.x.x for versioning
# and is also incompatible with the stock virtual media code.
# This may be fixed one day, but in the mean time, but the error
# provides specific guidance now.
raise exception.InvalidParameterValue(
_("The %(iface)s boot interface is not suitable for node "
"%(node)s with vendor %(vendor)s and BMC version %(fwv)s, "
"upgrade to 6.00.00.00 or newer or use "
"idrac-redfish-virtual-media instead")
"the interface only supports iDRAC9 versions between "
"6.0.0.0 and 7.x.x.x. Other versions are incompatible by "
"default and you should use the idrac-redfish-virtual"
"-media boot interface instead")
% {'iface': task.node.get_interface('boot'),
'node': task.node.uuid, 'vendor': vendor,
'fwv': bmc_manager[0].firmware_version})

View File

@@ -481,10 +481,10 @@ class RedfishVirtualMediaBootTestCase(db_base.DbTestCase):
task.node.properties['vendor'] = "Dell Inc."
self.assertRaisesRegex(
exception.InvalidParameterValue, "with vendor Dell Inc.",
exception.InvalidParameterValue, "iDRAC9",
task.driver.boot._validate_vendor, task, managers)
def test__validate_vendor_compatible_with_idrac(self):
def test__validate_vendor_compatible_with_idrac9_v6(self):
managers = [mock.Mock(firmware_version='6.00.00.00',
manager_type=sushy.MANAGER_TYPE_BMC)]
with task_manager.acquire(self.context, self.node.uuid,
@@ -505,6 +505,27 @@ class RedfishVirtualMediaBootTestCase(db_base.DbTestCase):
task.driver.boot._validate_vendor(task, managers)
def test__validate_vendor_compatible_with_idrac9_v7(self):
managers = [mock.Mock(firmware_version='7.00.00.00',
manager_type=sushy.MANAGER_TYPE_BMC)]
with task_manager.acquire(self.context, self.node.uuid,
shared=True) as task:
task.node.instance_info.update(
{'kernel': 'kernel',
'ramdisk': 'ramdisk',
'image_source': 'http://image/source'}
)
task.node.driver_info.update(
{'deploy_kernel': 'kernel',
'deploy_ramdisk': 'ramdisk',
'bootloader': 'bootloader'}
)
task.node.properties['vendor'] = "Dell Inc."
task.driver.boot._validate_vendor(task, managers)
@mock.patch.object(redfish_utils, 'parse_driver_info', autospec=True)
@mock.patch.object(deploy_utils, 'validate_image_properties',
autospec=True)

View File

@@ -0,0 +1,10 @@
---
fixes:
- |
Fixes an issue where the ``redfish-virtual-media`` interface is using version
ranges with Dell iDRAC BMCs to report compatibility. Dell has changed the
versioning structure for iDRAC10s which triggered the error. That being said,
it appears the iDRAC10s are also incompatible as well. The error message
now clearly indicates what versions are known to work with the stock
redfish virtual media support. Users should instead use the idrac variant
boot interface.