Merge "ironic-pxe: support pxe uefi mode"

This commit is contained in:
Zuul 2018-01-09 08:14:26 +00:00 committed by Gerrit Code Review
commit b052e60e4f
6 changed files with 31 additions and 2 deletions

View File

@ -423,6 +423,7 @@ enable_horizon_zun: "{{ enable_zun | bool }}"
enable_hyperv: "no" enable_hyperv: "no"
enable_influxdb: "no" enable_influxdb: "no"
enable_ironic: "no" enable_ironic: "no"
enable_ironic_pxe_uefi: "no"
enable_iscsid: "{{ (enable_cinder | bool and enable_cinder_backend_iscsi | bool) or enable_ironic | bool }}" enable_iscsid: "{{ (enable_cinder | bool and enable_cinder_backend_iscsi | bool) or enable_ironic | bool }}"
enable_karbor: "no" enable_karbor: "no"
enable_kuryr: "no" enable_kuryr: "no"

View File

@ -72,6 +72,19 @@
# Only required when Ironic inspector is in use. # Only required when Ironic inspector is in use.
- groups['ironic-inspector'] | length > 0 - groups['ironic-inspector'] | length > 0
- inventory_hostname in groups['ironic-pxe'] - inventory_hostname in groups['ironic-pxe']
- not enable_ironic_pxe_uefi
- name: Copying ironic_pxe_uefi.cfg default
template:
src: "{{ item }}"
dest: "{{ node_config_directory }}/ironic-pxe/default"
with_first_found:
- "{{ node_custom_config }}/ironic/ironic_pxe_uefi.default"
- "{{ node_custom_config }}/ironic/{{ inventory_hostname }}/ironic_pxe_uefi.default"
- "ironic_pxe_uefi.default.j2"
when:
- inventory_hostname in groups['ironic-pxe']
- enable_ironic_pxe_uefi | bool
- name: Copying ironic-agent kernel and initramfs - name: Copying ironic-agent kernel and initramfs
copy: copy:
@ -84,6 +97,7 @@
# Only required when Ironic inspector is in use. # Only required when Ironic inspector is in use.
- groups['ironic-inspector'] | length > 0 - groups['ironic-inspector'] | length > 0
- inventory_hostname in groups['ironic-pxe'] - inventory_hostname in groups['ironic-pxe']
- not enable_ironic_pxe_uefi
- name: Check if policies shall be overwritten - name: Check if policies shall be overwritten
local_action: stat path="{{ node_custom_config }}/ironic/policy.json" local_action: stat path="{{ node_custom_config }}/ironic/policy.json"

View File

@ -37,6 +37,7 @@
# Only required when Ironic inspector is in use. # Only required when Ironic inspector is in use.
- groups['ironic-inspector'] | length > 0 - groups['ironic-inspector'] | length > 0
- inventory_hostname in groups['ironic-pxe'] - inventory_hostname in groups['ironic-pxe']
- not enable_ironic_pxe_uefi
with_items: with_items:
- "ironic-agent.kernel" - "ironic-agent.kernel"
- "ironic-agent.initramfs" - "ironic-agent.initramfs"

View File

@ -1,7 +1,11 @@
{% set pxe_dir = ('/tftpboot/grub' if kolla_base_distro in ['ubuntu', 'debian'] else '/tftpboot/EFI/centos') if enable_ironic_pxe_uefi | bool else '/tftpboot/pxelinux.cfg' %}
{% set pxe_cfg = 'grub.cfg' if enable_ironic_pxe_uefi | bool else 'default' %}
{ {
"command": "/usr/sbin/in.tftpd --verbose --foreground --user root --address 0.0.0.0:69 --map-file /map-file /tftpboot", "command": "/usr/sbin/in.tftpd --verbose --foreground --user root --address 0.0.0.0:69 --map-file /map-file /tftpboot",
"config_files": [ "config_files": [
{% if groups['ironic-inspector'] | length > 0 %} {% if groups['ironic-inspector'] | length > 0 %}
{% if not enable_ironic_pxe_uefi %}
{ {
"source": "{{ container_config_directory }}/ironic-agent.kernel", "source": "{{ container_config_directory }}/ironic-agent.kernel",
"dest": "/tftpboot/ironic-agent.kernel", "dest": "/tftpboot/ironic-agent.kernel",
@ -14,9 +18,10 @@
"owner": "root", "owner": "root",
"perm": "0644" "perm": "0644"
}, },
{% endif %}
{ {
"source": "{{ container_config_directory }}/default", "source": "{{ container_config_directory }}/default",
"dest": "/tftpboot/pxelinux.cfg/default", "dest": "{{ pxe_dir }}/{{ pxe_cfg }}",
"owner": "root", "owner": "root",
"perm": "0644" "perm": "0644"
} }
@ -24,7 +29,7 @@
], ],
"permissions": [ "permissions": [
{ {
"path": "/tftpboot/pxelinux.cfg", "path": "{{ pxe_dir }}",
"owner": "ironic:ironic", "owner": "ironic:ironic",
"recurse": true "recurse": true
} }

View File

@ -0,0 +1,7 @@
set default=master
set timeout=5
set hidden_timeout_quiet=false
menuentry "master" {
configfile /tftpboot/$net_default_ip.conf
}

View File

@ -185,6 +185,7 @@ kolla_internal_vip_address: "10.10.10.254"
#enable_hyperv: "no" #enable_hyperv: "no"
#enable_influxdb: "no" #enable_influxdb: "no"
#enable_ironic: "no" #enable_ironic: "no"
#enable_ironic_pxe_uefi: "no"
#enable_karbor: "no" #enable_karbor: "no"
#enable_kuryr: "no" #enable_kuryr: "no"
#enable_magnum: "no" #enable_magnum: "no"