summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZuul <zuul@review.opendev.org>2022-12-12 16:58:55 +0000
committerGerrit Code Review <review@openstack.org>2022-12-12 16:58:55 +0000
commitcccc4483b042fda6aa97e7c94a27771df9f6278d (patch)
treec87cdb1689dbd8ae04360a74f897bf71b6020654
parentb70b4180f970c272f56a5318f4baa0d056d6c81e (diff)
parent0215d3cd76d866b51dbd0fddb10f8fe2ad188e7a (diff)
downloadironic-cccc4483b042fda6aa97e7c94a27771df9f6278d.tar.gz
Merge "Fixes anaconda deploy for PXE boot"
-rw-r--r--doc/source/admin/drivers/ilo.rst8
-rw-r--r--ironic/common/pxe_utils.py3
-rw-r--r--ironic/drivers/modules/pxe_grub_config.template5
-rw-r--r--ironic/tests/unit/drivers/pxe_grub_config.template4
-rw-r--r--releasenotes/notes/fix_anaconda_pxe-6c75d42872424fec.yaml6
5 files changed, 26 insertions, 0 deletions
diff --git a/doc/source/admin/drivers/ilo.rst b/doc/source/admin/drivers/ilo.rst
index 65ff4f6da..b6825fc40 100644
--- a/doc/source/admin/drivers/ilo.rst
+++ b/doc/source/admin/drivers/ilo.rst
@@ -2211,6 +2211,14 @@ Events subscription is supported by ``ilo`` and ``ilo5`` hardware types with
``ilo`` vendor interface for Gen10 and Gen10 Plus servers. See
:ref:`node-vendor-passthru-methods` for more information.
+Anaconda based deployment
+^^^^^^^^^^^^^^^^^^^^^^^^^
+Deployment with ``anaconda`` deploy interface is supported by ``ilo`` and
+``ilo5`` hardware type and works with ``ilo-pxe`` and ``ilo-ipxe``
+boot interfaces. See :doc:`/admin/anaconda-deploy-interface` for
+more information.
+
+
.. _`ssacli documentation`: https://support.hpe.com/hpsc/doc/public/display?docId=c03909334
.. _`proliant-tools`: https://docs.openstack.org/diskimage-builder/latest/elements/proliant-tools/README.html
.. _`HPE iLO4 User Guide`: https://h20566.www2.hpe.com/hpsc/doc/public/display?docId=c03334051
diff --git a/ironic/common/pxe_utils.py b/ironic/common/pxe_utils.py
index 489f52737..371a1b5d5 100644
--- a/ironic/common/pxe_utils.py
+++ b/ironic/common/pxe_utils.py
@@ -265,6 +265,9 @@ def get_file_path_from_label(node_uuid, root_dir, label):
:param root_dir: Directory in which the image must be placed
:param label: Name of the image
"""
+ if label in ['ks_template', 'ks_cfg', 'stage2']:
+ path = os.path.join(CONF.deploy.http_root, node_uuid)
+ ensure_tree(path)
if label == 'ks_template':
return os.path.join(CONF.deploy.http_root, node_uuid,
'ks.cfg.template')
diff --git a/ironic/drivers/modules/pxe_grub_config.template b/ironic/drivers/modules/pxe_grub_config.template
index d8fc48673..3bcdf55d6 100644
--- a/ironic/drivers/modules/pxe_grub_config.template
+++ b/ironic/drivers/modules/pxe_grub_config.template
@@ -15,3 +15,8 @@ menuentry "boot_ramdisk" {
menuentry "boot_whole_disk" {
linuxefi chain.c32 mbr:{{ DISK_IDENTIFIER }}
}
+
+menuentry "boot_anaconda" {
+ linuxefi {{ pxe_options.aki_path }} text {{ pxe_options.pxe_append_params|default("", true) }} inst.ks={{ pxe_options.ks_cfg_url }} {% if pxe_options.repo_url %}inst.repo={{ pxe_options.repo_url }}{% else %}inst.stage2={{ pxe_options.stage2_url }}{% endif %}
+ initrdefi {{ pxe_options.ari_path }}
+}
diff --git a/ironic/tests/unit/drivers/pxe_grub_config.template b/ironic/tests/unit/drivers/pxe_grub_config.template
index c4410b489..95716cb16 100644
--- a/ironic/tests/unit/drivers/pxe_grub_config.template
+++ b/ironic/tests/unit/drivers/pxe_grub_config.template
@@ -16,3 +16,7 @@ menuentry "boot_whole_disk" {
linuxefi chain.c32 mbr:(( DISK_IDENTIFIER ))
}
+menuentry "boot_anaconda" {
+ linuxefi /tftpboot/1be26c0b-03f2-4d2e-ae87-c02d7f33c123/kernel text test_param inst.ks=http://fake/ks.cfg inst.stage2=http://fake/stage2
+ initrdefi /tftpboot/1be26c0b-03f2-4d2e-ae87-c02d7f33c123/ramdisk
+}
diff --git a/releasenotes/notes/fix_anaconda_pxe-6c75d42872424fec.yaml b/releasenotes/notes/fix_anaconda_pxe-6c75d42872424fec.yaml
new file mode 100644
index 000000000..ecdc3468c
--- /dev/null
+++ b/releasenotes/notes/fix_anaconda_pxe-6c75d42872424fec.yaml
@@ -0,0 +1,6 @@
+---
+fixes:
+ - |
+ Fixes URL based anaconda deploy to work in pxe boot. It also enables
+ grub based pxe anaconda deploy which is required for ``ilo`` hardware
+ type.