From 8acd96fb2900f6ee9222e03761c06cdea6b8b0e8 Mon Sep 17 00:00:00 2001 From: Julia Kreger Date: Wed, 1 Oct 2025 06:42:36 -0700 Subject: [PATCH] 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 --- ironic/drivers/modules/redfish/boot.py | 12 ++++++--- .../unit/drivers/modules/redfish/test_boot.py | 25 +++++++++++++++++-- ...vmedia-version-range-a083a3385cef4a5d.yaml | 10 ++++++++ 3 files changed, 42 insertions(+), 5 deletions(-) create mode 100644 releasenotes/notes/fix-redfish-idrac-vmedia-version-range-a083a3385cef4a5d.yaml diff --git a/ironic/drivers/modules/redfish/boot.py b/ironic/drivers/modules/redfish/boot.py index 1a4a0c5372..b0d6b0b00c 100644 --- a/ironic/drivers/modules/redfish/boot.py +++ b/ironic/drivers/modules/redfish/boot.py @@ -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}) diff --git a/ironic/tests/unit/drivers/modules/redfish/test_boot.py b/ironic/tests/unit/drivers/modules/redfish/test_boot.py index c32d7ccbf1..1bf25091b1 100644 --- a/ironic/tests/unit/drivers/modules/redfish/test_boot.py +++ b/ironic/tests/unit/drivers/modules/redfish/test_boot.py @@ -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) diff --git a/releasenotes/notes/fix-redfish-idrac-vmedia-version-range-a083a3385cef4a5d.yaml b/releasenotes/notes/fix-redfish-idrac-vmedia-version-range-a083a3385cef4a5d.yaml new file mode 100644 index 0000000000..845f8df79a --- /dev/null +++ b/releasenotes/notes/fix-redfish-idrac-vmedia-version-range-a083a3385cef4a5d.yaml @@ -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.