Merge "Configure missing nova services to expose vendordata over configdrive"

This commit is contained in:
Zuul 2024-02-02 11:42:14 +00:00 committed by Gerrit Code Review
commit 50ad7c6681
5 changed files with 54 additions and 0 deletions

View File

@ -40,6 +40,19 @@
when:
- nova_policy.results
- name: Check for vendordata file
stat:
path: "{{ node_custom_config }}/nova/vendordata.json"
delegate_to: localhost
run_once: True
register: vendordata_file
- name: Set vendordata file path
set_fact:
vendordata_file_path: "{{ vendordata_file.stat.path }}"
when:
- vendordata_file.stat.exists
- name: Copying over config.json files for services
become: true
template:
@ -201,3 +214,21 @@
with_dict: "{{ nova_cell_services }}"
notify:
- "Restart {{ item.key }} container"
- name: Copying over vendordata file to containers
vars:
service: "{{ nova_cell_services[item] }}"
copy:
src: "{{ vendordata_file_path }}"
dest: "{{ node_config_directory }}/{{ item }}/vendordata.json"
mode: "0660"
become: True
when:
- vendordata_file_path is defined
- inventory_hostname in groups[service.group]
- service.enabled | bool
notify:
- "Restart {{ item }} container"
with_items:
- nova-compute
- nova-compute-ironic

View File

@ -12,6 +12,12 @@
"dest": "/etc/nova/{{ nova_policy_file }}",
"owner": "nova",
"perm": "0600"
}{% endif %}{% if vendordata_file_path is defined %},
{
"source": "{{ container_config_directory }}/vendordata.json",
"dest": "/etc/nova/vendordata.json",
"owner": "nova",
"perm": "0600"
}{% endif %}
],
"permissions": [

View File

@ -67,6 +67,12 @@
"dest": "/etc/nova/provider_config/provider_config.yaml",
"owner": "nova",
"perm": "0600"
}{% endif %}{% if vendordata_file_path is defined %},
{
"source": "{{ container_config_directory }}/vendordata.json",
"dest": "/etc/nova/vendordata.json",
"owner": "nova",
"perm": "0600"
}{% endif %}
],
"permissions": [

View File

@ -36,6 +36,11 @@ compute_monitors=nova.compute.monitors.cpu.virt_driver
transport_url = {{ nova_cell_rpc_transport_url }}
{% if vendordata_file_path is defined and (service_name == 'nova-compute' or service_name == 'nova-compute-ironic') %}
[api]
vendordata_jsonfile_path = /etc/nova/vendordata.json
{% endif %}
[conductor]
workers = {{ nova_cell_conductor_workers }}

View File

@ -0,0 +1,6 @@
---
fixes:
- |
Fixes configuration of nova-compute and nova-compute-ironic,
that will enable exposing vendordata over configdrive.
`LP#2049607 <https://bugs.launchpad.net/kolla-ansible/+bug/2049607>`__