[UI] API Server - Qos configuration page throws Internal server error

Bug #1605528 reported by Vedamurthy Joshi
30
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Juniper Openstack
Status tracked in Trunk
R3.1
Fix Committed
Critical
Sachin Bansal
R3.2
Fix Committed
Critical
Sachin Bansal
Trunk
Fix Committed
Critical
Sachin Bansal

Bug Description

R3.1 Build 4 Kilo

URL : https://nodec1:8143/#p=config_infra_gblconfig&q[tab][global-config-tab]=qos_global_tab

Error :

[12:26:46 PM] vedujoshi: Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/bottle.py", line 856, in _handle
    return route.call(**args)
  File "/usr/lib/python2.7/dist-packages/bottle.py", line 1721, in wrapper
    rv = callback(*a, **ka)
  File "/usr/lib/python2.7/dist-packages/vnc_cfg_api_server/vnc_cfg_api_server.py", line 1618, in handler_trap_exception
    response = handler(*args, **kwargs)
  File "/usr/lib/python2.7/dist-packages/cfgm_common/vnc_api_stats.py", line 17, in wrapper
    response = func(api_server_obj, resource_type, args, *kwargs)
  File "/usr/lib/python2.7/dist-packages/vnc_cfg_api_server/vnc_cfg_api_server.py", line 977, in http_resource_list
    parent_uuids = [self._db_conn.fq_name_to_uuid(parent_type, parent_fq_name)]
  File "/usr/lib/python2.7/dist-packages/vnc_cfg_api_server/vnc_cfg_ifmap.py", line 2027, in fq_name_to_uuid
    obj_uuid = self._cassandra_db.fq_name_to_uuid(obj_type, fq_name)
  File "/usr/lib/python2.7/dist-packages/cfgm_common/vnc_cassandra.py", line 1263, in fq_name_to_uuid
    raise NoIdError('%s %s' % (obj_type, fq_name_str))
NoIdError: Unknown id: global-qos-config default-global-system-config:default-global-qos-config
10.204.216.58 - - [2016-07-22 12:23:17] "GET /qos-configs?detail=true&parent_fq_name_str=default-global-system-config:default-global-qos-config&parent_type=global-qos-config HTTP/1.1" 500 156 0.082260

------
Qos configs by default :

{
    "qos-configs": [
        {
            "fq_name": [
                "default-domain",
                "default-project",
                "default-qos-config"
            ],
            "href": "http://127.0.0.1:8095/qos-config/38ed63a2-6cea-48df-b050-239030abfc2f",
            "uuid": "38ed63a2-6cea-48df-b050-239030abfc2f"
        },
        {
            "fq_name": [
                "default-global-system-config",
                "default-global-qos-config",
                "default-qos-config"
            ],
            "href": "http://127.0.0.1:8095/qos-config/6432240b-dc2f-4550-8247-0126d27c0eff",
            "uuid": "6432240b-dc2f-4550-8247-0126d27c0eff"
        }
    ]
}

tags: added: blocker
Rahul (rahuls)
tags: added: api
Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] master

Review in progress for https://review.opencontrail.org/22359
Submitter: Sachin Bansal (<email address hidden>)

Sachin Bansal (sbansal)
Changed in juniperopenstack:
assignee: Siva Bavanasi (kbsiva) → Sachin Bansal (sbansal)
Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] R3.1

Review in progress for https://review.opencontrail.org/22360
Submitter: Sachin Bansal (<email address hidden>)

shajuvk (shajuvk)
tags: added: rbac
Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : A change has been merged

Reviewed: https://review.opencontrail.org/22360
Committed: http://github.org/Juniper/contrail-controller/commit/c0e8cffca8c91e7ce3488c97a3d8951c2e984932
Submitter: Zuul
Branch: R3.1

commit c0e8cffca8c91e7ce3488c97a3d8951c2e984932
Author: Sachin Bansal <email address hidden>
Date: Fri Jul 22 12:18:34 2016 -0700

Convert parent resource type to parent object type

fq_name_to_id now only accepts object type. Before calling it, we should convert
resource type to object type

Change-Id: Idb963dc7ac91d849b274c2c85edb1407ab4f5c38
Closes-Bug: 1605528
(cherry picked from commit 71e1a799deba84dd6967313320e2030d25fabc67)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote :

Reviewed: https://review.opencontrail.org/22359
Committed: http://github.org/Juniper/contrail-controller/commit/71e1a799deba84dd6967313320e2030d25fabc67
Submitter: Zuul
Branch: master

commit 71e1a799deba84dd6967313320e2030d25fabc67
Author: Sachin Bansal <email address hidden>
Date: Fri Jul 22 12:18:34 2016 -0700

Convert parent resource type to parent object type

fq_name_to_id now only accepts object type. Before calling it, we should convert
resource type to object type

Change-Id: Idb963dc7ac91d849b274c2c85edb1407ab4f5c38
Closes-Bug: 1605528

Revision history for this message
Siva Bavanasi (kbsiva) wrote : Re: [UI] Qos configuration page throws Internal server error

This issue still seen in R3.2 build 5

Revision history for this message
Sachin Bansal (sbansal) wrote :

Could you please post the traceback from the latest image?

Revision history for this message
Siva Bavanasi (kbsiva) wrote :
Download full text (6.1 KiB)

