Migration script fails when you upgrade Data Virtualization

When you upgrade Data Virtualization, you might encounter errors when you run the migration script.

Symptoms

You might encounter an error similar to the following example.
2021-11-08_21.33.54,988_UTC INFO Successfully created /mnt/backup/bludata0/dv/versioned/dv_data/qpendpoints/data4 
2021-11-08_21.33.55,015_UTC INFO Successfully created /mnt/backup/bludata0/dv/versioned/dv_data/qpendpoints/data5 cp: cannot create regular file '/mnt/backup/bludata0/dv/versioned/marker_files/.is_dv_upgrade': Permission denied 
2021-11-08_21.33.55,096_UTC ERROR Failed to create /mnt/backup/bludata0/dv/versioned/marker_files/.is_dv_upgrade command terminated with exit code 1 
2021-11-08.21:33:55.146: [ERROR] - Failed to back up DV on dv-engine-0

Resolving the problem

Clean up the environment and retry the steps to run the dv-migration.sh script.

  1. If you have a 1.7.x data-virtualization instance and you can see your data-virtualization instance on the Instances page, you must deprovision it. For more information, see Deprovisioning Data Virtualization.
  2. Change to the project where Data Virtualization pods are installed.
    oc project project-name
  3. Run the following commands to clean up any remaining persistent volume claims.
    1. oc set volume sts dv-engine --remove --name dv-backup -m /mnt/backup
    2. oc set volume sts dv-metastore --remove --name dv-backup -m /mnt/backup
    3. BIGSQL_PVC=`oc get pvc | grep bigsql-c-db2u-dv-db2u-0 | awk '{ print $1 }'`
    4. HURRICANE_PVC=`oc get pvc | grep c-db2u-dv-hurricane | awk '{ print $1 }'`
    5. oc delete --wait=false pvc ${BIGSQL_PVC}
    6. oc patch pvc ${BIGSQL_PVC} -p '{"metadata":{"finalizers":null}}'
    7. oc delete --wait=false pvc ${HURRICANE_PVC}
    8. oc patch pvc ${HURRICANE_PVC} -p '{"metadata":{"finalizers":null}}'
  4. Run the following command to fix dv-api internal-nginx-svc-tls.
    oc set volume deploy dv-api --add --overwrite --name internal-nginx-svc-tls --type secret --secret-name internal-tls -m /etc/internal-nginx-svc-tls
  5. Run the following command to scale up Data Virtualization 1.5.0 pods.
    oc scale --replicas=1 $(oc get sts,deploy -o name | grep dv-)
  6. Wait for all Data Virtualization pods to be running and ready.
  7. Rerun the dv-migration.sh script.