Skip to content

Commit d99168c

Browse files
authored
Update deploy-cluster-logging.yml
check that the status of the ClusterLogForwarder contains 2 "True" values and 0 "False" values
1 parent 3f899a2 commit d99168c

File tree

1 file changed

+7
-14
lines changed

1 file changed

+7
-14
lines changed

ci/deploy-logging-dependencies/tasks/deploy-cluster-logging.yml

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -21,23 +21,16 @@
2121
register: output
2222
until: output.stdout_lines | length != 0
2323

24-
- name: Wait for 2 "True" conditions in ClusterLogForwarder status
24+
- name: Wait for 2 "True" and 0 "False" conditions in ClusterLogForwarder status
2525
ansible.builtin.shell:
2626
cmd: >
27-
oc get clusterlogforwarder collector -n openshift-logging -o json |
28-
jq '[.status.conditions[] | select(.status == "True")] | length'
29-
register: true_conditions
30-
until: true_conditions.stdout | trim == "2"
27+
oc get clusterlogforwarder collector -n openshift-logging -o json | jq --raw-output '[
28+
([.status.conditions[] | select(.status == "True")] | length),
29+
([.status.conditions[] | select(.status == "False")] | length)
30+
] | @csv'
31+
register: clf_condition_counts
32+
until: clf_condition_counts.stdout == "2,0"
3133
retries: 20
3234
delay: 20
3335
changed_when: false
3436
check_mode: no
35-
36-
- name: Verify no "False" conditions exist in ClusterLogForwarder status
37-
ansible.builtin.shell:
38-
cmd: >
39-
oc get clusterlogforwarder collector -n openshift-logging -o json |
40-
jq '[.status.conditions[] | select(.status == "False")] | length'
41-
register: false_conditions
42-
changed_when: false
43-
failed_when: false_conditions.stdout | trim != "0"

0 commit comments

Comments
 (0)