Browse Source

Migrate HPA scale target refs in storage migration

We added a new command in 3.9 to migrate incorrect HPA scale target refs
(`oc adm migrate legacy-hpa`).  Since not running this will begin to cause
issues in 3.10, this adds a task to run this automatically right after
the pre-upgrade storage migrations run.
Solly Ross 6 years ago
parent
commit
f8fd8641c7
1 changed files with 11 additions and 0 deletions
  1. 11 0
      playbooks/openshift-master/private/upgrade.yml

+ 11 - 0
playbooks/openshift-master/private/upgrade.yml

@@ -68,6 +68,17 @@
     - l_pb_upgrade_control_plane_pre_upgrade_storage.rc != 0
     - openshift_upgrade_pre_storage_migration_fatal | default(true) | bool
 
+  - name: Migrate legacy HPA scale target refs
+    command: >
+      {{ openshift_client_binary }} adm --config={{ openshift.common.config_base }}/master/admin.kubeconfig
+      migrate legacy-hpa --confirm
+    register: migrate_legacy_hpa_result
+    when: openshift_upgrade_pre_storage_migration_enabled | default(true) | bool
+    failed_when:
+    - migrate_legacy_hpa_result.rc != 0
+    - openshift_upgrade_pre_storage_migration_fatal | default(true) | bool
+
+
 # Set openshift_master_facts separately. In order to reconcile
 # admission_config's, we currently must run openshift_master_facts and
 # then run openshift_facts.