Skip to content

Commit d8e0bd0

Browse files
committed
Add wait until cluster is stable prior to post-cluster-install tasks
1 parent b6a5813 commit d8e0bd0

File tree

4 files changed

+20
-0
lines changed

4 files changed

+20
-0
lines changed

ansible/roles/mno-post-cluster-install/defaults/main/main.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@ http_store_port: 8081
1313
registry_host: "{{ groups['bastion'][0] }}"
1414
registry_port: 5000
1515

16+
# Wait until cluster is stable vars
17+
wait_until_cluster_stable: true
18+
minimum_stable_period: 1m
19+
wait_until_cluster_stable_timeout: 2m
20+
1621
# Deploy performance-dashboards
1722
setup_performance_dashboards: false
1823

ansible/roles/mno-post-cluster-install/tasks/main.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,11 @@
2626
- name: kubeconfig
2727
dest: kubeconfig.backup
2828

29+
- name: Wait until cluster is stable
30+
shell: |
31+
KUBECONFIG={{ bastion_cluster_config_dir }}/kubeconfig oc adm wait-for-stable-cluster --minimum-stable-period={{ minimum_stable_period }} --timeout={{ wait_until_cluster_stable_timeout }}
32+
when: wait_until_cluster_stable
33+
2934
- name: Apply a label to the worker node(s)
3035
shell: |
3136
KUBECONFIG={{ bastion_cluster_config_dir }}/kubeconfig oc label no --overwrite -l node-role.kubernetes.io/worker jetlag=true

ansible/roles/sno-post-cluster-install/defaults/main/main.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@
55
assisted_installer_host: "{{ groups['bastion'][0] }}"
66
assisted_installer_port: 8090
77

8+
# Wait until cluster is stable vars
9+
wait_until_cluster_stable: true
10+
minimum_stable_period: 1m
11+
wait_until_cluster_stable_timeout: 2m
12+
813
# Deploy openshift-gitops-operator
914
setup_openshift_gitops: false
1015
gitops_channel: stable

ansible/roles/sno-post-cluster-install/tasks/main.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,11 @@
2727
- name: kubeconfig
2828
dest: kubeconfig.backup
2929

30+
- name: Wait until cluster is stable
31+
shell: |
32+
KUBECONFIG={{ bastion_cluster_config_dir }}/{{ groups['sno'][0] }}/kubeconfig oc adm wait-for-stable-cluster --minimum-stable-period={{ minimum_stable_period }} --timeout={{ wait_until_cluster_stable_timeout }}
33+
when: wait_until_cluster_stable
34+
3035
- name: Apply a label to the SNO node
3136
shell: |
3237
KUBECONFIG={{ bastion_cluster_config_dir }}/{{ groups['sno'][0] }}/kubeconfig oc label no --all --overwrite jetlag=true

0 commit comments

Comments
 (0)