Browse Source

Merge "Allow operators to customise Nova vendor info"

tags/8.0.0.0b1
Zuul 5 months ago
parent
commit
daec9a177d

+ 1
- 0
ansible/roles/nova/handlers/main.yml View File

@@ -287,6 +287,7 @@
287 287
       or nova_conf.changed | bool
288 288
       or policy_overwriting.changed | bool
289 289
       or vcenter_ca_file | bool
290
+      or nova_compute_release_file | bool
290 291
       or nova_compute_container.changed | bool
291 292
 
292 293
 - name: Restart nova-compute-ironic container

+ 19
- 0
ansible/roles/nova/tasks/config.yml View File

@@ -178,6 +178,25 @@
178 178
   notify:
179 179
     - Restart nova-compute container
180 180
 
181
+- name: Copying 'release' file for nova_compute
182
+  vars:
183
+    service: "{{ nova_services['nova-compute'] }}"
184
+  copy:
185
+    src: "{{ item }}"
186
+    dest: "{{ node_config_directory }}/nova-compute/release"
187
+  with_first_found:
188
+    - files:
189
+        - "{{ node_custom_config }}/nova_compute/{{ inventory_hostname }}/release"
190
+        - "{{ node_custom_config }}/nova_compute/release"
191
+        - "{{ node_custom_config }}/nova/release"
192
+      skip: true
193
+  register: nova_compute_release_file
194
+  when:
195
+    - inventory_hostname in groups[service.group]
196
+    - service.enabled | bool
197
+  notify:
198
+    - Restart nova-compute container
199
+
181 200
 - name: Copying over existing policy file
182 201
   become: true
183 202
   vars:

+ 8
- 1
ansible/roles/nova/templates/nova-compute.json.j2 View File

@@ -24,7 +24,14 @@
24 24
             "dest": "/etc/nova/vmware_ca",
25 25
             "owner": "nova",
26 26
             "perm": "0600"
27
-        }{% endif %}
27
+        }{% endif %},
28
+        {
29
+            "source": "{{ container_config_directory }}/release",
30
+            "dest": "/etc/nova/release",
31
+            "owner": "nova",
32
+            "perm": "0600",
33
+            "optional": true
34
+        }
28 35
     ],
29 36
     "permissions": [
30 37
         {

+ 12
- 0
releasenotes/notes/config-nova-release-97e6fc526a94740e.yaml View File

@@ -0,0 +1,12 @@
1
+---
2
+features:
3
+  - |
4
+    You can customise vendor info that is used through out Nova via the
5
+    'release' file. To do this place a file called 'release' in one of the
6
+    following locations:
7
+    /etc/kolla/config/nova/release
8
+    /etc/kolla/config/nova_compute/release
9
+    /etc/kolla/config/nova_compute/{{ inventory_hostname }}/release
10
+
11
+    An example of the file can be seen at
12
+    https://github.com/openstack/nova/blob/master/etc/nova/release.sample

Loading…
Cancel
Save