v10 migration troubleshooting

Troubleshoot problems with v10 migration.

Topics:

Script help

python3 <SCRIPT_FILE_NAME> --help

Restarting migration

On the target system, after running register_gateway_portals_in_target.py or update_to_new_portals.py or update_to_new_gateways.py script:

  • If you want to restore the Management database and try the steps again:
  • If you deleted the data directory after registering Gateways or Portals, but want to use the same target API Connect system which you already installed, then:
    1. Complete Preparing the source system to create the data directory.
    2. Run the restore management db (Step 2 on Restoring the target system on Kubernetes, OpenShift, and Cloud Pak for Integration) with the -reset_gateway_portal flag as shown
      python3 restore_management_db.py -n namespace -s PLATFORM_API_HOSTNAME -reset_gateway_portal
      If running on a Kubernetes environment, supply the Cloud Manager admin password by using the -p flag. After this, continue with next steps of migration.

Factory reset of portal subsystem

You can do a factory reset of the Portal subsystem by either manually or by using a migration script.

  • Using migration script

    The script will restore the Management database and will factory reset the Portal subsystem, and also delete Gateway pods. The gateway pods will get restarted.

    The script will factory reset the Portal subsystem and also delete Gateway pods. When Gateway pods are deleted, they are also restarted.
    python3 restore_management_db.py -n namespace -s PLATFORM_API_HOSTNAME -reset_gateway_portal

    If using a Kubernetes environment, you must also supply the Cloud Manager admin password by using the -p flag. After this command, you must run the remaining steps of migration, starting with Step 3 in Restoring the target system on Kubernetes, OpenShift, and Cloud Pak for Integration.

    python3 register_gateway_portals_in_target.py -n NAMESPACE -u USERNAME -p PASSWORD -s HOSTNAME -r REALM_NAME -reset_gateway_portal
  • Manual steps
    1. Log in to the Portal www pod:
      kubectl exec -it PORTAL_WWW_POD_NAME -c admin -n NAMESPACE -- bash
    2. Run the command :
      curl -X DELETE -k --cert /etc/nginx/ssl/portal-director-client-both.pem  https://localhost:3009/v2/portal/factory-reset
    3. If any sites are there, use the list_sites command to check if all sites are deleted.
    4. Check health of the Portal subsystem.

Avoid error when a gateway is already registered to another API manager

Error messages
Error: An error occurred communicating with the gateways subsystem at 'some_url' (status: 400, response: '"Unable to perform initial registration for API Management.
Error: The API Connect Gateway Service is already registered to another API Manager instance"

You can fix the error condition manually, or use a script:

  • Manual step, when Gateway is in a Kubernetes or OpenShift cluster:

    Restart all the gateway pods.

  • Using the migration script when Gateway is in a Kubernetes or OpenShift cluster:
    The script will restore the Management database, factory reset the Portal subsystem, and delete the Gateway pods. Once deleted, Gateway pods get restarted.
    1. Run the following script:
      python3 restore_management_db.py -n namespace -s PLATFORM_API_HOSTNAME -reset_gateway_portal

      If using a Kubernetes environment, you must also supply the Cloud Manager admin password by using the -p flag.

    2. After this command, you must run the remaining steps of migration, starting with Step 3 in Restoring the target system on Kubernetes, OpenShift, and Cloud Pak for Integration.
  • Gateway is on an Appliance

    Reboot all the Gateway appliances.