Skip to content

Commit c92f180

Browse files
danpawlikpraveenkumar
authored andcommitted
Update condition for verifying OpenShift health
During the check, cluster would restart openshift-apiserver, which might fit the condition, but in later steps it would not be accessible for executing other comments. Wait properly for cluster to be stable. Signed-off-by: Daniel Pawlik <[email protected]>
1 parent 995aa99 commit c92f180

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

ansible/roles/deploy-crc-cloud/tasks/dnsmasq.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@
5050
address=/apps.{{ eip }}.{{ alternative_domain }}/{{ ansible_default_ipv4.address }}
5151
address=/api.{{ eip }}.{{ alternative_domain }}/{{ ansible_default_ipv4.address }}
5252
address=/api-int.{{ eip }}.{{ alternative_domain }}/{{ ansible_default_ipv4.address }}
53+
register: _dnsmasq_alt_domain_conf
5354

5455
- name: Set this host as first nameserver in /etc/resolv.conf
5556
become: true
@@ -61,7 +62,9 @@
6162
loop: "{{ [ansible_default_ipv4.address] + ansible_facts['dns']['nameservers'] | flatten }}"
6263

6364
- name: Restart dnsmasq
64-
when: _dnsmasq_conf.changed
65+
when: >
66+
_dnsmasq_conf.changed or
67+
(_dnsmasq_alt_domain_conf is defined and _dnsmasq_alt_domain_conf.changed)
6568
become: true
6669
ansible.builtin.systemd:
6770
name: dnsmasq

ansible/roles/deploy-crc-cloud/tasks/wait_cluster_become_healthy.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@
88
register: component_status
99
retries: "{{ max_retries }}"
1010
delay: "{{ retry_delay }}"
11-
until: "'False' not in component_status.stdout_lines"
12-
failed_when: "'False' in component_status.stdout_lines"
11+
until: >
12+
('False' not in component_status.stdout_lines) and
13+
('was refused' not in component_status.stdout_lines)
1314
ignore_errors: true
1415

1516
- name: Output success message if components are healthy

0 commit comments

Comments
 (0)