From 06f9aa59739cb421056a30ee3edb5276650943cd Mon Sep 17 00:00:00 2001 From: Nathan Scott Date: Wed, 7 Jul 2021 10:19:58 +1000 Subject: [PATCH] Reorder tasks such that Redis started before PCP services Current versions of the pmproxy daemon in PCP attempt to connect to Redis immediately on startup and disable some functionality if that fails. This should be fixed in PCP in due course but there's no harm in starting Redis service first in the metrics role (if metric_query is requested) to avoid the problem. --- tasks/main.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tasks/main.yml b/tasks/main.yml index 57b1f3d..3ccd83f 100644 --- a/tasks/main.yml +++ b/tasks/main.yml @@ -53,6 +53,13 @@ name: "{{ role_path }}/roles/bpftrace" when: metrics_from_bpftrace|d(false)|bool +- name: Setup metric querying service. + vars: + redis_metrics_provider: "{{ metrics_provider }}" + include_role: + name: "{{ role_path }}/roles/redis" + when: metrics_query_service|d(false)|bool + - name: Setup metric collection service. vars: pcp_pmlogger_discard: "{{ metrics_retention_days }}" @@ -65,13 +72,6 @@ name: "{{ role_path }}/roles/pcp" when: metrics_provider == 'pcp' -- name: Setup metric querying service. - vars: - redis_metrics_provider: "{{ metrics_provider }}" - include_role: - name: "{{ role_path }}/roles/redis" - when: metrics_query_service|d(false)|bool - - name: Setup metric graphing service. vars: grafana_metrics_provider: "{{ metrics_provider }}"