diff options
Diffstat (limited to 'ironic/drivers/modules/pxe.py')
-rw-r--r-- | ironic/drivers/modules/pxe.py | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/ironic/drivers/modules/pxe.py b/ironic/drivers/modules/pxe.py index fe93acefd..a55f5b9fd 100644 --- a/ironic/drivers/modules/pxe.py +++ b/ironic/drivers/modules/pxe.py @@ -27,6 +27,7 @@ from ironic.conductor import utils as manager_utils from ironic.conf import CONF from ironic.drivers import base from ironic.drivers.modules import agent_base +from ironic.drivers.modules import boot_mode_utils from ironic.drivers.modules import deploy_utils from ironic.drivers.modules import pxe_base LOG = logging.getLogger(__name__) @@ -114,21 +115,11 @@ class PXEAnacondaDeploy(agent_base.AgentBaseMixin, agent_base.HeartbeatMixin, def reboot_to_instance(self, task): node = task.node try: - # anaconda deploy will install the bootloader and the node is ready - # to boot from disk. - - deploy_utils.try_set_boot_device(task, boot_devices.DISK) - except Exception as e: - msg = (_("Failed to change the boot device to %(boot_dev)s " - "when deploying node %(node)s. Error: %(error)s") % - {'boot_dev': boot_devices.DISK, 'node': node.uuid, - 'error': e}) - agent_base.log_and_raise_deployment_error(task, msg) - - try: task.process_event('resume') self.clean_up(task) manager_utils.node_power_action(task, states.POWER_OFF) + deploy_utils.try_set_boot_device(task, boot_devices.DISK) + boot_mode_utils.configure_secure_boot_if_needed(task) task.driver.network.remove_provisioning_network(task) task.driver.network.configure_tenant_networks(task) manager_utils.node_power_action(task, states.POWER_ON) |