Tacker: Handle VNF Create using an invalid template
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
tacker |
Fix Released
|
Low
|
Bob Haddleton |
Bug Description
When VNF based on a TOSCA template is created and if the networks mentioned in the TOSCA is not already pre-created tacker-server returns bad API response. Instead it should return a proper error response back.
$ tacker vnf-create --name wrt1 --vnfd-id f8dba2d0-
Request Failed: internal server error while processing your request.
Also a VNF entry is left the VNF table in ERROR state. The proper behavior would be return granular error code on vnf-create API response without leaving any
entries in the VNF table.
[1]
$ tacker vnf-list
+------
| attributes | description | id | instance_id | mgmt_url | name | services | status | template_id | tenant_id |
+------
| {u'config': u'wrt-vnf-config'} | Virtual WRT opensource router | ac874b35-
+------
Changed in tacker: | |
importance: | Undecided → Low |
summary: |
- Tacker: creating VNF using invalid TOSCA attributes returns internal - error + Tacker: Error during VNF create returns internal error |
description: | updated |
Changed in tacker: | |
assignee: | nobody → Bob Haddleton (bob-haddleton) |
Changed in tacker: | |
status: | New → Confirmed |
Changed in tacker: | |
status: | Fix Committed → Fix Released |
The internal error is caused by an Exception from the HeatClient because the Heat stack could not be created. When the template is invalid for any reason the HeatClient will raise an HTTPBadRequest exception that needs to be handled. The error message from this exception needs to be passed back to the client along with the appropriate API error response code.