소스 검색

openshift-control-plane: check whether the sync pods are ready before selecting nodes

If the sync pod is not ready, then the node selection might fail due to pods
not being labeled yet. (https://bugzilla.redhat.com/show_bug.cgi?id=1609019)
Paul Gier 6 년 전
부모
커밋
9894aea3b8
1개의 변경된 파일19개의 추가작업 그리고 0개의 파일을 삭제
  1. 19 0
      roles/openshift_node_group/tasks/sync.yml

+ 19 - 0
roles/openshift_node_group/tasks/sync.yml

@@ -46,3 +46,22 @@
     state: absent
     name: "{{ mktemp.stdout }}"
   changed_when: False
+
+- name: Wait for the sync daemonset to become ready and available
+  oc_obj:
+    state: list
+    kind: daemonset
+    name: sync
+    namespace: openshift-node
+  register: __status_of_sync_ds
+  until:
+    - __status_of_sync_ds.results is defined
+    - __status_of_sync_ds.results.results is defined
+    - __status_of_sync_ds.results.results | length > 0
+    - __status_of_sync_ds.results.results[0].status is defined
+    - __status_of_sync_ds.results.results[0].status.numberAvailable is defined
+    - __status_of_sync_ds.results.results[0].status.desiredNumberScheduled is defined
+    - __status_of_sync_ds.results.results[0].status.numberAvailable == __status_of_sync_ds.results.results[0].status.desiredNumberScheduled
+  retries: 60
+  delay: 30
+  failed_when: false