From 05c09523fa8b67778fbde56c7c1190796ff5688f Mon Sep 17 00:00:00 2001 From: Mark Goddard Date: Fri, 1 Apr 2022 17:23:20 +0100 Subject: [PATCH] ironic: default to ipxe booting Enable the Ironic ipxe boot interface by default, following a similar change in Ironic [1]. Drop the kolla_enable_ironic_ipxe flag, following a similar change in Kolla Ansible [2]. Both PXE and iPXE are now enabled by default. Users may revert to using PXE for ironic inspector's dnsmasq, by setting ironic_dnsmasq_serve_ipxe to false in etc/kayobe/kolla/globals.yml. [1] https://review.opendev.org/c/openstack/ironic/+/816824 [2] https://review.opendev.org/c/openstack/kolla-ansible/+/834512/ Depends-On: https://review.opendev.org/c/openstack/kolla-ansible/+/832159 Depends-On: https://review.opendev.org/c/openstack/kolla-ansible/+/834511 Depends-On: https://review.opendev.org/c/openstack/kolla-ansible/+/837069 Change-Id: Ifb80bd15a20c9cfb8fbc6e0f6ac23baae631a18e --- ansible/group_vars/all/ironic | 3 ++- ansible/group_vars/all/kolla | 1 - ansible/roles/kolla-ansible/defaults/main.yml | 1 - ansible/roles/kolla-ansible/templates/kolla/globals.yml | 2 +- .../roles/kolla-ansible/templates/overcloud-services.j2 | 4 ++-- ansible/roles/kolla-ansible/vars/main.yml | 1 - ansible/roles/kolla-openstack/defaults/main.yml | 3 --- dev/functions | 5 ----- etc/kayobe/kolla.yml | 1 - playbooks/kayobe-overcloud-base/overrides.yml.j2 | 7 ------- .../notes/ironic-default-ipxe-063a5a24dc9c38f0.yaml | 8 ++++++++ roles/kayobe-diagnostics/files/get_logs.sh | 4 ++-- 12 files changed, 15 insertions(+), 25 deletions(-) create mode 100644 releasenotes/notes/ironic-default-ipxe-063a5a24dc9c38f0.yaml diff --git a/ansible/group_vars/all/ironic b/ansible/group_vars/all/ironic index 3a50debcd..7b2ba9566 100644 --- a/ansible/group_vars/all/ironic +++ b/ansible/group_vars/all/ironic @@ -16,11 +16,12 @@ kolla_ironic_default_bios_interface: no-bios # Specify the list of boot interfaces to load during service initialization. kolla_ironic_enabled_boot_interfaces: + - ipxe - pxe # Default boot interface to be used for nodes that do not have boot_interface # field set. -kolla_ironic_default_boot_interface: pxe +kolla_ironic_default_boot_interface: ipxe # Specify the list of console interfaces to load during service initialization. kolla_ironic_enabled_console_interfaces: diff --git a/ansible/group_vars/all/kolla b/ansible/group_vars/all/kolla index 1e3623d40..98ed7af21 100644 --- a/ansible/group_vars/all/kolla +++ b/ansible/group_vars/all/kolla @@ -536,7 +536,6 @@ kolla_enable_grafana: "{{ kolla_enable_monasca | bool }}" kolla_enable_heat: "{{ kolla_enable_openstack_core | bool }}" kolla_enable_horizon: "{{ kolla_enable_openstack_core | bool }}" kolla_enable_influxdb: "{{ kolla_enable_monasca | bool or kolla_enable_cloudkitty | bool }}" -kolla_enable_ironic_ipxe: "no" kolla_enable_ironic: "no" kolla_enable_ironic_neutron_agent: "{{ kolla_enable_neutron | bool and kolla_enable_ironic | bool }}" kolla_enable_iscsid: "{{ kolla_enable_cinder | bool and kolla_enable_cinder_backend_iscsi | bool }}" diff --git a/ansible/roles/kolla-ansible/defaults/main.yml b/ansible/roles/kolla-ansible/defaults/main.yml index 0cf05946f..05b3ecf21 100644 --- a/ansible/roles/kolla-ansible/defaults/main.yml +++ b/ansible/roles/kolla-ansible/defaults/main.yml @@ -210,7 +210,6 @@ 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/kolla/globals.yml b/ansible/roles/kolla-ansible/templates/kolla/globals.yml index a68273da0..507854caa 100644 --- a/ansible/roles/kolla-ansible/templates/kolla/globals.yml +++ b/ansible/roles/kolla-ansible/templates/kolla/globals.yml @@ -428,7 +428,7 @@ ironic_dnsmasq_default_gateway: {{ kolla_inspector_default_gateway }} ironic_inspector_kernel_cmdline_extras: {{ kolla_inspector_extra_kernel_options | to_nice_yaml }} {% endif %} -# PXE bootloader file for Ironic Inspector, relative to /tftpboot. +# PXE bootloader file for Ironic Inspector, relative to /var/lib/ironic/tftpboot. #ironic_dnsmasq_boot_file: "pxelinux.0" # Configure ironic upgrade option, due to currently kolla support diff --git a/ansible/roles/kolla-ansible/templates/overcloud-services.j2 b/ansible/roles/kolla-ansible/templates/overcloud-services.j2 index be29a6444..f7c18a1ac 100644 --- a/ansible/roles/kolla-ansible/templates/overcloud-services.j2 +++ b/ansible/roles/kolla-ansible/templates/overcloud-services.j2 @@ -251,10 +251,10 @@ ironic {{ groups['controllers'][0] }} {% endif %} -[ironic-pxe:children] +[ironic-tftp:children] ironic -[ironic-ipxe:children] +[ironic-http:children] ironic # Magnum diff --git a/ansible/roles/kolla-ansible/vars/main.yml b/ansible/roles/kolla-ansible/vars/main.yml index aed9f6cd9..30a76b5c0 100644 --- a/ansible/roles/kolla-ansible/vars/main.yml +++ b/ansible/roles/kolla-ansible/vars/main.yml @@ -138,7 +138,6 @@ kolla_feature_flags: - horizon_zun - influxdb - ironic - - ironic_ipxe - ironic_neutron_agent - ironic_pxe_uefi - iscsid diff --git a/ansible/roles/kolla-openstack/defaults/main.yml b/ansible/roles/kolla-openstack/defaults/main.yml index 6d2ad45de..b46909813 100644 --- a/ansible/roles/kolla-openstack/defaults/main.yml +++ b/ansible/roles/kolla-openstack/defaults/main.yml @@ -265,9 +265,6 @@ kolla_ironic_pxe_append_params: [] # Free form extra configuration to append to ironic.conf. kolla_extra_ironic: -# Enable iPXE support in Ironic -kolla_enable_ironic_ipxe: - ############################################################################### # Ironic inspector configuration. diff --git a/dev/functions b/dev/functions index 436d33e57..dd5a3b54f 100644 --- a/dev/functions +++ b/dev/functions @@ -822,11 +822,6 @@ function to_bool { fi } -function is_ipxe_enabled { - flag="$(run_kayobe configuration dump --host controllers[0] --var-name kolla_enable_ironic_ipxe)" - to_bool "$flag" -} - function is_cinder_enabled { flag="$(run_kayobe configuration dump --host controllers[0] --var-name kolla_enable_cinder)" to_bool "$flag" diff --git a/etc/kayobe/kolla.yml b/etc/kayobe/kolla.yml index 9885e94cf..816397e3f 100644 --- a/etc/kayobe/kolla.yml +++ b/etc/kayobe/kolla.yml @@ -328,7 +328,6 @@ #kolla_enable_horizon_zun: #kolla_enable_influxdb: #kolla_enable_ironic: -#kolla_enable_ironic_ipxe: #kolla_enable_ironic_neutron_agent: #kolla_enable_ironic_pxe_uefi: #kolla_enable_iscsid: diff --git a/playbooks/kayobe-overcloud-base/overrides.yml.j2 b/playbooks/kayobe-overcloud-base/overrides.yml.j2 index db69a00cf..0c674193c 100644 --- a/playbooks/kayobe-overcloud-base/overrides.yml.j2 +++ b/playbooks/kayobe-overcloud-base/overrides.yml.j2 @@ -37,13 +37,6 @@ compute_libvirt_sasl_password: "{% raw %}{{ lookup('password', '/tmp/libvirt-sas # Enable ironic for testing baremetal compute. kolla_enable_ironic: true -{% if ironic_boot_mode == 'uefi' %} -# iPXE is currently required for UEFI boot mode in Kolla Ansible. -kolla_enable_ironic_ipxe: true -kolla_ironic_enabled_boot_interfaces: [ipxe] -kolla_ironic_default_boot_interface: ipxe -{% endif %} - {% if tls_enabled %} kolla_enable_nova_libvirt_container: false compute_libvirt_enable_tls: true diff --git a/releasenotes/notes/ironic-default-ipxe-063a5a24dc9c38f0.yaml b/releasenotes/notes/ironic-default-ipxe-063a5a24dc9c38f0.yaml new file mode 100644 index 000000000..ecdf3b965 --- /dev/null +++ b/releasenotes/notes/ironic-default-ipxe-063a5a24dc9c38f0.yaml @@ -0,0 +1,8 @@ +--- +upgrade: + - | + Starting with Yoga, Ironic has changed the default PXE from plain PXE to + iPXE. + Kayobe follows this upstream decision but allows users to revert to + the previous default of plain PXE. For details, please refer to + Kolla Ansible's documentation. diff --git a/roles/kayobe-diagnostics/files/get_logs.sh b/roles/kayobe-diagnostics/files/get_logs.sh index eab1e8aad..a98bc9a96 100644 --- a/roles/kayobe-diagnostics/files/get_logs.sh +++ b/roles/kayobe-diagnostics/files/get_logs.sh @@ -20,8 +20,8 @@ copy_logs() { # Don't save the IPA images. rm ${LOG_DIR}/kayobe_configs/kolla/config/ironic/ironic-agent.{kernel,initramfs} rm ${LOG_DIR}/kolla_configs/config/ironic/ironic-agent.{kernel,initramfs} - rm ${LOG_DIR}/kolla_node_configs/ironic-ipxe/ironic-agent.{kernel,initramfs} - rm ${LOG_DIR}/kolla_node_configs/ironic-pxe/ironic-agent.{kernel,initramfs} + rm ${LOG_DIR}/kolla_node_configs/ironic-http/ironic-agent.{kernel,initramfs} + rm ${LOG_DIR}/kolla_node_configs/ironic-tftp/ironic-agent.{kernel,initramfs} fi if [[ -n ${PREVIOUS_CONFIG_DIR} ]] && [[ -d ${PREVIOUS_CONFIG_DIR} ]]; then mkdir -p ${LOG_DIR}/previous_{kayobe,kolla}_configs