aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGrzegorz Bialas <grzegorz@stackhpc.com>2026-04-16 16:30:22 +0200
committerBartosz Bezak <bartosz@stackhpc.com>2026-04-20 10:12:16 +0000
commit49eb67aa84f073e3434fad11defa0bc07d710236 (patch)
tree19507b2e24d5b9ee1951c275245fd5d4c390a0d6
parent88aecb6009d2ef6e543849cd9930d1bd80cfca2f (diff)
downloadkolla-ansible-49eb67aa84f073e3434fad11defa0bc07d710236.tar.gz
kolla-ansible-49eb67aa84f073e3434fad11defa0bc07d710236.zip
Fix prometheus bootstrapping mysqld-exporter
When monitoring is deployed on hosts outside of control group it will not pass service_enabled_and_mapped_to_host filter and bootstrapping step will not be executed, resulting with lack of prometheus user in mariadb. Closes-bug: #2148551 Change-Id: I520131aa976609dd2c1f5b95e4e5fc5fb8fc6e57 Signed-off-by: Grzegorz Bialas <grzegorz@stackhpc.com>
-rw-r--r--ansible/roles/prometheus/tasks/deploy.yml3
-rw-r--r--releasenotes/notes/fix-bootstrapping-mysqld-exporter-f10a4ff269c2395b.yaml6
2 files changed, 8 insertions, 1 deletions
diff --git a/ansible/roles/prometheus/tasks/deploy.yml b/ansible/roles/prometheus/tasks/deploy.yml
index 8aba64ae6..89576f144 100644
--- a/ansible/roles/prometheus/tasks/deploy.yml
+++ b/ansible/roles/prometheus/tasks/deploy.yml
@@ -6,7 +6,8 @@
ansible.builtin.import_tasks: check-containers.yml
- name: Bootstrap prometheus service
- ansible.builtin.import_tasks: bootstrap.yml
+ ansible.builtin.include_tasks: bootstrap.yml
+ when: inventory_hostname in groups['prometheus-mysqld-exporter']
- name: Flush handlers
ansible.builtin.meta: flush_handlers
diff --git a/releasenotes/notes/fix-bootstrapping-mysqld-exporter-f10a4ff269c2395b.yaml b/releasenotes/notes/fix-bootstrapping-mysqld-exporter-f10a4ff269c2395b.yaml
new file mode 100644
index 000000000..b857b9d73
--- /dev/null
+++ b/releasenotes/notes/fix-bootstrapping-mysqld-exporter-f10a4ff269c2395b.yaml
@@ -0,0 +1,6 @@
+---
+fixes:
+ - |
+ Fixes bootstrapping of prometheus-mysqld-exporter which is failing creating
+ mariadb user when monitoring group is configured to be deployed on separate
+ hosts.