Deal with iPXE boot interface incompatibility in Train

In Train cycle, iPXE boot with [pxe]ipxe_enabled option in
ironic.conf file will be removed. And ipxe boot interface
will be the only boot interface to deploy Ironic node with
iPXE. Till Train, iRMC driver has supported iPXE boot with
[pxe]ipxe_enabled option.

This commit copes with this incompatibility and supports
ipxe boot interface by adding ipxe.iPXEBoot to
supported_boot_interface.

Change-Id: Iec2284c2d101aebadd9d1b531c44794e2d4efacf
Related-Bug: #1628069
(cherry picked from commit 66b0739831)
This commit is contained in:
Vanou Ishii 2019-06-27 03:46:40 -04:00 committed by Julia Kreger
parent 79279dda58
commit c695232e3e
3 changed files with 29 additions and 2 deletions

View File

@ -20,6 +20,7 @@ from ironic.drivers import generic
from ironic.drivers.modules import agent
from ironic.drivers.modules import inspector
from ironic.drivers.modules import ipmitool
from ironic.drivers.modules import ipxe
from ironic.drivers.modules.irmc import bios
from ironic.drivers.modules.irmc import boot
from ironic.drivers.modules.irmc import inspect
@ -48,7 +49,7 @@ class IRMCHardware(generic.GenericHardware):
# NOTE: Support for pxe boot is deprecated, and will be
# removed from the list in the future.
return [boot.IRMCVirtualMediaBoot, boot.IRMCPXEBoot,
pxe.PXEBoot]
ipxe.iPXEBoot, pxe.PXEBoot]
@property
def supported_console_interfaces(self):

View File

@ -21,6 +21,7 @@ from ironic.drivers import irmc
from ironic.drivers.modules import agent
from ironic.drivers.modules import inspector
from ironic.drivers.modules import ipmitool
from ironic.drivers.modules import ipxe
from ironic.drivers.modules.irmc import bios as irmc_bios
from ironic.drivers.modules.irmc import raid
from ironic.drivers.modules import iscsi_deploy
@ -35,8 +36,9 @@ class IRMCHardwareTestCase(db_base.DbTestCase):
irmc.boot.check_share_fs_mounted_patcher.start()
self.addCleanup(irmc.boot.check_share_fs_mounted_patcher.stop)
super(IRMCHardwareTestCase, self).setUp()
self.config_temp_dir('http_root', group='deploy')
self.config(enabled_hardware_types=['irmc'],
enabled_boot_interfaces=['irmc-virtual-media'],
enabled_boot_interfaces=['irmc-virtual-media', 'ipxe'],
enabled_console_interfaces=['ipmitool-socat'],
enabled_deploy_interfaces=['iscsi', 'direct'],
enabled_inspect_interfaces=['irmc'],
@ -185,3 +187,10 @@ class IRMCHardwareTestCase(db_base.DbTestCase):
noop.NoBIOS)
self.assertIsInstance(task.driver.rescue,
agent.AgentRescue)
def test_override_with_boot_configuration(self):
node = obj_utils.create_test_node(
self.context, driver='irmc',
boot_interface='ipxe')
with task_manager.acquire(self.context, node.id) as task:
self.assertIsInstance(task.driver.boot, ipxe.iPXEBoot)

View File

@ -0,0 +1,17 @@
---
upgrade:
- |
iRMC hardware type deals with iPXE boot interface incompatibility.
To iPXE boot with ``ipxe`` boot interface, *(1)* add ``ipxe`` to
``enabled_boot_interfaces`` in ``ironic.conf``, *(2)* set up tftp &
http server following `Ironic document on iPXE boot configuration
<https://docs.openstack.org/ironic/latest/install/configure-pxe.html>`,
then *(3)* create/set baremetal node with ``--boot-interface ipxe``.
fixes:
- |
iRMC hardware type deals with iPXE boot interface incompatibility.
From Stein, ``[pxe]ipxe_enabled`` option has been deprecated and will be
removed in preference to ``ipxe`` boot interface in Train cycle. Till then,
iRMC hardware type supports iPXE boot through ``[pxe]ipxe_enabled`` option.
To cope with this incompatibility, iRMC hardware type supports ``ipxe``
boot interface.