Properly wait for metrics deploy to complete.
Includes some fixes for logging as well.
MODIFY
ansible/roles/openshift_logging/tasks/main.yml
ansible/roles/openshift_logging/tasks/main.yml
kind: pods
selector: logging-infra=deployer
register: podout
- until: podout.results.results[0]['items'][0].status.phase == 'Succeeded'
+ until: podout.results.results[0]['items'][0].status.phase in ['Succeeded', 'Failed']
retries: 36
delay: 5
run_once: true
-- name: get deployer pod status
- oc_obj:
- state: list
- namespace: logging
- kind: pods
- selector: logging-infra=deployer
- register: podout
- run_once: true
-
- fail:
msg: logging deployer failed to complete setup
when: podout.results.results[0]['items'][0].status.phase != 'Succeeded'
run_once: true
- debug: var=pvcout
-- name: wait until logging deployer pod has completed
+- name: wait until logging pvcs are bound completed
oc_obj:
state: list
namespace: logging

MODIFY
ansible/roles/openshift_metrics/tasks/main.yml
ansible/roles/openshift_metrics/tasks/main.yml
register: processout
- debug: var=processout
-- name: wait for deployment to finish
- pause:
- seconds: 240
+# wait up to 10 minutes for deployer pod to complete
+- name: wait until metrics deployer pod has completed
+ oc_obj:
+ state: list
+ namespace: openshift-infra
+ kind: pods
+ selector: metrics-infra=deployer
+ register: podout
+ until: podout.results.results[0]['items'][0].status.phase in ['Succeeded', 'Failed']
+ retries: 120
+ delay: 5
+ run_once: true
+
+- fail:
+ msg: metrics deployer failed to complete setup
+ when: podout.results.results[0]['items'][0].status.phase != 'Succeeded'
+ run_once: true
- name: Add the "view" role to system:serviceaccount:openshift-infra:hawkular
oadm_policy_user:

Properly wait for metrics deploy to complete.

Includes some fixes for logging as well.