summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVanou Ishii <ishii.vanou@fujitsu.com>2019-06-27 03:46:40 -0400
committerJulia Kreger <juliaashleykreger@gmail.com>2019-07-03 14:29:59 +0000
commitc695232e3eb80b9e063337cb5f8f029509a0cb5e (patch)
treea1f2e7893e538e4c19629a66e62b0c536ec847b2
parent79279dda58c9d52bb1dc5a9c1acb4a65ab7bca46 (diff)
downloadironic-c695232e3eb80b9e063337cb5f8f029509a0cb5e.tar.gz
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 66b07398310db1b4c26e1ba9fda247328478ed67)
-rw-r--r--ironic/drivers/irmc.py3
-rw-r--r--ironic/tests/unit/drivers/test_irmc.py11
-rw-r--r--releasenotes/notes/irmc-dealing-with-ipxe-boot-interface-incompatibility-7d0b2bdb8f9deb46.yaml17
3 files changed, 29 insertions, 2 deletions
diff --git a/ironic/drivers/irmc.py b/ironic/drivers/irmc.py
index 0a61e1fb1..f3c2d7c65 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 ba1cf8819..abfc12b42 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 000000000..6d576f515
--- /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
+ <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.