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
130 lines
5.9 KiB
YAML
130 lines
5.9 KiB
YAML
---
|
|
- name: Ensure the Kolla OpenStack configuration directories exist
|
|
file:
|
|
path: "{{ item.dest }}"
|
|
state: directory
|
|
mode: 0750
|
|
with_items: "{{ kolla_openstack_custom_config }}"
|
|
when: item.enabled | bool
|
|
|
|
- name: Ensure the Kolla OpenStack configuration files exist
|
|
template:
|
|
src: "{{ item.src }}"
|
|
dest: "{{ kolla_node_custom_config_path }}/{{ item.dest }}"
|
|
mode: 0640
|
|
with_items:
|
|
- { src: blazar.conf.j2, dest: blazar.conf, enabled: "{{ kolla_enable_blazar }}" }
|
|
- { src: ceilometer.conf.j2, dest: ceilometer.conf, enabled: "{{ kolla_enable_ceilometer }}" }
|
|
- { src: ceph.conf.j2, dest: ceph.conf, enabled: "{{ kolla_enable_ceph }}" }
|
|
- { src: cinder.conf.j2, dest: cinder.conf, enabled: "{{ kolla_enable_cinder }}" }
|
|
- { src: designate.conf.j2, dest: designate.conf, enabled: "{{ kolla_enable_designate }}" }
|
|
- { src: galera.cnf.j2, dest: galera.cnf, enabled: "{{ kolla_enable_mariadb }}" }
|
|
- { src: glance.conf.j2, dest: glance.conf, enabled: "{{ kolla_enable_glance }}" }
|
|
- { src: global.conf.j2, dest: global.conf, enabled: true }
|
|
- { src: gnocchi.conf.j2, dest: gnocchi.conf, enabled: "{{ kolla_enable_gnocchi }}" }
|
|
- { src: grafana.ini.j2, dest: grafana.ini, enabled: "{{ kolla_enable_grafana }}" }
|
|
- { src: heat.conf.j2, dest: heat.conf, enabled: "{{ kolla_enable_heat }}" }
|
|
- { src: ironic.conf.j2, dest: ironic.conf, enabled: "{{ kolla_enable_ironic }}" }
|
|
- { src: ironic-inspector.conf.j2, dest: ironic-inspector.conf, enabled: "{{ kolla_enable_ironic }}" }
|
|
- { src: kafka.server.properties.j2, dest: kafka.server.properties, enabled: "{{ kolla_enable_kafka }}" }
|
|
- { src: keystone.conf.j2, dest: keystone.conf, enabled: "{{ kolla_enable_keystone }}" }
|
|
- { src: magnum.conf.j2, dest: magnum.conf, enabled: "{{ kolla_enable_magnum }}" }
|
|
- { src: manila.conf.j2, dest: manila.conf, enabled: "{{ kolla_enable_manila }}" }
|
|
- { src: ml2_conf.ini.j2, dest: neutron/ml2_conf.ini, enabled: "{{ kolla_enable_neutron }}" }
|
|
- { src: murano.conf.j2, dest: murano.conf, enabled: "{{ kolla_enable_murano }}" }
|
|
- { 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: 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 }}" }
|
|
when: item.enabled | bool
|
|
|
|
- name: Ensure ironic inspector kernel and ramdisk images are present
|
|
vars:
|
|
image_download_url: "{{ item.url }}"
|
|
image_download_checksum_url: "{{ item.checksum_url }}"
|
|
image_download_checksum_algorithm: "{{ item.checksum_algorithm }}"
|
|
image_download_path: "{{ item.path }}"
|
|
image_download_dest: "{{ item.dest }}"
|
|
include_role:
|
|
name: image-download
|
|
with_items:
|
|
- url: "{{ kolla_inspector_ipa_kernel_upstream_url }}"
|
|
checksum_url: "{{ kolla_inspector_ipa_kernel_checksum_url }}"
|
|
checksum_algorithm: "{{ kolla_inspector_ipa_kernel_checksum_algorithm }}"
|
|
path: "{{ kolla_inspector_ipa_kernel_path }}"
|
|
dest: "{{ kolla_node_custom_config_path }}/ironic/ironic-agent.kernel"
|
|
- url: "{{ kolla_inspector_ipa_ramdisk_upstream_url }}"
|
|
checksum_url: "{{ kolla_inspector_ipa_ramdisk_checksum_url }}"
|
|
checksum_algorithm: "{{ kolla_inspector_ipa_ramdisk_checksum_algorithm }}"
|
|
path: "{{ kolla_inspector_ipa_ramdisk_path }}"
|
|
dest: "{{ kolla_node_custom_config_path }}/ironic/ironic-agent.initramfs"
|
|
when: kolla_enable_ironic | bool
|
|
loop_control:
|
|
label: "{{ item.dest }}"
|
|
|
|
# We support a fairly flexible mechanism of dropping config file templates into
|
|
# an 'extra' config directory, and passing these through to kolla-ansible. We
|
|
# look for matching files in the source directory to template, and also remove
|
|
# any unexpected files from the destination, to support removal of files.
|
|
|
|
- name: Find extra configuration files
|
|
find:
|
|
path: "{{ item.src }}"
|
|
patterns: "{{ item.patterns }}"
|
|
recurse: true
|
|
with_items: "{{ kolla_openstack_custom_config }}"
|
|
register: find_src_result
|
|
|
|
- name: Find previously generated extra configuration files
|
|
find:
|
|
path: "{{ item.dest }}"
|
|
patterns: "{{ item.patterns }}"
|
|
with_items: "{{ kolla_openstack_custom_config }}"
|
|
register: find_dest_result
|
|
|
|
- name: Ensure extra configuration parent directories are present
|
|
file:
|
|
path: "{{ item.0.item.dest }}/{{ item.1.path | relpath(item.0.item.src) | dirname }}"
|
|
recurse: true
|
|
state: directory
|
|
with_subelements:
|
|
- "{{ find_src_result.results }}"
|
|
- files
|
|
- skip_missing: true
|
|
when:
|
|
- item.0.item.enabled | bool
|
|
- item.1.path | basename not in item.0.item.ignore | default([])
|
|
|
|
- name: Ensure extra configuration files exist
|
|
template:
|
|
src: "{{ item.1.path }}"
|
|
dest: "{{ item.0.item.dest }}/{{ item.1.path | relpath(item.0.item.src) }}"
|
|
mode: 0640
|
|
with_subelements:
|
|
- "{{ find_src_result.results }}"
|
|
- files
|
|
- skip_missing: true
|
|
when:
|
|
- item.0.item.enabled | bool
|
|
- item.1.path | basename not in item.0.item.ignore | default([])
|
|
|
|
- name: Ensure unnecessary extra configuration files are absent
|
|
file:
|
|
path: "{{ item.1.path }}"
|
|
state: absent
|
|
with_subelements:
|
|
- "{{ find_dest_result.results }}"
|
|
- files
|
|
- skip_missing: true
|
|
when:
|
|
- not item.0.item.enabled or
|
|
item.1.path | basename not in src_files
|
|
- item.1.path | basename not in item.0.item.ignore | default([])
|
|
vars:
|
|
# Find the source result that corresponds to this one.
|
|
src_result: "{{ (find_src_result.results | selectattr('item', 'equalto', item.0.item) | list)[0] }}"
|
|
# Find the list of files in the source.
|
|
src_files: "{{ src_result.files | map(attribute='path') | map('basename') | list }}"
|