Merge "Make generation of prometheus.yml idempotent when using custom override files"

This commit is contained in:
Zuul 2025-12-18 16:14:38 +00:00 committed by Gerrit Code Review
commit 2d7728ff32
2 changed files with 13 additions and 2 deletions

View file

@ -71,8 +71,8 @@
become: true
vars:
service: "{{ prometheus_services['prometheus-server'] }}"
common_overrides: "{{ prometheus_common_config_overrides_result.files | map(attribute='path') | list }}"
host_overrides: "{{ prometheus_host_config_overrides_result.files | map(attribute='path') | list }}"
common_overrides: "{{ prometheus_common_config_overrides_result.files | map(attribute='path') | list | sort }}"
host_overrides: "{{ prometheus_host_config_overrides_result.files | map(attribute='path') | list | sort }}"
merge_yaml:
sources: "{{ [item] + common_overrides + host_overrides }}"
dest: "{{ node_config_directory }}/prometheus-server/prometheus.yml"

View file

@ -0,0 +1,11 @@
---
fixes:
- |
Make generation of prometheus.yml consistent when using custom override
files.
Previous behaviour would lead to changes in prometheus.yml on every run
when custom override files were used, as the find result was not sorted.
This could lead to unnecessary restarts and unreadable diffs of the
prometheus service.
`LP#2126635 <https://launchpad.net/bugs/2126635>`__