)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":4656,"name":"Sean M. Collins","email":"sean@coreitpro.com","username":"scollins"},"change_message_id":"825ffdf86c16e1a5193070e631e6ae9f1f0a313d","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Avoid port delete failure with DVR"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"The agent could be deleted with other threads inside for loop. Get the agent when we get router_ids"},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"Change-Id: I140c48edb6a40e1ae667f501a0226c895131f647"},{"line_number":12,"context_line":"Closes-bug: 1398446"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"5a890539_8acaff6b","line":10,"updated":"2014-12-03 21:06:39.000000000","message":"This needs a newline, around 72 characters in.\n\nhttps://wiki.openstack.org/wiki/GitCommitMessages","commit_id":"26555562fa202cc8dd4860fd75b1fcaadb23bb28"}],"Empty file":[{"author":{"_account_id":4656,"name":"Sean M. Collins","email":"sean@coreitpro.com","username":"scollins"},"change_message_id":"185858fa2f8b21e6a35c7f324a955261046fab83","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"5a890539_8af59fcc","side":"PARENT","updated":"2014-12-03 21:04:43.000000000","message":"Commit message lines need to wrap around 72 characters - https://wiki.openstack.org/wiki/GitCommitMessages","commit_id":"333695c3e918a6c8e8064e77e344c3d1f94f7c56"}],"neutron/db/l3_dvrscheduler_db.py":[{"author":{"_account_id":9361,"name":"Vivekanandan Narasimhan","email":"n.vivekanandan@ericsson.com","username":"viveknarasimhan"},"change_message_id":"7f931088c4ce0661862206f76ba9564d82d452e8","unresolved":false,"context_lines":[{"line_number":186,"context_line":"            # because binding_update may remove agent port binding for DVR."},{"line_number":187,"context_line":"            agent \u003d self._get_agent_by_type_and_host(context,"},{"line_number":188,"context_line":"                                                     q_const.AGENT_TYPE_L3,"},{"line_number":189,"context_line":"                                                     port_host)"},{"line_number":190,"context_line":"            for prt in int_ports:"},{"line_number":191,"context_line":"                dvr_binding \u003d (ml2_db."},{"line_number":192,"context_line":"                               get_dvr_port_binding_by_host(context.session,"}],"source_content_type":"text/x-python","patch_set":11,"id":"1a930d6b_ac189bd3","line":189,"updated":"2015-01-27 16:57:46.000000000","message":"I agree that there might be some race condition, but am unable to visualize why why  _get_agent_by_type_and_host() would trigger the update() failure for ml2 dvr_port_bindings.\n\nThe _get_agent_by_type_and_host() uses the agents_db, while dvr_binding uses the ml2_dvr_bindings db and both are unrelated.","commit_id":"91a122306e11914f7638c0662496f9c370d18ba9"},{"author":{"_account_id":9361,"name":"Vivekanandan Narasimhan","email":"n.vivekanandan@ericsson.com","username":"viveknarasimhan"},"change_message_id":"42d8600b0667ecd9cf4e7a6ba996279b327f7bcf","unresolved":false,"context_lines":[{"line_number":198,"context_line":"                                                         port_host)"},{"line_number":199,"context_line":"            except exc.StaleDataError:"},{"line_number":200,"context_line":"                LOG.debug(\"get_agent and update port binding being executed \""},{"line_number":201,"context_line":"                          \"concurrently. Ignoring StaleDataError.\")"},{"line_number":202,"context_line":"            agent_id \u003d agent.id if agent else None"},{"line_number":203,"context_line":"            info \u003d {\u0027router_id\u0027: router_id, \u0027host\u0027: port_host,"},{"line_number":204,"context_line":"                    \u0027agent_id\u0027: str(agent_id)}"}],"source_content_type":"text/x-python","patch_set":13,"id":"da86d52c_80a1b5ab","line":201,"updated":"2015-02-01 11:04:55.000000000","message":"All updates/ creates to DB are scheduled towards the end of the transaction since the only caller of dvr_deletens_if_no_port() is within the ml2 plugin delete_port()s globally locked region.\n\nOn a multi-core processor it is still possible that dvr_deletens_if_no_port() would be triggered concurrently on a different core, thereby removing a port whose binding is attempted to be updated here.  This is possible because  the locks here would not be multi-core safe. \n\nBut, please help me clarify on why an idempotent fetch of a row in agents_db table is affected because of an update of row into ml2_dvr_port_bindings table, when both these tables are unrelated.\n\nI haven\u0027t given a -1, so that the whole review isn\u0027t blocked.","commit_id":"71962b640ed30792b922c81adf5ccf9bc671f7ba"},{"author":{"_account_id":7183,"name":"Xu Han Peng","email":"xuhanp@linux.vnet.ibm.com","username":"xuhanp"},"change_message_id":"f3ad0c043fe04e7a3fc2a46d61b1cfc43ef39ba4","unresolved":false,"context_lines":[{"line_number":198,"context_line":"                                                         port_host)"},{"line_number":199,"context_line":"            except exc.StaleDataError:"},{"line_number":200,"context_line":"                LOG.debug(\"get_agent and update port binding being executed \""},{"line_number":201,"context_line":"                          \"concurrently. Ignoring StaleDataError.\")"},{"line_number":202,"context_line":"            agent_id \u003d agent.id if agent else None"},{"line_number":203,"context_line":"            info \u003d {\u0027router_id\u0027: router_id, \u0027host\u0027: port_host,"},{"line_number":204,"context_line":"                    \u0027agent_id\u0027: str(agent_id)}"}],"source_content_type":"text/x-python","patch_set":13,"id":"da86d52c_cabbc470","line":201,"in_reply_to":"da86d52c_80a1b5ab","updated":"2015-02-02 02:34:06.000000000","message":"I don\u0027t understand this neither. Why update to ml2_dvr_port_bindings affects the change to agent table? Can you elaborate this in commit message for reviewer\u0027s benefit?","commit_id":"71962b640ed30792b922c81adf5ccf9bc671f7ba"},{"author":{"_account_id":12524,"name":"Zengfa Gao","email":"zengfa.gao@hp.com","username":"zengfagao"},"change_message_id":"7fd4ecd5db43cd5d45189382d2f4bd4bf65322d9","unresolved":false,"context_lines":[{"line_number":198,"context_line":"                                                         port_host)"},{"line_number":199,"context_line":"            except exc.StaleDataError:"},{"line_number":200,"context_line":"                LOG.debug(\"get_agent and update port binding being executed \""},{"line_number":201,"context_line":"                          \"concurrently. Ignoring StaleDataError.\")"},{"line_number":202,"context_line":"            agent_id \u003d agent.id if agent else None"},{"line_number":203,"context_line":"            info \u003d {\u0027router_id\u0027: router_id, \u0027host\u0027: port_host,"},{"line_number":204,"context_line":"                    \u0027agent_id\u0027: str(agent_id)}"}],"source_content_type":"text/x-python","patch_set":13,"id":"da86d52c_c5f8c94b","line":201,"in_reply_to":"da86d52c_80a1b5ab","updated":"2015-02-03 15:31:01.000000000","message":"_get_agent_by_type_host throws StaleDataError in my multi controller and compute nodes environment several times. It may be caused by other thread updates.","commit_id":"71962b640ed30792b922c81adf5ccf9bc671f7ba"},{"author":{"_account_id":12524,"name":"Zengfa Gao","email":"zengfa.gao@hp.com","username":"zengfagao"},"change_message_id":"7fd4ecd5db43cd5d45189382d2f4bd4bf65322d9","unresolved":false,"context_lines":[{"line_number":198,"context_line":"                                                         port_host)"},{"line_number":199,"context_line":"            except exc.StaleDataError:"},{"line_number":200,"context_line":"                LOG.debug(\"get_agent and update port binding being executed \""},{"line_number":201,"context_line":"                          \"concurrently. Ignoring StaleDataError.\")"},{"line_number":202,"context_line":"            agent_id \u003d agent.id if agent else None"},{"line_number":203,"context_line":"            info \u003d {\u0027router_id\u0027: router_id, \u0027host\u0027: port_host,"},{"line_number":204,"context_line":"                    \u0027agent_id\u0027: str(agent_id)}"}],"source_content_type":"text/x-python","patch_set":13,"id":"da86d52c_e5614d3a","line":201,"in_reply_to":"da86d52c_cabbc470","updated":"2015-02-03 15:31:01.000000000","message":"I looked at code logic, cannot understand that why this StaleDataError happens. I saw it happened several times in my multi node environment.","commit_id":"71962b640ed30792b922c81adf5ccf9bc671f7ba"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"change_message_id":"4fc2ff24394f331080bb1d1ac60e27136de5541f","unresolved":false,"context_lines":[{"line_number":201,"context_line":"                          \"concurrently. Ignoring StaleDataError.\")"},{"line_number":202,"context_line":"            agent_id \u003d agent.id if agent else None"},{"line_number":203,"context_line":"            info \u003d {\u0027router_id\u0027: router_id, \u0027host\u0027: port_host,"},{"line_number":204,"context_line":"                    \u0027agent_id\u0027: str(agent_id)}"},{"line_number":205,"context_line":"            removed_router_info.append(info)"},{"line_number":206,"context_line":"            LOG.debug(\u0027Router namespace %(router_id)s on host %(host)s \u0027"},{"line_number":207,"context_line":"                      \u0027to be deleted\u0027, info)"}],"source_content_type":"text/x-python","patch_set":13,"id":"da86d52c_a04f9991","line":204,"updated":"2015-02-01 11:47:12.000000000","message":"I don\u0027t think we need to return the router agent pair if the agent_id is None!","commit_id":"71962b640ed30792b922c81adf5ccf9bc671f7ba"}],"neutron/tests/unit/test_l3_schedulers.py":[{"author":{"_account_id":9361,"name":"Vivekanandan Narasimhan","email":"n.vivekanandan@ericsson.com","username":"viveknarasimhan"},"change_message_id":"7f931088c4ce0661862206f76ba9564d82d452e8","unresolved":false,"context_lines":[{"line_number":963,"context_line":"            result \u003d self.dut.dvr_deletens_if_no_port(self.adminContext,"},{"line_number":964,"context_line":"                                                      \u0027dvr_port1\u0027)"},{"line_number":965,"context_line":"            self.assertTrue(len(result) \u003d\u003d 1"},{"line_number":966,"context_line":"                            and agent_id in str(result), str(result))"},{"line_number":967,"context_line":""},{"line_number":968,"context_line":"    def _get_agent_by_host(self, dvr_port_bindings, port_host, agent_id):"},{"line_number":969,"context_line":"        agent \u003d agents_db.Agent()"}],"source_content_type":"text/x-python","patch_set":11,"id":"1a930d6b_e03c67ca","line":966,"updated":"2015-01-27 16:57:46.000000000","message":"Not sure what this test case validates for.  Without the fix made here also, this test case would pass.  \n\nIt looks like we may need a functional test case to validate the race failure, as the above test doesn\u0027t check for the order of calls to get_agent_by_type_and_host with respect to updating dvr_port bindings.","commit_id":"91a122306e11914f7638c0662496f9c370d18ba9"}]}
