DIG terminate sometimes remains in terminating state for long time
Description:
It is being observed that, sometimes the DIG terminate call does not succeed and DIG remains in terminating state for long time, and in that specific case if DIG delete is called after terminate call, then DIG lands up in stale state.
Below are the observations captured:
10.32.0.37 - - [02/Aug/2022:12:09:28 +0000] "DELETE /v2/projects/tenant-01/composite-apps/v2x-cloud/v1/deployment-intent-groups/testdig4/generic-placement-intents/v2x-cloud_gpint/app-intents/v2x-cloud_pint HTTP/1.1" 204 0
10.32.0.37 - - [02/Aug/2022:12:09:28 +0000] "DELETE /v2/projects/tenant-01/composite-apps/v2x-cloud/v1/deployment-intent-groups/testdig4/generic-placement-intents/v2x-cloud_gpint HTTP/1.1" 204 0
10.32.0.37 - - [02/Aug/2022:12:09:28 +0000] "DELETE /v2/projects/tenant-01/composite-apps/v2x-cloud/v1/deployment-intent-groups/testdig4/intents/DIGIntents HTTP/1.1" 204 0
{"Error":"DeploymentIntentGroup has not completed terminating: testdig4","Module":null,"Parameters":{"compositeApp":"v2x-cloud","compositeAppVersion":"v1","deploymentIntentGroup":"testdig4","project":"tenant-01"},"SOURCE":"file[apierror.go:52] func[apierror.HandleErrors]","level":"error","msg":"Error :: ","time":"2022-08-02T12:09:28.548325477Z"}
10.32.0.37 - - [02/Aug/2022:12:09:28 +0000] "DELETE /v2/projects/tenant-01/composite-apps/v2x-cloud/v1/deployment-intent-groups/testdig4 HTTP/1.1" 500 82
Steps for reproducing above issue:
1. Created 8 tenants
2. Each tenant had same name for logical cloud
3. Created composite app in each tenant for application like mongo/nginx/free5gc
4. Created service instance for each composite app and instantiated it
5. Then randomly selected some service instances and terminated and deleted service instance.
6. Observed that sometimes Delete Dig ends up in above state, where Delete Dig gets triggered while DIG is still in stuck in terminating state
Edited by Mohammed Allauddin