From 5fbf1614a24138b0ff735ad742cffdd4707f5ef2 Mon Sep 17 00:00:00 2001 From: katarimanoj Date: Tue, 28 Nov 2023 18:27:09 +0530 Subject: [PATCH] Fix prometheus error on ceph dashboard Ceph dashboard config for promethues is set to ctlplane(provisioning) network during deployment due to which dashboard couldn't reach prometheus API. While the haproxy config uses storage n/w for prometheus. This patch will update the deployment to use storage n/w for promethus dashboard config. Resolves: rhbz#2251176 Change-Id: I65de317bede578cf6a702980687ac55871ecf97f --- .../tripleo_cephadm/tasks/dashboard/dashboard.yaml | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/tripleo_ansible/roles/tripleo_cephadm/tasks/dashboard/dashboard.yaml b/tripleo_ansible/roles/tripleo_cephadm/tasks/dashboard/dashboard.yaml index 7232aa12b..bcf89676f 100644 --- a/tripleo_ansible/roles/tripleo_cephadm/tasks/dashboard/dashboard.yaml +++ b/tripleo_ansible/roles/tripleo_cephadm/tasks/dashboard/dashboard.yaml @@ -82,12 +82,9 @@ - name: Configure Monitoring Stack become: true block: - - name: get Grafana instance(s) addresses + - name: Get Prometheus VIP set_fact: - grafana_server_addrs: "{{ (grafana_server_addr | default([])) | union([hostvars[item][tripleo_ceph_dashboard_net]]) }}" - loop: "{{ groups['ceph_mgr'] | list }}" - vars: - tripleo_ceph_dashboard_net: "{{ service_net_map['ceph_dashboard_network'] + '_ip' }}" + prometheus_vip: "{{ net_vip_map[service_net_map['ceph_grafana_network']] }}" - name: set grafana api user command: "{{ tripleo_cephadm_ceph_cli }} dashboard set-grafana-api-username {{ tripleo_cephadm_grafana_admin_user }}" - name: set grafana api password @@ -102,11 +99,11 @@ - tripleo_cephadm_dashboard_protocol == "https" - name: set alertmanager host command: | - {{ tripleo_cephadm_ceph_cli }} dashboard set-alertmanager-api-host http://{{ grafana_server_addrs | first }}:9093 + {{ tripleo_cephadm_ceph_cli }} dashboard set-alertmanager-api-host http://{{ prometheus_vip }}:9093 - name: set prometheus host command: | {{ tripleo_cephadm_ceph_cli }} dashboard set-prometheus-api-host \ - http://{{ grafana_server_addrs | first }}:{{ tripleo_cephadm_prometheus_port }} + http://{{ prometheus_vip }}:{{ tripleo_cephadm_prometheus_port }} - name: config grafana api url vip command: | {{ tripleo_cephadm_ceph_cli }} dashboard set-grafana-api-url \