Procházet zdrojové kódy

Wait for API availability before migrating storage, add retries

Wait for all core apis to become available and add more retries to the
storage migration to work around a problem where storage migration fails
due to certain api endpoints not being available in time
Scott Dodson před 6 roky
rodič
revize
3f9d0a8e77
1 změnil soubory, kde provedl 10 přidání a 2 odebrání
  1. 10 2
      playbooks/openshift-master/private/upgrade.yml

+ 10 - 2
playbooks/openshift-master/private/upgrade.yml

@@ -60,6 +60,10 @@
   roles:
   - openshift_facts
   tasks:
+  - name: Wait for API health
+    import_role:
+      name: openshift_control_plane
+      tasks_from: check_master_api_is_ready.yml
   - name: Upgrade all storage
     command: >
       {{ openshift_client_binary }} adm --config={{ openshift.common.config_base }}/master/admin.kubeconfig
@@ -70,7 +74,7 @@
     failed_when:
     - l_pb_upgrade_control_plane_pre_upgrade_storage.rc != 0
     - openshift_upgrade_pre_storage_migration_fatal | default(true) | bool
-    retries: 2
+    retries: 6
     delay: 30
 
   - name: Migrate legacy HPA scale target refs
@@ -186,6 +190,10 @@
   vars:
     __master_shared_resource_viewer_file: "shared_resource_viewer_role.yaml"
   tasks:
+  - name: Wait for API health
+    import_role:
+      name: openshift_control_plane
+      tasks_from: check_master_api_is_ready.yml
   - name: Reconcile Security Context Constraints
     command: >
       {{ openshift_client_binary }} adm policy --config={{ openshift.common.config_base }}/master/admin.kubeconfig reconcile-sccs --confirm --additive-only=true -o name
@@ -206,7 +214,7 @@
     failed_when:
     - l_pb_upgrade_control_plane_post_upgrade_storage.rc != 0
     - openshift_upgrade_post_storage_migration_fatal | default(false) | bool
-    retries: 2
+    retries: 6
     delay: 30
 
   - set_fact: