Configure missing nova services to expose vendordata over configdrive
Closes-Bug: #2049607 Change-Id: I14ae2be2e19ad06e3190e2e948bac7ce77e80d4b
This commit is contained in:
parent
77c18fa615
commit
0376f9dd8d
@ -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
|
||||
|
@ -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": [
|
||||
|
@ -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": [
|
||||
|
@ -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 }}
|
||||
|
||||
|
6
releasenotes/notes/bug-2049607-fb79ea2960b91bde.yaml
Normal file
6
releasenotes/notes/bug-2049607-fb79ea2960b91bde.yaml
Normal 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>`__
|
Loading…
Reference in New Issue
Block a user