Python 2.7.6: /usr/bin/python
Wed Nov 30 15:30:49 2016

A problem occurred in a Python script. Here is the sequence of
function calls leading up to the error, in the order they occurred.

 /usr/lib/python2.7/dist-packages/vnc_cfg_api_server/vnc_cfg_api_server.py in handler_trap_exception(*args=(), **kwargs={})
 1670 (code, err_msg) = status
 1671 raise cfgm_common.exceptions.HttpError(code, err_msg)
 1672 response = handler(*args, **kwargs)
 1673 self._generate_rest_api_response_trace(trace, response)
 1674
response undefined
handler = <functools.partial object>
args = ()
kwargs = {}

 /usr/lib/python2.7/dist-packages/cfgm_common/vnc_api_stats.py in wrapper(api_server_obj=<vnc_cfg_api_server.vnc_cfg_api_server.VncApiServer object>, resource_type='qos_config', *args=(), **kwargs={})
   15 statistics = VncApiStatistics(
   16 obj_type=resource_type.replace('-', '_'))
   17 response = func(api_server_obj, resource_type, *args, **kwargs)
   18 statistics.response_size = len(str(response))
   19 statistics.response_code = bottle.response.status_code
response undefined
func = <function http_resource_list>
api_server_obj = <vnc_cfg_api_server.vnc_cfg_api_server.VncApiServer object>
resource_type = 'qos_config'
args = ()
kwargs = {}

 /usr/lib/python2.7/dist-packages/vnc_cfg_api_server/vnc_cfg_api_server.py in http_resource_list(self=<vnc_cfg_api_server.vnc_cfg_api_server.VncApiServer object>, obj_type='qos_config')
 1051 parent_res_type)
 1052 parent_uuids = [self._db_conn.fq_name_to_uuid(parent_type,
 1053 parent_fq_name)]
 1054 elif 'parent_id' in get_request().query:
 1055 parent_uuids = get_request().query.parent_id.split(',')
parent_fq_name = [u'default-global-system-config', u'default-global-qos-config']

 /usr/lib/python2.7/dist-packages/vnc_cfg_api_server/vnc_cfg_ifmap.py in fq_name_to_uuid(self=<vnc_cfg_api_server.vnc_cfg_ifmap.VncDbClient object>, obj_type='global-qos-config', fq_name=[u'default-global-system-config', u'default-global-qos-config'])
 2094
 2095 def fq_name_to_uuid(self, obj_type, fq_name):
 2096 obj_uuid = self._cassandra_db.fq_name_to_uuid(obj_type, fq_name)
 2097 return obj_uuid
 2098 # end fq_name_to_uuid
obj_uuid undefined
self = <vnc_cfg_api_server.vnc_cfg_ifmap.VncDbClient object>
self._cassandra_db = <vnc_cfg_api_server.vnc_cfg_ifmap.VncServerCassandraClient object>
self._cassandra_db.fq_name_to_uuid = <bound method VncServerCassandraClient.fq_name_t...r.vnc_cfg_ifmap.VncServerCassandraClient object>>
obj_type = 'global-qos-config'
fq_name = [u'default-global-system-config', u'default-global-qos-config']

 /usr/lib/python2.7/dist-packages/cfgm_common/vnc_cassandra.py in fq_name_to_uuid(self=<vnc_cfg_api_server.vnc_cfg_ifmap.VncServerCassandraClient object>, obj_type='global-qos-config', fq_name=[u'default-global-system-config', u'default-global-qos-config'])
 1244 finish=fq_name_str + ';')
 1245 if not col_infos:
 1...

Read more...

Revision history for this message
Rahul (rahuls) wrote :
summary: - [UI] Qos configuration page throws Internal server error
+ [UI] API Server - Qos configuration page throws Internal server error
Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : A change has been merged

Reviewed: https://review.opencontrail.org/26572
Committed: http://github.org/Juniper/contrail-controller/commit/73ea29426caf6964b78cea718415294f3bb875b1
Submitter: Zuul (<email address hidden>)
Branch: R3.2

commit 73ea29426caf6964b78cea718415294f3bb875b1
Author: Sachin Bansal <email address hidden>
Date: Tue Nov 29 11:28:52 2016 -0800

Convert parent resource type to object type

Convert parent resource type to object type before calling fq_name_to_uuid

Change-Id: I3492ea50ba6a3ab5ce14b5ee7eddecc49ad0cfca
Closes-Bug: 1605528

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote :

Reviewed: https://review.opencontrail.org/26573
Committed: http://github.org/Juniper/contrail-controller/commit/f88410eab510e6e076032cfcb3f3cab4732b3716
Submitter: Zuul (<email address hidden>)
Branch: master

commit f88410eab510e6e076032cfcb3f3cab4732b3716
Author: Sachin Bansal <email address hidden>
Date: Tue Nov 29 11:28:52 2016 -0800

Convert parent resource type to object type

Convert parent resource type to object type before calling fq_name_to_uuid

Change-Id: I3492ea50ba6a3ab5ce14b5ee7eddecc49ad0cfca
Closes-Bug: 1605528
(cherry picked from commit 73ea29426caf6964b78cea718415294f3bb875b1)

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

Duplicates of this bug

Other bug subscribers

Remote bug watches

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