diff --git a/ironic/drivers/irmc.py b/ironic/drivers/irmc.py index 0a61e1fb1f..f3c2d7c65f 100644 --- a/ironic/drivers/irmc.py +++ b/ironic/drivers/irmc.py @@ -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): diff --git a/ironic/tests/unit/drivers/test_irmc.py b/ironic/tests/unit/drivers/test_irmc.py index ba1cf88192..abfc12b425 100644 --- a/ironic/tests/unit/drivers/test_irmc.py +++ b/ironic/tests/unit/drivers/test_irmc.py @@ -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) diff --git a/releasenotes/notes/irmc-dealing-with-ipxe-boot-interface-incompatibility-7d0b2bdb8f9deb46.yaml b/releasenotes/notes/irmc-dealing-with-ipxe-boot-interface-incompatibility-7d0b2bdb8f9deb46.yaml new file mode 100644 index 0000000000..6d576f515a --- /dev/null +++ b/releasenotes/notes/irmc-dealing-with-ipxe-boot-interface-incompatibility-7d0b2bdb8f9deb46.yaml @@ -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 + `, + 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.