Skip to content

Commit

Permalink
During router create, if we are also updating external gateway, we we…
Browse files Browse the repository at this point in the history
…re 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.

Change-Id: I529b7f9e0b2ab3b635809af8678addc34467422c
Closes-Bug: 1373257
(cherry picked from commit f1342cf)
  • Loading branch information
Sachin Bansal committed Sep 26, 2014
1 parent 36405bd commit 0f245ac
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
Expand Up @@ -2841,6 +2841,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')

Expand Down

0 comments on commit 0f245ac

Please sign in to comment.