improve returned message of nsd-create

Bug #1710801 reported by Yan Xing'an on 2017-08-15
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tacker
Low
dharmendra

Bug Description

When creating nsd with non-existent vnfd in tosca template, we got internal error.

$ tacker nsd-create --nsd-file sample-tosca-nsd.yaml NSD1
Request Failed: internal server error while processing your request.

2017-08-15 10:43:09.765 INFO tacker.db.db_base [req-b1914e3b-e84d-44cb-a9e6-7e888bcd79d3 nfv_user nfv] No result found for sample-tosca-vnfd1 in <class 'tacker.db.vnfm.vnfm_db.VNFD'> table
2017-08-15 10:43:09.770 ERROR tacker.api.v1.resource [req-b1914e3b-e84d-44cb-a9e6-7e888bcd79d3 nfv_user nfv] create failed: No details.: TypeError: 'NoneType' object has no attribute '__getitem__'
2017-08-15 10:43:09.770 9153 ERROR tacker.api.v1.resource Traceback (most recent call last):
2017-08-15 10:43:09.770 9153 ERROR tacker.api.v1.resource File "/opt/stack/tacker/tacker/api/v1/resource.py", line 77, in resource
2017-08-15 10:43:09.770 9153 ERROR tacker.api.v1.resource result = method(request=request, **args)
2017-08-15 10:43:09.770 9153 ERROR tacker.api.v1.resource File "/opt/stack/tacker/tacker/api/v1/base.py", line 393, in create
2017-08-15 10:43:09.770 9153 ERROR tacker.api.v1.resource obj = obj_creator(request.context, **kwargs)
2017-08-15 10:43:09.770 9153 ERROR tacker.api.v1.resource File "/opt/stack/tacker/tacker/common/log.py", line 35, in wrapper
2017-08-15 10:43:09.770 9153 ERROR tacker.api.v1.resource return method(*args, **kwargs)
2017-08-15 10:43:09.770 9153 ERROR tacker.api.v1.resource File "/opt/stack/tacker/tacker/nfvo/nfvo_plugin.py", line 531, in create_nsd
2017-08-15 10:43:09.770 9153 ERROR tacker.api.v1.resource self._parse_template_input(context, nsd)
2017-08-15 10:43:09.770 9153 ERROR tacker.api.v1.resource File "/opt/stack/tacker/tacker/nfvo/nfvo_plugin.py", line 547, in _parse_template_input
2017-08-15 10:43:09.770 9153 ERROR tacker.api.v1.resource vnfd = vnfm_plugin.get_vnfd(context, vnfd_name)
2017-08-15 10:43:09.770 9153 ERROR tacker.api.v1.resource File "/opt/stack/tacker/tacker/db/vnfm/vnfm_db.py", line 341, in get_vnfd
2017-08-15 10:43:09.770 9153 ERROR tacker.api.v1.resource return self._make_vnfd_dict(vnfd_db)
2017-08-15 10:43:09.770 9153 ERROR tacker.api.v1.resource File "/opt/stack/tacker/tacker/db/vnfm/vnfm_db.py", line 204, in _make_vnfd_dict
2017-08-15 10:43:09.770 9153 ERROR tacker.api.v1.resource 'attributes': self._make_attributes_dict(vnfd['attributes']),
2017-08-15 10:43:09.770 9153 ERROR tacker.api.v1.resource TypeError: 'NoneType' object has no attribute '__getitem__'
2017-08-15 10:43:09.770 9153 ERROR tacker.api.v1.resource
2017-08-15 10:43:09.788 INFO tacker.wsgi [req-b1914e3b-e84d-44cb-a9e6-7e888bcd79d3 nfv_user nfv] 192.168.42.131 - - [15/Aug/2017 10:43:09] "POST /v1.0/nsds.json HTTP/1.1" 500 367 0.082571

Changed in tacker:
importance: Undecided → Low
tags: added: low-hanging-fruit
Changed in tacker:
assignee: nobody → Kapilsai Pawankar (kapilsai)
status: New → In Progress
description: updated

Fix proposed to branch: master
Review: https://review.openstack.org/634374

Changed in tacker:
assignee: Kapilsai Pawankar (kapilsai) → dharmendra (dharmendra-kushwaha)

Reviewed: https://review.openstack.org/634374
Committed: https://git.openstack.org/cgit/openstack/tacker/commit/?id=be6ceb11f7fb66cb7c8f3bc97eb9374ade0e9e17
Submitter: Zuul
Branch: master

commit be6ceb11f7fb66cb7c8f3bc97eb9374ade0e9e17
Author: dharmendra <email address hidden>
Date: Thu Jan 31 22:49:30 2019 -0800

    Improve the returned Message for nsd-create

    When creating nsd with non-existent vnfd in tosca template, we got
    internal error. This patch will fix this and will return with
    NotFound error.

    Partially Implements: blueprint improve-return-message
    Closes-Bug: #1710801

    Change-Id: I7e9da552673088fe36e244d4658ad243e21a1fca

Changed in tacker:
status: In Progress → Fix Released

This issue was fixed in the openstack/tacker 1.0.0.0rc1 release candidate.

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers