Skip to content

Commit

Permalink
Merge "Ignore objects in inconsistent state during listing" into R2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Zuul authored and opencontrail-ci-admin committed Jun 26, 2015
2 parents 774b557 + 89e52b3 commit d924f27
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
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 d924f27

Please sign in to comment.