Merge "Fix "'NoneType' object is not iterable" in RAID"
This commit is contained in:
commit
4f6a456334
ironic
releasenotes/notes
@ -1120,7 +1120,9 @@ class RedfishRAID(base.RAIDInterface):
|
||||
raid_configs['pending'].setdefault(controller, []).append(
|
||||
logical_disk)
|
||||
|
||||
node.set_driver_internal_info('raid_configs', raid_configs)
|
||||
# Store only when async operation
|
||||
if reboot_required:
|
||||
node.set_driver_internal_info('raid_configs', raid_configs)
|
||||
|
||||
return raid_configs, reboot_required
|
||||
|
||||
@ -1182,7 +1184,9 @@ class RedfishRAID(base.RAIDInterface):
|
||||
response.task_monitor_uri)
|
||||
reboot_required = True
|
||||
|
||||
node.set_driver_internal_info('raid_configs', raid_configs)
|
||||
# Store only when async operation
|
||||
if reboot_required:
|
||||
node.set_driver_internal_info('raid_configs', raid_configs)
|
||||
|
||||
return raid_configs, reboot_required
|
||||
|
||||
|
@ -336,6 +336,8 @@ class RedfishRAIDTestCase(db_base.DbTestCase):
|
||||
self.assertEqual(mock_node_power_action.call_count, 0)
|
||||
self.assertEqual(mock_build_agent_options.call_count, 0)
|
||||
self.assertEqual(mock_prepare_ramdisk.call_count, 0)
|
||||
self.assertIsNone(
|
||||
task.node.driver_internal_info.get('raid_configs'))
|
||||
self.assertEqual(
|
||||
[{'controller': 'RAID controller 1',
|
||||
'id': '1',
|
||||
@ -1066,6 +1068,8 @@ class RedfishRAIDTestCase(db_base.DbTestCase):
|
||||
self.assertEqual(mock_node_power_action.call_count, 0)
|
||||
self.assertEqual(mock_build_agent_options.call_count, 0)
|
||||
self.assertEqual(mock_prepare_ramdisk.call_count, 0)
|
||||
self.assertIsNone(
|
||||
task.node.driver_internal_info.get('raid_configs'))
|
||||
self.assertEqual([], task.node.raid_config['logical_disks'])
|
||||
self.assertNotEqual(
|
||||
last_updated, task.node.raid_config['last_updated'])
|
||||
|
@ -0,0 +1,7 @@
|
||||
---
|
||||
fixes:
|
||||
- |
|
||||
Fixes ``'NoneType' object is not iterable`` in conductor logs for
|
||||
``redfish`` and ``idrac-redfish`` RAID clean and deploy steps. The message
|
||||
should no longer appear. For affected nodes re-create the node or delete
|
||||
``raid_configs`` entry from ``driver_internal_info`` field.
|
Loading…
x
Reference in New Issue
Block a user