Fix inspector iPXE boot with UEFI compute nodes

The IPA ramdisk fails to boot on UEFI compute nodes with iPXE. We see
the following error on the console, followed by a kernel panic:

Fix kernel panic-not syncing: VFS: unable to mount root fs on unknown
block(0,0)

The cause is the lack of an initrd=ironic-agent.initramfs kernel
argument in inspector.ipxe.

The initrd argument is present in the kolla-ansible version of
inspector.ipxe, and now contains all parameters that we need (since
Rocky), so this change simply removes our custom template, and passes
through the extra kernel argument option configuration value.

Story: 2006214
Task: 35804

Story: 2006213
Task: 35803

Depends-On: https://review.opendev.org/670566
Change-Id: I8a103b7c6d3dd1f0433f922ae90deae9b92c0c78
This commit is contained in:
Mark Goddard 2019-07-12 12:44:09 +01:00
parent 650919f527
commit 0ee55e19fa
11 changed files with 15 additions and 27 deletions

View File

@ -299,6 +299,7 @@
kolla_inspector_dhcp_pool_start: "{{ inspection_net_name | net_inspection_allocation_pool_start }}"
kolla_inspector_dhcp_pool_end: "{{ inspection_net_name | net_inspection_allocation_pool_end }}"
kolla_inspector_default_gateway: "{{ inspection_net_name | net_inspection_gateway or inspection_net_name | net_gateway }}"
kolla_inspector_extra_kernel_options: "{{ inspector_extra_kernel_options }}"
# While kayobe has its own support for installing an NTP daemon, the
# kolla-ansible baremetal role does a one-time sync which is useful.
kolla_enable_host_ntp: "{{ ntp_service_enabled }}"

View File

@ -202,7 +202,6 @@
kolla_inspector_keep_ports: "{{ inspector_keep_ports }}"
kolla_inspector_enable_discovery: "{{ inspector_enable_discovery }}"
kolla_inspector_discovery_enroll_node_driver: "{{ inspector_discovery_enroll_node_driver }}"
kolla_inspector_extra_kernel_options: "{{ inspector_extra_kernel_options }}"
# Ironic inspector swift store configuration. Currently only supports the
# 'fake' inspection store.
kolla_inspector_enable_swift: "{{ inspector_store_enabled }}"

View File

@ -219,6 +219,9 @@ kolla_inspector_dhcp_pool_end:
# Default gateway to use for inspection network.
kolla_inspector_default_gateway:
# List of extra kernel parameters for the inspector default PXE configuration.
kolla_inspector_extra_kernel_options: []
####################
# OpenStack options
####################

View File

@ -294,6 +294,10 @@ ironic_dnsmasq_dhcp_range: {{ kolla_inspector_dhcp_pool_start }},{{ kolla_inspec
{% if kolla_inspector_default_gateway %}
ironic_dnsmasq_default_gateway: {{ kolla_inspector_default_gateway }}
{% endif %}
{% if kolla_inspector_extra_kernel_options %}
ironic_inspector_kernel_cmdline_extras:
{{ kolla_inspector_extra_kernel_options | to_nice_yaml }}
{% endif %}
######################################
# Manila - Shared File Systems Options

View File

@ -262,9 +262,6 @@ kolla_inspector_enable_discovery:
# The Ironic driver with which to register newly discovered nodes.
kolla_inspector_discovery_enroll_node_driver:
# List of extra kernel parameters for the inspector default PXE configuration.
kolla_inspector_extra_kernel_options: []
# URL of Ironic Python Agent (IPA) kernel image for Ironic Inspector.
# Mutually exclusive with kolla_inspector_ipa_kernel_path.
kolla_inspector_ipa_kernel_upstream_url:

View File

@ -92,8 +92,7 @@ def test_service_ini_file(host, path):
@pytest.mark.parametrize(
'path',
['ironic/ironic-agent.initramfs',
'ironic/ironic-agent.kernel',
'ironic/pxelinux.default'])
'ironic/ironic-agent.kernel'])
def test_service_non_ini_file(host, path):
# TODO(mgoddard): Check config file contents.
path = os.path.join('/etc/kolla/config', path)

View File

@ -35,8 +35,6 @@
- { src: neutron.conf.j2, dest: neutron.conf, enabled: "{{ kolla_enable_neutron }}" }
- { src: nova.conf.j2, dest: nova.conf, enabled: "{{ kolla_enable_nova }}" }
- { src: octavia.conf.j2, dest: octavia.conf, enabled: "{{ kolla_enable_octavia }}" }
- { src: pxelinux.default.j2, dest: ironic/pxelinux.default, enabled: "{{ kolla_enable_ironic }}" }
- { src: inspector.ipxe.j2, dest: ironic/inspector.ipxe, enabled: "{{ kolla_enable_ironic_ipxe }}" }
- { src: sahara.conf.j2, dest: sahara.conf, enabled: "{{ kolla_enable_sahara }}" }
- { src: backup.my.cnf.j2, dest: backup.my.cnf, enabled: "{{ kolla_enable_xtrabackup }}" }
- { src: zookeeper.cfg.j2, dest: zookeeper.cfg, enabled: "{{ kolla_enable_zookeeper }}" }

View File

@ -1,10 +0,0 @@
#!ipxe
:retry_dhcp
dhcp || goto retry_dhcp
:retry_boot
imgfree
kernel --timeout 30000 {% raw %}{{ ironic_ipxe_url }}/ironic-agent.kernel{% endraw %} ipa-inspection-callback-url={% raw %}http://{{ kolla_internal_vip_address }}:{{ ironic_inspector_port }}/v1/continue{% endraw %} systemd.journald.forward_to_console=yes {{ kolla_inspector_extra_kernel_options | join(' ') }} {% raw %}BOOTIF=${mac}{% endraw %} || goto retry_boot
initrd --timeout 30000 {% raw %}{{ ironic_ipxe_url }}/ironic-agent.initramfs{% endraw %} || goto retry_boot
boot

View File

@ -1,7 +0,0 @@
default introspect
label introspect
kernel ironic-agent.kernel
append initrd=ironic-agent.initramfs ipa-inspection-callback-url={% raw %}http://{{ kolla_internal_vip_address }}:{{ ironic_inspector_port }}/v1/continue{% endraw %} systemd.journald.forward_to_console=yes {{ kolla_inspector_extra_kernel_options | join(' ') }}
ipappend 3

View File

@ -107,8 +107,6 @@ kolla_openstack_custom_config:
# These are templated by kayobe, so don't remove them.
- ironic-agent.initramfs
- ironic-agent.kernel
- pxelinux.default
- inspector.ipxe
# Kafka.
- src: "{{ kolla_extra_config_path }}/kafka"
dest: "{{ kolla_node_custom_config_path }}/kafka"

View File

@ -0,0 +1,6 @@
---
fixes:
- |
Fixes an issue with hardware inspection of bare metal compute nodes
configured to use UEFI. See `story 2006214
<https://storyboard.openstack.org/#!/story/2006214>`__ for details.