Boot from volume fails with 'iscsi' deploy interface
When boot from volume is requested for a node with 'iscsi' deploy interface it does not call the boot.prepare_instance and fails to create pxelinux.cfg file to boot with ipxe. This commit fixes the issue. Change-Id: Iff997e1786a933f50a25c9d89cb163a6aaec3f00 Closes-Bug: #1714436
This commit is contained in:
parent
2d5910128f
commit
49c4bba14e
@ -465,6 +465,7 @@ class ISCSIDeploy(AgentDeployMixin, base.DeployInterface):
|
||||
manager_utils.node_power_action(task, states.POWER_OFF)
|
||||
task.driver.network.remove_provisioning_network(task)
|
||||
task.driver.network.configure_tenant_networks(task)
|
||||
task.driver.boot.prepare_instance(task)
|
||||
manager_utils.node_power_action(task, states.POWER_ON)
|
||||
task.process_event('done')
|
||||
LOG.info('Deployment to node %s done', node.uuid)
|
||||
|
@ -712,6 +712,9 @@ class ISCSIDeployTestCase(db_base.DbTestCase):
|
||||
@mock.patch.object(flat_network.FlatNetwork,
|
||||
'remove_provisioning_network',
|
||||
spec_set=True, autospec=True)
|
||||
@mock.patch.object(pxe.PXEBoot,
|
||||
'prepare_instance',
|
||||
spec_set=True, autospec=True)
|
||||
@mock.patch.object(manager_utils, 'node_power_action', autospec=True)
|
||||
@mock.patch.object(iscsi_deploy, 'check_image_size', autospec=True)
|
||||
@mock.patch.object(iscsi_deploy, 'cache_instance_image', autospec=True)
|
||||
@ -719,6 +722,7 @@ class ISCSIDeployTestCase(db_base.DbTestCase):
|
||||
mock_cache_instance_image,
|
||||
mock_check_image_size,
|
||||
mock_node_power_action,
|
||||
mock_prepare_instance,
|
||||
mock_remove_network,
|
||||
mock_tenant_network,
|
||||
mock_write):
|
||||
@ -733,6 +737,7 @@ class ISCSIDeployTestCase(db_base.DbTestCase):
|
||||
self.assertFalse(mock_check_image_size.called)
|
||||
mock_remove_network.assert_called_once_with(mock.ANY, task)
|
||||
mock_tenant_network.assert_called_once_with(mock.ANY, task)
|
||||
mock_prepare_instance.assert_called_once_with(mock.ANY, task)
|
||||
self.assertEqual(2, mock_node_power_action.call_count)
|
||||
|
||||
@mock.patch.object(noop_storage.NoopStorage, 'detach_volumes',
|
||||
|
@ -0,0 +1,9 @@
|
||||
---
|
||||
fixes:
|
||||
- |
|
||||
Fixes an issue in boot from volume for ``iscsi`` deploy interface. Boot
|
||||
from a volume fails when it is requested for a node having ``iscsi``
|
||||
deploy interface, it doesn't create pxelinux.cfg file for mac,
|
||||
and failed to boot. See `bug 1714436
|
||||
<https://bugs.launchpad.net/ironic/+bug/1714436>`_ for details.
|
||||
|
Loading…
Reference in New Issue
Block a user