Browse Source

Merge pull request #2384 from sdodson/metrics

Change how we set master's metricsPublicURL
Scott Dodson 8 years ago
parent
commit
a5986f46b1

+ 1 - 0
roles/openshift_master_facts/tasks/main.yml

@@ -80,3 +80,4 @@
       api_env_vars: "{{ openshift_master_api_env_vars | default(None) }}"
       controllers_env_vars: "{{ openshift_master_controllers_env_vars | default(None) }}"
       audit_config: "{{ openshift_master_audit_config | default(None) }}"
+      metrics_public_url: "{% if openshift_hosted_metrics_deploy | default(false) %}https://{{ metrics_hostname }}/hawkular/metrics{% endif %}"

+ 6 - 1
roles/openshift_master_facts/vars/main.yml

@@ -17,4 +17,9 @@ builddefaults_yaml:
       - name: https_proxy
         value: "{{ openshift.master.builddefaults_https_proxy | default(omit, true) }}"
       - name: no_proxy
-        value: "{{ openshift.master.builddefaults_no_proxy | default(omit, true) | join(',') }}"
+        value: "{{ openshift.master.builddefaults_no_proxy | default(omit, true) | join(',') }}"
+
+metrics_hostname: "{{ openshift.hosted.metrics.public_url
+                    | default('hawkular-metrics.' ~ (openshift.master.default_subdomain
+                    | default(openshift_master_default_subdomain )))
+                    | oo_hostname_from_url }}"

+ 1 - 1
roles/openshift_metrics/tasks/install.yml

@@ -95,7 +95,7 @@
     get {{ deploy_metrics.stdout }}
   register: deploy_result
   until: "{{ 'Completed' in deploy_result.stdout }}"
-  failed_when: "{{ 'Completed' not in deploy_result.stdout }}"
+  failed_when: False
   retries: 60
   delay: 10