Skip to content

Commit

Permalink
Merge "During router create, if we are also updating external gateway…
Browse files Browse the repository at this point in the history
…, we were updating the logical_router object without reading it. This could clobber the id_perms on the server. We should read before updating the object. Ideally, we should protect against this in api server." into R1.10
  • Loading branch information
Zuul authored and Gerrit Code Review committed Sep 27, 2014
2 parents f0a6a63 + f1342cf commit 26ca018
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/config/vnc_openstack/vnc_openstack/neutron_plugin_db.py
Original file line number Diff line number Diff line change
Expand Up @@ -3291,6 +3291,8 @@ def router_create(self, router_q):

rtr_obj = self._router_neutron_to_vnc(router_q, CREATE)
rtr_uuid = self._resource_create('logical_router', rtr_obj)
# read it back to update id perms
rtr_obj = self._logical_router_read(rtr_uuid)
self._router_add_gateway(router_q, rtr_obj)
ret_router_q = self._router_vnc_to_neutron(rtr_obj, rtr_repr='SHOW')
self._db_cache['q_routers'][rtr_uuid] = ret_router_q
Expand Down

0 comments on commit 26ca018

Please sign in to comment.