CNF upgrade timing out as the upgrade job takes more than an hour to complete
2.3
3.0
There are different timeouts at the user interface, app level, and upstream Helm. For example, the CNF Instantiate operation has a max timeout value of 120 minutes. There is no max timeout value for the CNF upgrade operation in the user interface.
curl -v --location --request POST 'https://<tca-cp-ip>/hybridity/api/sessions' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data-raw '{
"username": "<username-for-vcenter-for-tca-cp>",
"password": "<password>"
}'
curl --location --request PUT 'https://<tca-cp-ip>/admin/hybridity/api/global/settings/CnfTimeout/HelmUpgrade' \
--header 'x-hm-authorization: <copy-from-sessions-API-response-headers>' \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--data-raw '{
"value": "180"
}'
It is no longer necessary to trigger the CNF upgrade using an API, as the UI allows us to set the timeout value to 180 minutes.
Here is an example of CNF upgrade API (the payload will be particular to the use case, CSAR, Vim Tenant, and Habors used)
curl --request POST \
--url https://<TCA-M-IP>/tca/etsi/orgs/default/direct/internal/vnflcm/v1/cnf_instances/<cnf-instance-id>/upgrade \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'x-hm-authorization: ad658a7c:94b1:4a33:a531:299fc3bef19b' \
--data '{
"nfdId": "nfd_e2d376c7-734f-4f13-8e9b-4caa967efba7",
"vimId": "vmware_17647E95C2374E438C9596F88C00C24A",
"upgradeType": "rolling",
"ignoreAdditionalParams": false,
"componentMapping": [
{
"oldVduId": "chart-1",
"newVduId": "chart-1"
},
{
"oldVduId": "chart-2",
"newVduId": "chart-2"
}
],
"autoRollback": true,
"additionalParams": {
"chart-1": {
"metadata": {
"values": "bmFtZTogY20tY2hhcnQtMQpuYW1lc3BhY2U6IHRwaC1ucy1jY3RmCmR1bW15VmFsdWVzOgogIGtleTE6IGNoYXJ0LTEtdXBncmFkZQogIGtleTI6IGNoYXJ0LTEtdXBncmFkZQogIGtleTM6IGNoYXJ0LTEtdXBncmFkZQ=="
},
"namespace": "tph-ns-cctf",
"repoUrl": "https://vcf-10-158-91-72.lvn.broadcom.net/chartrepo/dbaddam",
"extensionId": "ba882157-e6ae-4280-b5e6-7726fe2cd383"
},
"chart-3": {
"metadata": {
"values": "bmFtZTogY20tY2hhcnQtMwpuYW1lc3BhY2U6IHRwaC1ucy1jY3RmCmR1bW15VmFsdWVzOgogIGtleTE6IGNoYXJ0LTMtdXBncmFkZQogIGtleTI6IGNoYXJ0LTMtdXBncmFkZQogIGtleTM6IGNoYXJ0LTMtdXBncmFkZQ=="
},
"namespace": "tph-ns-cctf",
"repoUrl": "https://vcf-10-158-91-72.lvn.broadcom.net/chartrepo/dbaddam",
"extensionId": "ba882157-e6ae-4280-b5e6-7726fe2cd383"
},
"chart-2": {
"metadata": {
"values": "bmFtZTogY20tY2hhcnQtMgpuYW1lc3BhY2U6IGludmFsaWRucwpkdW1teVZhbHVlczoKICBrZXkxOiBjaGFydC0yLXVwZ3JhZGUKICBrZXkyOiBjaGFydC0yLXVwZ3JhZGUKICBrZXkzOiBjaGFydC0yLXVwZ3JhZGU="
},
"namespace": "tph-ns-cctf",
"repoUrl": "https://vcf-10-158-91-72.lvn.broadcom.net/chartrepo/dbaddam",
"extensionId": "ba882157-e6ae-4280-b5e6-7726fe2cd383"
},
"namespace": "tph-ns-cctf",
"repoUrl": "https://vcf-10-158-91-72.lvn.broadcom.net/chartrepo/dbaddam",
"extensionId": "ba882157-e6ae-4280-b5e6-7726fe2cd383",
"vimId": "vmware_17647E95C2374E438C9596F88C00C24A"
}
}'