Activity log for bug #1348737

Date Who What changed Old value New value Message
2014-07-25 17:47:47 Rajeev Grover bug added bug
2014-07-25 18:04:59 Rajeev Grover neutron: assignee Rajeev Grover (rajeev-grover)
2014-07-25 18:50:50 Rajeev Grover neutron: assignee Rajeev Grover (rajeev-grover)
2014-07-25 23:28:47 OpenStack Infra neutron: status New In Progress
2014-07-25 23:28:47 OpenStack Infra neutron: assignee Rajeev Grover (rajeev-grover)
2014-07-28 21:27:07 Rajeev Grover description once an external gateway is set, due to a logic error, for every subsequent router update the L-3 agent incorrectly concludes there is a change in external gateway. This causes the codepath to set external gateway getting invoked un-necessarily. In process_router(...) .... ex_gw_port = self._get_ex_gw_port(ri) returns ri.router.get('gw_port') ... if ex_gw_port and ex_gw_port != ri.ex_gw_port: self._set_subnet_info(ex_gw_port) <-------- ... ri.ex_gw_port = ex_gw_port The _set_subnet_info adds an element to the ex_gw_port thus making it different from the gw_port obtained out of router dict. Any subsequent ex_gw_port != ri.ex_gw_port would result True, incorrectly. One way to fix it would be to change From: if ex_gw_port and ex_gw_port != ri.ex_gw_port: To: if (ex_gw_port and (not ri.ex_gw_port or ex_gw_port['id'] != ri.ex_gw_port['id'])): once an external gateway is set, due to a logic error, for every subsequent router update the L-3 agent incorrectly concludes there is a change in external gateway. This causes the codepath to set external gateway getting invoked un-necessarily. In process_router(...)   ....         ex_gw_port = self._get_ex_gw_port(ri) returns ri.router.get('gw_port')   ...           if ex_gw_port and ex_gw_port != ri.ex_gw_port:             self._set_subnet_info(ex_gw_port) <--------  ...          ri.ex_gw_port = ex_gw_port The _set_subnet_info adds an element to the ex_gw_port thus making it different from the gw_port obtained out of router dict. Any subsequent ex_gw_port != ri.ex_gw_port would result True, incorrectly. One way to fix it would be to change From:          if ex_gw_port and ex_gw_port != ri.ex_gw_port: To:         if (ex_gw_port and (not ri.ex_gw_port                             or ex_gw_port['id'] != ri.ex_gw_port['id'])): To reproduce: a) Create a router b) Add external gateway to it (router-gateway-set <router_name> <external_nw>) c) Do something that would cause the Plugin to send down an update to the router. This can be an action un-related to the external gateway e.g. add an interface to the router ( router-interface-add <router_name> <subnet>) d) Besides adding the interface, the agent code would treat this as if router gateway has been added or changed. It re-attempts to plug the router-gateway port and activities associated with it. This can be observed by reading the code and I believe observing the logs. I think you will see gratuitous arps getting sent out. I instrumented the code for my debugging so don’t remember if you will see clear logs without instrumentation or not. This definitely contributes to degradation of service due to slowing down things but don’t know yet if there will be a communication interruption or not. It does affect DVR too because DVR has additional actions such as setting up SNAT redirection as part of setting up the external gateway and can cause duplicate entries.
2014-08-04 19:59:01 OpenStack Infra neutron: assignee Rajeev Grover (rajeev-grover) Carl Baldwin (carl-baldwin)
2014-08-06 19:41:09 OpenStack Infra neutron: assignee Carl Baldwin (carl-baldwin) Rajeev Grover (rajeev-grover)
2014-08-07 21:03:08 Akihiro Motoki neutron: milestone juno-3
2014-08-07 21:03:50 Akihiro Motoki neutron: importance Undecided High
2014-08-07 21:04:03 Akihiro Motoki tags l3-ipam-dhcp
2014-08-08 05:48:42 OpenStack Infra neutron: status In Progress Fix Committed
2014-09-04 14:01:28 Thierry Carrez neutron: status Fix Committed Fix Released
2014-10-16 09:13:05 Thierry Carrez neutron: milestone juno-3 2014.2