summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNisha Agarwal <agarwalnisha1980@gmail.com>2022-10-01 23:59:48 +0000
committerNisha Agarwal <agarwalnisha1980@gmail.com>2022-10-07 11:31:09 +0000
commit0215d3cd76d866b51dbd0fddb10f8fe2ad188e7a (patch)
treea9966cbbecdabb1f4ccdd3f074b09a968160a7d9
parentca54c4df26071937599529857dfe0dda33ca743e (diff)
downloadironic-0215d3cd76d866b51dbd0fddb10f8fe2ad188e7a.tar.gz
Fixes anaconda deploy for PXE boot
Fixes the anaconda deploy(URL based) and adds anaconda_boot entry to pxe_grub_config.template so that ProLiants can be also deployed in PXE mode. Story: 2010347 Task: 46490 Change-Id: I4b9e3a2060d9d73de5cab31cc08d3a764dc56e90
-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.