diff --git a/ironic/conductor/utils.py b/ironic/conductor/utils.py index 65cb52bdfc..e8c95896dd 100644 --- a/ironic/conductor/utils.py +++ b/ironic/conductor/utils.py @@ -1205,7 +1205,11 @@ def fast_track_able(task): and task.node.last_error is None # NOTE(dtantsur): Fast track makes zero sense for servicing and # may prevent normal clean-up from happening. - and task.node.provision_state not in states.SERVICING_STATES) + and task.node.provision_state not in states.SERVICING_STATES + # NOTE: Firmware updates require proper cleanup (e.g., virtual + # media ejection) and should not use fast-track. + and not task.node.driver_internal_info.get('redfish_fw_updates') + and not task.node.driver_internal_info.get('firmware_updates')) def value_within_timeout(value, timeout): diff --git a/ironic/tests/unit/conductor/test_utils.py b/ironic/tests/unit/conductor/test_utils.py index 5ae3674bf8..c7bbe3855f 100644 --- a/ironic/tests/unit/conductor/test_utils.py +++ b/ironic/tests/unit/conductor/test_utils.py @@ -2537,6 +2537,22 @@ def test_is_fast_track_not_in_servicing(self, mock_get_power): task.node.provision_state = states.SERVICING self.assertFalse(conductor_utils.is_fast_track(task)) + def test_is_fast_track_redfish_fw_updates(self, mock_get_power): + mock_get_power.return_value = states.POWER_ON + with task_manager.acquire( + self.context, self.node.uuid, shared=False) as task: + task.node.set_driver_internal_info('redfish_fw_updates', + [{'url': 'http://test'}]) + self.assertFalse(conductor_utils.is_fast_track(task)) + + def test_is_fast_track_firmware_updates(self, mock_get_power): + mock_get_power.return_value = states.POWER_ON + with task_manager.acquire( + self.context, self.node.uuid, shared=False) as task: + task.node.set_driver_internal_info('firmware_updates', + [{'url': 'http://test'}]) + self.assertFalse(conductor_utils.is_fast_track(task)) + class GetNodeNextStepsTestCase(db_base.DbTestCase): def setUp(self):