failed to retrieve vnfd on tacker horizon

Bug #1652751 reported by futangw
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
tacker
Fix Released
High
yong sheng gong

Bug Description

Hello,

After install the tacker-horizon-master (previously it's 0.5.0), the tacker horizon failed to retrieve VNF catalog with 'Error: Unable to get instances'. it's failed in function get_vnfcatalog_data() with an except.

the root cause is clear now that it was caused by code change in tacker _make_service_types_list().

on tacker 0.5.0, the code:
 178 def _make_service_types_list(self, service_types):
 179 return [{'id': service_type.id,
 180 'service_type': service_type.service_type}
 181 for service_type in service_types]

on tacker master, the code:
 176 def _make_service_types_list(self, service_types):
 177 return [service_type.service_type
 178 for service_type in service_types]

So the new code will return a list with string element inside. This will caused an except in line 56 below of the function get_vnfcatalog_data():
 |- 53 services = vnfd['service_types']
|| 54 vnfd_services = []
|| 55 for s in services: ## services now is, e.g. [u'vnfd']
|| 56 if s['service_type'] != 'vnfd':
||- 57 vnfd_services.append(s['service_type'])

the code may be udpated to:
                            services = vnfd['service_types']
                            vnfd_services = []
                           for s in services: ## services now is, e.g. [u'vnfd']
                                  vnfd_services.append(s)

Merry Christmas and Happy New Year.

futangw

Changed in tacker:
status: New → Confirmed
importance: Undecided → Low
Revision history for this message
Sridhar Ramaswamy (srics-r) wrote :

Thanks for reporting the problem *and* providing a possible fix.

Changed in tacker:
importance: Low → High
milestone: none → ocata-3
Changed in tacker:
assignee: nobody → yong sheng gong (gongysh)
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to tacker-horizon (master)

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

Changed in tacker:
status: Confirmed → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to tacker-horizon (master)

Reviewed: https://review.openstack.org/416418
Committed: https://git.openstack.org/cgit/openstack/tacker-horizon/commit/?id=04a26f375f47813c83dead3c2312c05fa2b1394f
Submitter: Jenkins
Branch: master

commit 04a26f375f47813c83dead3c2312c05fa2b1394f
Author: gong yong sheng <gong.yongsheng@99cloud.net>
Date: Wed Jan 4 03:16:41 2017 +0000

    Get service type according to tacker server change

    https://review.openstack.org/#/c/390787/ changed the service
    type in vnfd dict, the horizon should change accordingly.

    This patch also change the column name of service type.

    Change-Id: I95a11027dd3c658a2689257b0bbd717c05ae10a1
    Closes-bug: #1652751

Changed in tacker:
status: In Progress → Fix Released
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix included in openstack/tacker-horizon 0.6.0

This issue was fixed in the openstack/tacker-horizon 0.6.0 release.

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

Other bug subscribers

Related questions

Remote bug watches

Bug watches keep track of this bug in other bug trackers.