Network Function Instantiation Fails due to Null Termination Character in the Database.
search cancel

Network Function Instantiation Fails due to Null Termination Character in the Database.

book

Article ID: 325398

calendar_today

Updated On:

Products

VMware Telco Cloud Automation

Issue/Introduction


In environments that have been upgraded from 2.2.0 to 2.3.0 or 2.3.0.1, network functions may fail during workflow instantiation. 

This can be confirmed by checking the upgrade log located in /opt/vmware/upgrade.log and searching for the following SQL exception:
 
ERROR: unsupported Unicode escape sequence
Detail: \u0000 cannot be converted to text.

Environment

2.2, 2.3, 2.3.0.1

Cause

This happens if data in MongoDB prior to the TCA upgrade contains a null termination character that is not allowed in PostgreSQL. In Unicode this character is represented as \u0000.

Resolution

Resolved in TCA 2.3.1.

Procedure For Environments Migrated to TCA 2.3

1. Download the attached recover_recipe_data.py script.
 
2. SSH as admin into the TCA Manager appliance observing the issue and switch user to root.
 
3. Copy the recover_recipe_data.py script into the /home/admin directory of the TCA Manager.
 
4. Restart the postgress-tca-config service to re-populate the built-inside recipes/ingredients.
systemctl restart postgres-tca-config
 
5. Run the script to repopulate the recipe from the CSARs in objectstore.files collection:
python3 recover_recipe_data.py
 
 

Procedure For TCA 2.2 Environments 

1. Download the attached clean_mongo.py script. 
 
2. SSH as admin into the TCA Manager appliance observing the issue.
 
3. Copy the clean_mongo.py script into the /home/admin directory of the TCA Manager.
 
4. Run the script to clean the mongo collection “SiteLevelManagementRecipes”:
python3 clean_mongo.py
 
5. SSH as admin into the TCA-CP appliance observing the issue.
 
6. Copy the clean_mongo.py script into the /home/admin directory of the TCA-CP.
 
7. Run the script to clean the mongo collection “SiteLevelManagementRecipes”:
python3 clean_mongo.py

Additional Information

Impact/Risks:
TCA 2.2.0, 2.3.0 and 2.3.0.1. Does not impact 3.0.

Attachments

clean_mongo_data get_app
recover_recipe_data get_app