[VNC API server] Cannot get resource with specific fields

Bug #1599175 reported by Édouard Thuleau
50
This bug affects 5 people
Affects Status Importance Assigned to Milestone
Juniper Openstack
Status tracked in Trunk
R3.1
Fix Committed
Critical
Édouard Thuleau
Trunk
Fix Committed
Critical
Édouard Thuleau
OpenContrail
Fix Committed
Critical
Édouard Thuleau

Bug Description

curl http://contrail_api:8082/virtual-network/5113c8fc-06a1-4db2-ab74-c81069aa4a12?fields=virtual_network_network_id
Internal Server Error

With that python traceback:

Traceback (most recent call last):
  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 627, in http_resource_read
    if (not result['id_perms'].get('user_visible', True) and
KeyError: 'id_perms'

Tags: blocker config
Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] master

Review in progress for https://review.opencontrail.org/21681
Submitter: ?douard Thuleau (<email address hidden>)

Revision history for this message
Ganesha HV (ganeshahv) wrote :

Facing this issue when testing Health-check with UI/Heat.

1]. #1599750 [3.1.0.0-2738] Schema crashes and RI for left-vn of a Service Chain not created
2]. #1599102 [3.1.0.0-2738]UI: Internal Server Error thrown when adding a SHC to a SI

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

Review in progress for https://review.opencontrail.org/21681
Submitter: ?douard Thuleau (<email address hidden>)

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

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

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

Review in progress for https://review.opencontrail.org/21681
Submitter: Édouard Thuleau (<email address hidden>)

Revision history for this message
Rahul (rahuls) wrote :

Blocks UI functionality

Changed in opencontrail:
importance: Undecided → Critical
assignee: nobody → Édouard Thuleau (ethuleau)
Revision history for this message
OpenContrail Admin (ci-admin-f) wrote :

Review in progress for https://review.opencontrail.org/21681
Submitter: Édouard Thuleau (<email address hidden>)

Revision history for this message
OpenContrail Admin (ci-admin-f) wrote : [Review update] R3.1

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

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

Reviewed: https://review.opencontrail.org/21681
Committed: http://github.org/Juniper/contrail-controller/commit/711a1f0a541218e2fe5f51acf2760d2cbeb95341
Submitter: Zuul
Branch: master

commit 711a1f0a541218e2fe5f51acf2760d2cbeb95341
Author: Édouard Thuleau <email address hidden>
Date: Tue Jul 5 16:09:13 2016 +0200

[VNC API server] Fix get resource with specific fields

When a fields are specifying during read resource, the 'id_perms'
property is not fetch and the API code fails to validate the user
visibility on it. That fix also limit the response to requested fields
in certain cases.
That fields also endorse that props and refs were always returned
irrespective of what fields were requested when a resource is read.

Change-Id: I95e90f540d5c860c1b9b217e5a0aee5d61402816
Closes-bug: #1599175

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

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

commit 52c8b2ed28839abd10a87cd16364e31d21d358f4
Author: Édouard Thuleau <email address hidden>
Date: Tue Jul 5 16:09:13 2016 +0200

[VNC API server] Fix get resource with specific fields

When a fields are specifying during read resource, the 'id_perms'
property is not fetch and the API code fails to validate the user
visibility on it. That fix also limit the response to requested fields
in certain cases.
That fields also endorse that props and refs were always returned
irrespective of what fields were requested when a resource is read.

Change-Id: I95e90f540d5c860c1b9b217e5a0aee5d61402816
Closes-bug: #1599175

Sachin Bansal (sbansal)
Changed in opencontrail:
status: New → Fix Committed
Changed in opencontrail:
status: Fix Committed → Fix Released
status: Fix Released → Fix Committed
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.