diff --git a/ironic/drivers/modules/irmc/raid.py b/ironic/drivers/modules/irmc/raid.py index 26737ea11e..c8a5b9537e 100644 --- a/ironic/drivers/modules/irmc/raid.py +++ b/ironic/drivers/modules/irmc/raid.py @@ -81,7 +81,7 @@ def _get_raid_adapter(node): :returns: RAID adapter dictionary, None otherwise. :raises: IRMCOperationError on an error from python-scciclient. """ - irmc_info = node.driver_info + irmc_info = irmc_common.parse_driver_info(node) LOG.info('iRMC driver is gathering RAID adapter info for node %s', node.uuid) try: @@ -137,7 +137,7 @@ def _create_raid_adapter(node): :raises: IRMCOperationError on an error from python-scciclient. """ - irmc_info = node.driver_info + irmc_info = irmc_common.parse_driver_info(node) target_raid_config = node.target_raid_config try: @@ -164,7 +164,7 @@ def _delete_raid_adapter(node): :raises: IRMCOperationError if SCCI failed from python-scciclient. """ - irmc_info = node.driver_info + irmc_info = irmc_common.parse_driver_info(node) try: client.elcm.delete_raid_configuration(irmc_info) diff --git a/ironic/tests/unit/drivers/modules/irmc/test_raid.py b/ironic/tests/unit/drivers/modules/irmc/test_raid.py index 94c77db2fb..eefe7ff3a5 100644 --- a/ironic/tests/unit/drivers/modules/irmc/test_raid.py +++ b/ironic/tests/unit/drivers/modules/irmc/test_raid.py @@ -22,6 +22,7 @@ from ironic.common import exception from ironic.conductor import task_manager from ironic import drivers as ironic_drivers from ironic.drivers.modules import deploy_utils +from ironic.drivers.modules.irmc import common as irmc_common from ironic.drivers.modules.irmc import raid from ironic.tests.unit.drivers.modules.irmc import test_common @@ -702,7 +703,7 @@ class IRMCRaidConfigurationInternalMethodsTestCase(test_common.BaseIRMCTest): shared=True) as task: raid._commit_raid_config(task) get_raid_adapter_mock.assert_called_once_with( - task.node.driver_info) + irmc_common.parse_driver_info(task.node)) update_raid_info_mock.assert_called_once_with( task.node, task.node.raid_config) set_async_step_flags_mock.assert_called_once_with( diff --git a/releasenotes/notes/irmc-change-the-way-to-get-irmc-info-in-raid-8ef5f5f60d1f534a.yaml b/releasenotes/notes/irmc-change-the-way-to-get-irmc-info-in-raid-8ef5f5f60d1f534a.yaml new file mode 100644 index 0000000000..7a07db887f --- /dev/null +++ b/releasenotes/notes/irmc-change-the-way-to-get-irmc-info-in-raid-8ef5f5f60d1f534a.yaml @@ -0,0 +1,5 @@ +--- +fixes: + - | + Fix a bug when configuring RAID caused by not converting the port value + to int type when the node managed by the `irmc` hardware type.