diff --git a/ansible/group_vars/all/kolla b/ansible/group_vars/all/kolla index 5fc45ee29..60fcf9fbd 100644 --- a/ansible/group_vars/all/kolla +++ b/ansible/group_vars/all/kolla @@ -314,6 +314,7 @@ kolla_enable_heat: "yes" kolla_enable_horizon: "yes" kolla_enable_influxdb: "no" kolla_enable_ironic: "yes" +kolla_enable_ironic_ipxe: "no" kolla_enable_kafka: "no" kolla_enable_kibana: "{{ 'yes' if kolla_enable_central_logging | bool else 'no' }}" kolla_enable_magnum: "no" diff --git a/ansible/roles/kolla-ansible/defaults/main.yml b/ansible/roles/kolla-ansible/defaults/main.yml index 9384e04fd..abbdc28aa 100644 --- a/ansible/roles/kolla-ansible/defaults/main.yml +++ b/ansible/roles/kolla-ansible/defaults/main.yml @@ -207,6 +207,7 @@ kolla_openstack_logging_debug: #kolla_enable_horizon: #kolla_enable_influxdb: #kolla_enable_ironic: +#kolla_enable_ironic_ipxe: #kolla_enable_kafka: #kolla_enable_kuryr: #kolla_enable_magnum: diff --git a/ansible/roles/kolla-ansible/templates/overcloud-services.j2 b/ansible/roles/kolla-ansible/templates/overcloud-services.j2 index b8491621b..d1d245b4d 100644 --- a/ansible/roles/kolla-ansible/templates/overcloud-services.j2 +++ b/ansible/roles/kolla-ansible/templates/overcloud-services.j2 @@ -216,6 +216,9 @@ ironic [ironic-pxe:children] ironic +[ironic-ipxe:children] +ironic + # Magnum [magnum-api:children] magnum diff --git a/ansible/roles/kolla-ansible/vars/main.yml b/ansible/roles/kolla-ansible/vars/main.yml index 6cb220df9..29dd9a657 100644 --- a/ansible/roles/kolla-ansible/vars/main.yml +++ b/ansible/roles/kolla-ansible/vars/main.yml @@ -87,6 +87,7 @@ kolla_feature_flags: - horizon - influxdb - ironic + - ironic_ipxe - ironic_pxe_uefi - kafka - karbor diff --git a/ansible/roles/kolla-openstack/templates/ironic-dnsmasq.conf.j2 b/ansible/roles/kolla-openstack/templates/ironic-dnsmasq.conf.j2 index 5bf19b696..a4a96ad90 100644 --- a/ansible/roles/kolla-openstack/templates/ironic-dnsmasq.conf.j2 +++ b/ansible/roles/kolla-openstack/templates/ironic-dnsmasq.conf.j2 @@ -8,12 +8,25 @@ dhcp-option=option:tftp-server,{% raw %}{{ hostvars[inventory_hostname]['ansible dhcp-option=option:server-ip-address,{% raw %}{{ hostvars[inventory_hostname]['ansible_' ~ api_interface | replace('-', '_')]['ipv4']['address'] }}{% endraw %} +dhcp-option=210,/tftpboot/ + {% if kolla_inspector_default_gateway %} dhcp-option=3,{{ kolla_inspector_default_gateway }} {% endif %} -dhcp-option=option:bootfile-name,pxelinux.0 -dhcp-option=210,/tftpboot/ +{% raw %}{% if enable_ironic_ipxe | bool %} +dhcp-match=ipxe,175 +dhcp-match=set:efi,option:client-arch,7 +dhcp-match=set:efi,option:client-arch,9 +# Client is already running iPXE; move to next stage of chainloading +dhcp-option=tag:ipxe,option:bootfile-name,{{ ironic_ipxe_url }}/inspector.ipxe +# Client is PXE booting over EFI without iPXE ROM, +# send EFI version of iPXE chainloader +dhcp-option=tag:efi,tag:!ipxe,option:bootfile-name,ipxe.efi +dhcp-option=option:bootfile-name,{{ ironic_dnsmasq_boot_file | default('undionly.kpxe') }} +{% else %} +dhcp-option=option:bootfile-name,{{ ironic_dnsmasq_boot_file | default('pxelinux.0') }} +{% endif %}{% endraw %} {% if kolla_extra_ironic_dnsmasq %} {{ kolla_extra_ironic_dnsmasq }} diff --git a/etc/kayobe/kolla.yml b/etc/kayobe/kolla.yml index dafdade74..ca588c0f8 100644 --- a/etc/kayobe/kolla.yml +++ b/etc/kayobe/kolla.yml @@ -174,6 +174,7 @@ #kolla_enable_horizon: #kolla_enable_influxdb: #kolla_enable_ironic: +#kolla_enable_ironic_ipxe: #kolla_enable_ironic_pxe_uefi: #kolla_enable_iscsid: #kolla_enable_karbor: