From ac23d6fc37dd98be8ad4ecc5a924d482e6e74957 Mon Sep 17 00:00:00 2001 From: Jeff Cantrill Date: Thu, 9 Feb 2017 10:05:52 -0500 Subject: bug 1420229. Bounce metrics components to recognize changes on updates or upgrades --- roles/openshift_metrics/tasks/install_metrics.yaml | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'roles/openshift_metrics') diff --git a/roles/openshift_metrics/tasks/install_metrics.yaml b/roles/openshift_metrics/tasks/install_metrics.yaml index 66925c113..66a3abdbd 100644 --- a/roles/openshift_metrics/tasks/install_metrics.yaml +++ b/roles/openshift_metrics/tasks/install_metrics.yaml @@ -34,6 +34,20 @@ file_content: "{{ item.content | b64decode | from_yaml }}" with_items: "{{ object_defs.results }}" +- command: > + {{openshift.common.client_binary}} + --config={{mktemp.stdout}}/admin.kubeconfig + get rc + -l metrics-infra + -o name + -n {{openshift_metrics_project}} + register: existing_metrics_rc + changed_when: no + +- name: Scaling down cluster to recognize changes + include: stop_metrics.yaml + when: "{{ existing_metrics_rc.stdout_lines | length > 0 }}" + - name: Scaling up cluster include: start_metrics.yaml tags: openshift_metrics_start_cluster -- cgit v1.2.1