diff options
| author | Zuul <zuul@review.openstack.org> | 2018-05-15 18:16:14 +0000 |
|---|---|---|
| committer | Gerrit Code Review <review@openstack.org> | 2018-05-15 18:16:14 +0000 |
| commit | 42117a49e3b8730c106533e1c30f0fa248e01e93 (patch) | |
| tree | 324535d6f83e87ad11c68a77521202e0a3e569ad | |
| parent | 0c25f7c7ec7114c57f13ac856228eccd2fc687c0 (diff) | |
| parent | d63930e3dd80b313822e9f65a76b9c338ef9e389 (diff) | |
| download | kolla-42117a49e3b8730c106533e1c30f0fa248e01e93.tar.gz kolla-42117a49e3b8730c106533e1c30f0fa248e01e93.zip | |
Merge "copy iPXE NBP to /tftpboot during PXE bootstrap"
| -rw-r--r-- | docker/ironic/ironic-pxe/extend_start.sh | 20 | ||||
| -rw-r--r-- | releasenotes/notes/support-ipxe-chainload-273d55741a83a2a7.yaml | 4 |
2 files changed, 21 insertions, 3 deletions
diff --git a/docker/ironic/ironic-pxe/extend_start.sh b/docker/ironic/ironic-pxe/extend_start.sh index f7297988c..0ba57a834 100644 --- a/docker/ironic/ironic-pxe/extend_start.sh +++ b/docker/ironic/ironic-pxe/extend_start.sh @@ -1,8 +1,7 @@ #!/bin/bash -# Bootstrap and exit if KOLLA_BOOTSTRAP variable is set. This catches all cases -# of the KOLLA_BOOTSTRAP variable being set, including empty. -if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then + +function prepare_pxe { chown -R ironic: /tftpboot for pxe_file in /var/lib/tftpboot/pxelinux.0 /var/lib/tftpboot/chain.c32 /usr/lib/syslinux/pxelinux.0 \ /usr/lib/syslinux/chain.c32 /usr/lib/PXELINUX/pxelinux.0 \ @@ -11,6 +10,21 @@ if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then cp "$pxe_file" /tftpboot fi done +} + +function prepare_ipxe { + if [[ "${KOLLA_BASE_DISTRO}" =~ debian|ubuntu ]]; then + cp /usr/lib/ipxe/{undionly.kpxe,ipxe.efi} /tftpboot + elif [[ "${KOLLA_BASE_DISTRO}" =~ centos|oraclelinux|rhel ]]; then + cp /usr/share/ipxe/{undionly.kpxe,ipxe.efi} /tftpboot + fi +} + +# Bootstrap and exit if KOLLA_BOOTSTRAP variable is set. This catches all cases +# of the KOLLA_BOOTSTRAP variable being set, including empty. +if [[ "${!KOLLA_BOOTSTRAP[@]}" ]]; then + prepare_pxe + prepare_ipxe exit 0 fi diff --git a/releasenotes/notes/support-ipxe-chainload-273d55741a83a2a7.yaml b/releasenotes/notes/support-ipxe-chainload-273d55741a83a2a7.yaml new file mode 100644 index 000000000..e234ba678 --- /dev/null +++ b/releasenotes/notes/support-ipxe-chainload-273d55741a83a2a7.yaml @@ -0,0 +1,4 @@ +--- +features: + - Copy iPXE images to TFTP root during ironic_pxe bootstrap. This + allows you to chainload iPXE from a PXE environment. |
