v10 migration troubleshooting
Troubleshoot problems with v10 migration.
Topics:
- Script help
- Restarting migration
- Factory reset of portal subsystem
- Avoid error when a gateway is already registered to another API manager
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:
- 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
If running on a Kubernetes environment, supply the Cloud Manager admin password by using thepython3 restore_management_db.py -n namespace -s PLATFORM_API_HOSTNAME -reset_gateway_portal
-p
flag. After this, continue with next steps of migration.
- Run the restore Management db (Step 2 on Restoring the target system on Kubernetes, OpenShift, and Cloud Pak for Integration) with the
- 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:
- Complete Preparing the source system to create the data directory.
- 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
If running on a Kubernetes environment, supply the Cloud Manager admin password by using thepython3 restore_management_db.py -n namespace -s PLATFORM_API_HOSTNAME -reset_gateway_portal
-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
- Log in to the Portal www pod:
kubectl exec -it PORTAL_WWW_POD_NAME -c admin -n NAMESPACE -- bash
- Run the command :
curl -X DELETE -k --cert /etc/nginx/ssl/portal-director-client-both.pem https://localhost:3009/v2/portal/factory-reset
- If any sites are there, use the
list_sites
command to check if all sites are deleted. - Check health of the Portal subsystem.
- Log in to the Portal www pod:
Avoid error when a gateway is already registered to another API manager
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.
- 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. - 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.
- Run the following
script:
- Gateway is on an Appliance
Reboot all the Gateway appliances.