Merge "Fix setting persistent boot device does not work"
This commit is contained in:
commit
77bcccf98c
@ -220,6 +220,7 @@ def force_persistent_boot(task, device, persistent):
|
|||||||
node = task.node
|
node = task.node
|
||||||
driver_internal_info = node.driver_internal_info
|
driver_internal_info = node.driver_internal_info
|
||||||
if persistent:
|
if persistent:
|
||||||
|
driver_internal_info.pop('is_next_boot_persistent', None)
|
||||||
driver_internal_info['persistent_boot_device'] = device
|
driver_internal_info['persistent_boot_device'] = device
|
||||||
else:
|
else:
|
||||||
driver_internal_info['is_next_boot_persistent'] = False
|
driver_internal_info['is_next_boot_persistent'] = False
|
||||||
|
@ -158,8 +158,10 @@ class UtilsTestCase(db_base.DbTestCase):
|
|||||||
ret = driver_utils.force_persistent_boot(task, 'pxe', True)
|
ret = driver_utils.force_persistent_boot(task, 'pxe', True)
|
||||||
self.assertIsNone(ret)
|
self.assertIsNone(ret)
|
||||||
task.node.refresh()
|
task.node.refresh()
|
||||||
self.assertIn('persistent_boot_device',
|
self.assertIn(('persistent_boot_device', 'pxe'),
|
||||||
task.node.driver_internal_info)
|
task.node.driver_internal_info.items())
|
||||||
|
self.assertNotIn('is_next_boot_persistent',
|
||||||
|
task.node.driver_internal_info)
|
||||||
|
|
||||||
def test_force_persistent_boot_false(self):
|
def test_force_persistent_boot_false(self):
|
||||||
with task_manager.acquire(self.context, self.node.uuid,
|
with task_manager.acquire(self.context, self.node.uuid,
|
||||||
|
5
releasenotes/notes/bug-1626453-e8df46aa5db6dd5a.yaml
Normal file
5
releasenotes/notes/bug-1626453-e8df46aa5db6dd5a.yaml
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
fixes:
|
||||||
|
- This fixes the issue setting persistent boot device does not work
|
||||||
|
with ipmi_force_boot_device=True. For more information, see
|
||||||
|
https://bugs.launchpad.net/ironic/+bug/1626453
|
Loading…
Reference in New Issue
Block a user