Skip to content

Commit

Permalink
Ignore objects in inconsistent state during listing
Browse files Browse the repository at this point in the history
Change-Id: I3d087c26678f2e753959d34550350ee101b881a6
Closes-Bug: 1464901
(cherry picked from commit bb1af78)
  • Loading branch information
Sachin Bansal committed Jun 13, 2015
1 parent b8394ba commit 89e52b3
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/config/api-server/vnc_cfg_api_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -1291,6 +1291,11 @@ def _list_collection(self, obj_type, parent_uuids=None,
obj_dict['href'] = self.generate_url(
obj_type, obj_result['uuid'])
obj_dict.update(obj_result)
if 'id_perms' not in obj_dict:
# It is possible that the object was deleted, but received
# an update after that. We need to ignore it for now. In
# future, we should clean up such stale objects
continue
if (obj_dict['id_perms'].get('user_visible', True) or
self.is_admin_request()):
obj_dicts.append({obj_type: obj_dict})
Expand Down

0 comments on commit 89e52b3

Please sign in to comment.