gnocchi: fix external ceph integration when gnocchi-statsd is disabled

Closes-Bug: #1926914

Change-Id: I7f472a27eb9f2e1f267d7c4bac22236cdd076322
This commit is contained in:
Christian Berendt 2021-03-25 09:34:28 +01:00 committed by Mark Goddard
parent cdffc4845f
commit 6230971b92
2 changed files with 22 additions and 20 deletions

View File

@ -2,40 +2,37 @@
- name: Copy over ceph.conf file - name: Copy over ceph.conf file
template: template:
src: "{{ node_custom_config }}/gnocchi/ceph.conf" src: "{{ node_custom_config }}/gnocchi/ceph.conf"
dest: "{{ node_config_directory }}/{{ item }}/ceph.conf" dest: "{{ node_config_directory }}/{{ item.key }}/ceph.conf"
mode: "0660" mode: "0660"
become: true become: true
when: inventory_hostname in groups[item] when:
with_items: - inventory_hostname in groups[item.value.group]
- "gnocchi-api" - item.value.enabled | bool
- "gnocchi-metricd" with_dict: "{{ gnocchi_services }}"
- "gnocchi-statsd"
notify: notify:
- Restart {{ item }} container - Restart {{ item.key }} container
- name: Copy over ceph gnocchi keyring - name: Copy over ceph gnocchi keyring
copy: copy:
src: "{{ node_custom_config }}/gnocchi/{{ ceph_gnocchi_keyring }}" src: "{{ node_custom_config }}/gnocchi/{{ ceph_gnocchi_keyring }}"
dest: "{{ node_config_directory }}/{{ item }}/{{ ceph_gnocchi_keyring }}" dest: "{{ node_config_directory }}/{{ item.key }}/{{ ceph_gnocchi_keyring }}"
mode: "0660" mode: "0660"
become: true become: true
when: inventory_hostname in groups[item] when:
with_items: - inventory_hostname in groups[item.value.group]
- "gnocchi-api" - item.value.enabled | bool
- "gnocchi-metricd" with_dict: "{{ gnocchi_services }}"
- "gnocchi-statsd"
notify: notify:
- Restart {{ item }} container - Restart {{ item.key }} container
- name: Ensuring config directory has correct owner and permission - name: Ensuring config directory has correct owner and permission
become: true become: true
file: file:
path: "{{ node_config_directory }}/{{ item }}" path: "{{ node_config_directory }}/{{ item.key }}"
recurse: yes recurse: yes
owner: "{{ config_owner_user }}" owner: "{{ config_owner_user }}"
group: "{{ config_owner_group }}" group: "{{ config_owner_group }}"
when: inventory_hostname in groups[item] when:
with_items: - inventory_hostname in groups[item.value.group]
- "gnocchi-api" - item.value.enabled | bool
- "gnocchi-metricd" with_dict: "{{ gnocchi_services }}"
- "gnocchi-statsd"

View File

@ -0,0 +1,5 @@
---
fixes:
- |
Fixes an issue with Gnocchi when gnocchi-statsd is disabled.
`LP#1926914 <https://bugs.launchpad.net/bugs/1926914>`__