Migrating from Telco Cloud Automation (TCA) version 2.3 to TCA 3.x can sometimes pose challenges, particularly when the migration process fails at certain stages. This article addresses a common migration issue and provides detailed steps for troubleshooting and work around.
During the migration process from TCA 2.3 to TCA 3.x, you may encounter a situation where the deployment and backup tasks complete successfully, but the migration task fails. This can be seen when executing the tcamigctl status -w command
, with an error message indicating a failure similar to:
Migration of <TCA-Manager-VM-Name> failed: Exception: Failed to update migration status for appliance <TCA-Manager-FQDN> => Exception: Failed to update migration status 401 Client Error: unauthorized for url: https://<TCA-Manager-FQDN>:9443/restore/migrationstatus
This article is for the migration issue from tca 2.3 to tca 3.x.
During the migration of TCA when running the tcamigctl status -w
command we can see that the Deploy and Backup Tasks goes through successfully but the Migrate Task fails.
ssh into the tca-manageras vm as admin, check the pods that are not running, and review the tca-tcf-manager-upgrade-xxxxx pods logs:
kubectl get pods -A | grep -v Running | grep -v Completed
kubectl logs tca-tcf-manager-pre-upgrade-xxxxx -n tca-mgr
You will see messages similar to this:
Traceback (most recent call last):
File "/opt/vmware/tcf/db/migrations/migrate_to_db.py", line 1017, in migrate_to_DB
self.migrate_section_to_DB(cloud_spec, section, name_to_mStatus, handler)
File "/opt/vmware/tcf/db/migrations/migrate_to_db.py", line 180, in migrate_section_to_DB
raise ZtpExc.DBMigrationException(msg=str(e))
exceptions.custom_exceptions.DBMigrationException: Migration of data to the database failed. argument should be a bytes-like object or ASCII string, not 'NoneType'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/opt/vmware/tcf/file_data_migration.py", line 11, in <module>
MigrateToDBManager().migrate_to_DB()
File "/opt/vmware/tcf/db/migrations/migrate_to_db.py", line 1023, in migrate_to_DB
raise ZtpExc.DBMigrationException(msg=str(e)) from e
exceptions.custom_exceptions.DBMigrationException: Migration of data to the database failed. Migration of data to the database failed. argument should be a bytes-like object or ASCII string, not 'NoneType'
2.x, 3.x