The information in this section is applicable to NCP 4.1.0.x only.

It may happen that the import process is not able to finish importing because of an external issue such as a power failure, disk exhaustion, connectivity issue, and so on. In such scenarios, there are ways to recover.

If the failure occurrs in phase 1, 2, or 3, you can manually set the option rollback_imported_resources to True in config.yaml and run the script again. This will roll back all the imported resources. If you do not set the flag to True, NCP retries and continues the import of resources. By default, rollback_imported_resources is False.

If the failure occurs in phase 4, run mp_to_policy_importer again. NCP will attempt to push the cached updated resource bodies of Policy on the NSX Manager. If there was an error and information was not cached, you must roll back using the backup and restore feature to restore the cluster. This is because once the tags are updated on Policy and resources are rollbacked, then all the tags are lost.

Manager to Policy Import Rollback

The mp_to_policy_importer process stores the ID of resources on the local disk of the client if they are successfully imported. If a failure occurs while the importer is running, it will immediately roll back all the imported resources and delete them from the file system if the rollback is successful. However, if a failure occurs during rollback, you can set rollback_imported_resources to True in config.yaml to manually retry and rollback the imported resources by rerunning the mp_to_policy_importer. The importer will intimate through the logs if all the resources were successfully rollbacked. If the rollback through the script is unsuccessful, use the backup and restore feature to restore the cluster to its original state.