When create a vnffg with a non-existent network_src_port_id in vnfbfgd, we got "internal server error".
We should make it more clear for users.
$ tacker vnffg-create --vnffgd-name vnffgd vnffg
Request Failed: internal server error while processing your request.
The detail error log:
2017-08-14 21:42:40.057 ERROR tacker.api.v1.resource [req-37984004-5863-462b-8f9d-81ce6b1ef75c nfv_user nfv] create failed: No details.: NotFound: Flow Classifier Neutron Port 640dfd77-c92b-45a3-b8fc-22712de480e1 not found.
Neutron server returns request_ids: ['req-4d49c09a-616c-4d17-a5e2-8efa6cb90d4b']
2017-08-14 21:42:40.057 102353 ERROR tacker.api.v1.resource Traceback (most recent call last):
2017-08-14 21:42:40.057 102353 ERROR tacker.api.v1.resource File "/opt/stack/tacker/tacker/api/v1/resource.py", line 77, in resource
2017-08-14 21:42:40.057 102353 ERROR tacker.api.v1.resource result = method(request=request, **args)
2017-08-14 21:42:40.057 102353 ERROR tacker.api.v1.resource File "/opt/stack/tacker/tacker/api/v1/base.py", line 393, in create
2017-08-14 21:42:40.057 102353 ERROR tacker.api.v1.resource obj = obj_creator(request.context, **kwargs)
2017-08-14 21:42:40.057 102353 ERROR tacker.api.v1.resource File "/opt/stack/tacker/tacker/common/log.py", line 35, in wrapper
2017-08-14 21:42:40.057 102353 ERROR tacker.api.v1.resource return method(*args, **kwargs)
2017-08-14 21:42:40.057 102353 ERROR tacker.api.v1.resource File "/opt/stack/tacker/tacker/nfvo/nfvo_plugin.py", line 332, in create_vnffg
2017-08-14 21:42:40.057 102353 ERROR tacker.api.v1.resource self.delete_vnffg(context, vnffg_id=vnffg_dict['id'])
2017-08-14 21:42:40.057 102353 ERROR tacker.api.v1.resource File "/usr/local/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 220, in __exit__
2017-08-14 21:42:40.057 102353 ERROR tacker.api.v1.resource self.force_reraise()
2017-08-14 21:42:40.057 102353 ERROR tacker.api.v1.resource File "/usr/local/lib/python2.7/dist-packages/oslo_utils/excutils.py", line 196, in force_reraise
2017-08-14 21:42:40.057 102353 ERROR tacker.api.v1.resource six.reraise(self.type_, self.value, self.tb)
2017-08-14 21:42:40.057 102353 ERROR tacker.api.v1.resource File "/opt/stack/tacker/tacker/nfvo/nfvo_plugin.py", line 323, in create_vnffg
2017-08-14 21:42:40.057 102353 ERROR tacker.api.v1.resource symmetrical=sfc['symmetrical'])
2017-08-14 21:42:40.057 102353 ERROR tacker.api.v1.resource File "/opt/stack/tacker/tacker/common/driver_manager.py", line 70, in invoke
2017-08-14 21:42:40.057 102353 ERROR tacker.api.v1.resource return getattr(driver, method_name)(**kwargs)
2017-08-14 21:42:40.057 102353 ERROR tacker.api.v1.resource File "/opt/stack/tacker/tacker/nfvo/drivers/vim/openstack_driver.py", line 379, in create_flow_classifier
2017-08-14 21:42:40.057 102353 ERROR tacker.api.v1.resource sfc_classifier_params)
2017-08-14 21:42:40.057 102353 ERROR tacker.api.v1.resource File "/opt/stack/tacker/tacker/nfvo/drivers/vim/openstack_driver.py", line 551, in flow_classifier_create
2017-08-14 21:42:40.057 102353 ERROR tacker.api.v1.resource fc = self.client.create_flow_classifier({'flow_classifier': fc_dict})
2017-08-14 21:42:40.057 102353 ERROR tacker.api.v1.resource File "/usr/local/lib/python2.7/dist-packages/neutronclient/v2_0/client.py", line 2290, in _fx
2017-08-14 21:42:40.057 102353 ERROR tacker.api.v1.resource return self.create_ext(path, body)
2017-08-14 21:42:40.057 102353 ERROR tacker.api.v1.resource File "/usr/local/lib/python2.7/dist-packages/neutronclient/v2_0/client.py", line 719, in create_ext
2017-08-14 21:42:40.057 102353 ERROR tacker.api.v1.resource return self.post(path, body=body)
2017-08-14 21:42:40.057 102353 ERROR tacker.api.v1.resource File "/usr/local/lib/python2.7/dist-packages/neutronclient/v2_0/client.py", line 357, in post
2017-08-14 21:42:40.057 102353 ERROR tacker.api.v1.resource headers=headers, params=params)
2017-08-14 21:42:40.057 102353 ERROR tacker.api.v1.resource File "/usr/local/lib/python2.7/dist-packages/neutronclient/v2_0/client.py", line 292, in do_request
2017-08-14 21:42:40.057 102353 ERROR tacker.api.v1.resource self._handle_fault_response(status_code, replybody, resp)
2017-08-14 21:42:40.057 102353 ERROR tacker.api.v1.resource File "/usr/local/lib/python2.7/dist-packages/neutronclient/v2_0/client.py", line 268, in _handle_fault_response
2017-08-14 21:42:40.057 102353 ERROR tacker.api.v1.resource exception_handler_v20(status_code, error_body)
2017-08-14 21:42:40.057 102353 ERROR tacker.api.v1.resource File "/usr/local/lib/python2.7/dist-packages/neutronclient/v2_0/client.py", line 92, in exception_handler_v20
2017-08-14 21:42:40.057 102353 ERROR tacker.api.v1.resource request_ids=request_ids)
2017-08-14 21:42:40.057 102353 ERROR tacker.api.v1.resource NotFound: Flow Classifier Neutron Port 640dfd77-c92b-45a3-b8fc-22712de480e1 not found.
2017-08-14 21:42:40.057 102353 ERROR tacker.api.v1.resource Neutron server returns request_ids: ['req-4d49c09a-616c-4d17-a5e2-8efa6cb90d4b']
2017-08-14 21:42:40.057 102353 ERROR tacker.api.v1.resource
2017-08-14 21:42:40.083 INFO tacker.wsgi [req-37984004-5863-462b-8f9d-81ce6b1ef75c nfv_user nfv] 192.168.42.131 - - [14/Aug/2017 21:42:40] "POST /v1.0/vnffgs.json HTTP/1.1" 500 367 2.081371
Reviewed: https:/ /review. openstack. org/636605 /git.openstack. org/cgit/ openstack/ tacker/ commit/ ?id=ae8f8c7d9d2 d3940959381e117 6994d52d9425d2
Committed: https:/
Submitter: Zuul
Branch: master
commit ae8f8c7d9d2d394 0959381e1176994 d52d9425d2
Author: dharmendra <email address hidden>
Date: Wed Feb 13 11:59:05 2019 +0000
vnffg-create failed abnormally due to invalid network_src_port_id
When create a vnffg with a non-existent network_src_port_id in vnffgd, ortNotFound
create command failed abnormally with "internal server error".
This patch will handle the issue and raise FlowClassifierP
exception.
Partially Implements: blueprint improve- return- message
Closes-bug: #1710633
Change-Id: If9c36cb260d43b ec515a52b93e10f 714d063dc92