)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"5a89ec4a1c42b4892b0506f9c35e3f2f4f192985","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Change create/update ha router logic"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Create router in \"BUILD\" status. Add option keep_in_build, so"},{"line_number":10,"context_line":"\"ACTIVE\" status will be set for router only  after all of the"},{"line_number":11,"context_line":"interfaces have been created."},{"line_number":12,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":4,"id":"da6ed579_88104a50","line":9,"updated":"2016-01-12 03:39:44.000000000","message":"You removed keep_in_build in PS 4.","commit_id":"b8d41eda76a0d3c7cca4a46dcde22728c329a063"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"b0426b54c01ef6cfc072f944a31f039e9b7e1957","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Kevin Benton \u003ckevin@benton.pub\u003e"},{"line_number":5,"context_line":"CommitDate: 2016-02-22 11:19:40 -0800"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Add ALLOCATING state to routers"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This patch adds a new ALLOCATING status to routers"},{"line_number":10,"context_line":"to indicate that the routers are still being built on the"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":23,"id":"9aed3d3a_3097e891","line":7,"range":{"start_line":7,"start_character":24,"end_line":7,"end_character":31},"updated":"2016-02-26 10:46:08.000000000","message":"Nit: currently the ALLOCATING state is only added to HA router, the patch title is a little inaccurate.","commit_id":"c824493940b362da74105ebdac1ce339bc1d3b7a"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"06292cdb9ebb1515ba8ab4935822baedfe069119","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Kevin Benton \u003ckevin@benton.pub\u003e"},{"line_number":5,"context_line":"CommitDate: 2016-02-22 11:19:40 -0800"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Add ALLOCATING state to routers"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This patch adds a new ALLOCATING status to routers"},{"line_number":10,"context_line":"to indicate that the routers are still being built on the"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":23,"id":"9aed3d3a_232dcd46","line":7,"updated":"2016-02-26 16:42:36.000000000","message":"This is to set the expectation for clients. As you pointed out, two concurrent updates could come in and one could change the type to something else while the other update has it in the ALLOCATING status.","commit_id":"c824493940b362da74105ebdac1ce339bc1d3b7a"}],"neutron/common/constants.py":[{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"8971c6bf6a9b2cc45beb82b3ccb3c09dae3051c7","unresolved":false,"context_lines":[{"line_number":27,"context_line":"# NOTE(kevinbenton): a BUILD status for routers could be added in the future"},{"line_number":28,"context_line":"# for agents to indicate when they are wiring up the ports. The following is"},{"line_number":29,"context_line":"# to indicate when the server is busy building sub-components of a router"},{"line_number":30,"context_line":"ROUTER_STATUS_ALLOCATING \u003d \u0027ALLOCATING_RESOURCES\u0027"},{"line_number":31,"context_line":"L3_AGENT_MODE_DVR \u003d \u0027dvr\u0027"},{"line_number":32,"context_line":"L3_AGENT_MODE_DVR_SNAT \u003d \u0027dvr_snat\u0027"},{"line_number":33,"context_line":"L3_AGENT_MODE_LEGACY \u003d \u0027legacy\u0027"}],"source_content_type":"text/x-python","patch_set":9,"id":"dae33548_546d8eca","line":30,"updated":"2016-02-18 14:15:16.000000000","message":"This is longer than 16 characters so you\u0027re getting 500 error in the fullstack job (Status field is \u003c\u003d 16 chars), but not the unit tests for some reason.","commit_id":"a0fd07ac944059793dcc19686e454021fa4c30ac"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"27c0e41f1d2451df3bec39c1954905ed9dac8e66","unresolved":false,"context_lines":[{"line_number":27,"context_line":"# NOTE(kevinbenton): a BUILD status for routers could be added in the future"},{"line_number":28,"context_line":"# for agents to indicate when they are wiring up the ports. The following is"},{"line_number":29,"context_line":"# to indicate when the server is busy building sub-components of a router"},{"line_number":30,"context_line":"ROUTER_STATUS_ALLOCATING \u003d \u0027ALLOCATING_RESOURCES\u0027"},{"line_number":31,"context_line":"L3_AGENT_MODE_DVR \u003d \u0027dvr\u0027"},{"line_number":32,"context_line":"L3_AGENT_MODE_DVR_SNAT \u003d \u0027dvr_snat\u0027"},{"line_number":33,"context_line":"L3_AGENT_MODE_LEGACY \u003d \u0027legacy\u0027"}],"source_content_type":"text/x-python","patch_set":9,"id":"dae33548_158124fc","line":30,"updated":"2016-02-19 01:49:05.000000000","message":"Whoops. will change to ALLOCATING","commit_id":"a0fd07ac944059793dcc19686e454021fa4c30ac"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"ccec333bfd255c842b3a8d441a742666fc0ff8c9","unresolved":false,"context_lines":[{"line_number":27,"context_line":"# NOTE(kevinbenton): a BUILD status for routers could be added in the future"},{"line_number":28,"context_line":"# for agents to indicate when they are wiring up the ports. The following is"},{"line_number":29,"context_line":"# to indicate when the server is busy building sub-components of a router"},{"line_number":30,"context_line":"ROUTER_STATUS_ALLOCATING \u003d \u0027ALLOCATING_RESOURCES\u0027"},{"line_number":31,"context_line":"L3_AGENT_MODE_DVR \u003d \u0027dvr\u0027"},{"line_number":32,"context_line":"L3_AGENT_MODE_DVR_SNAT \u003d \u0027dvr_snat\u0027"},{"line_number":33,"context_line":"L3_AGENT_MODE_LEGACY \u003d \u0027legacy\u0027"}],"source_content_type":"text/x-python","patch_set":9,"id":"dae33548_0e464e7a","line":30,"in_reply_to":"dae33548_546d8eca","updated":"2016-02-18 15:07:33.000000000","message":"From a quick Googling it looks like SQLite doesn\u0027t enforce maximum string length, while other DBs (Particularly MySQL which we run in the fullstack job) does.","commit_id":"a0fd07ac944059793dcc19686e454021fa4c30ac"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"b9256c05ebd639a6f79d49ed452c3d1e873ccb8c","unresolved":false,"context_lines":[{"line_number":23,"context_line":"ROUTER_PORT_OWNERS \u003d lib_constants.ROUTER_INTERFACE_OWNERS_SNAT + \\"},{"line_number":24,"context_line":"    (lib_constants.DEVICE_OWNER_ROUTER_GW,)"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"ROUTER_STATUS_ACTIVE \u003d \u0027ACTIVE\u0027"},{"line_number":27,"context_line":"# NOTE(kevinbenton): a BUILD status for routers could be added in the future"},{"line_number":28,"context_line":"# for agents to indicate when they are wiring up the ports. The following is"},{"line_number":29,"context_line":"# to indicate when the server is busy building sub-components of a router"}],"source_content_type":"text/x-python","patch_set":13,"id":"bae84128_6e7df86d","line":26,"updated":"2016-02-21 12:08:46.000000000","message":"These should be moved to neutron-lib IMO, but can be done in follow up patches.","commit_id":"4097599a6521e174d92c94eaa7abd594e39acd0c"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"4bf6808c476da955dc4e6a775ae732597ef661ee","unresolved":false,"context_lines":[{"line_number":23,"context_line":"ROUTER_PORT_OWNERS \u003d lib_constants.ROUTER_INTERFACE_OWNERS_SNAT + \\"},{"line_number":24,"context_line":"    (lib_constants.DEVICE_OWNER_ROUTER_GW,)"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"ROUTER_STATUS_ACTIVE \u003d \u0027ACTIVE\u0027"},{"line_number":27,"context_line":"# NOTE(kevinbenton): a BUILD status for routers could be added in the future"},{"line_number":28,"context_line":"# for agents to indicate when they are wiring up the ports. The following is"},{"line_number":29,"context_line":"# to indicate when the server is busy building sub-components of a router"}],"source_content_type":"text/x-python","patch_set":13,"id":"bae84128_e9baa222","line":26,"updated":"2016-02-21 12:18:48.000000000","message":"yeah, I just don\u0027t want this to depend on a neutron-lib release, especially since we will want to back-port it","commit_id":"4097599a6521e174d92c94eaa7abd594e39acd0c"}],"neutron/db/l3_agentschedulers_db.py":[{"author":{"_account_id":10267,"name":"venkata anil","email":"anilvenkata@redhat.com","username":"anil"},"change_message_id":"7150468968fc50cedbb6f1941f2791bd11f83bee","unresolved":false,"context_lines":[{"line_number":343,"context_line":"                                               router_ids):"},{"line_number":344,"context_line":"        if n_utils.is_extension_supported(self,"},{"line_number":345,"context_line":"                                          constants.L3_HA_MODE_EXT_ALIAS):"},{"line_number":346,"context_line":"            routers \u003d self.get_ha_sync_data_for_host(context, host, agent,"},{"line_number":347,"context_line":"                                                     router_ids\u003drouter_ids,"},{"line_number":348,"context_line":"                                                     active\u003dTrue)"},{"line_number":349,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":30,"id":"da0c15f0_5f2a3a7f","line":346,"updated":"2016-03-28 12:58:21.000000000","message":"Why can\u0027t we filter router_ids before L346(between L345 and L346). In this way we can avoid DB calls for routers with ROUTER_STATUS_ALLOCATING status.","commit_id":"c56b9b0d29336960ea48b5da41dd283e507a07c5"},{"author":{"_account_id":10267,"name":"venkata anil","email":"anilvenkata@redhat.com","username":"anil"},"change_message_id":"7b6f8a890a67874aeeb887d6cc9dec05f24ab688","unresolved":false,"context_lines":[{"line_number":343,"context_line":"                                               router_ids):"},{"line_number":344,"context_line":"        if n_utils.is_extension_supported(self,"},{"line_number":345,"context_line":"                                          constants.L3_HA_MODE_EXT_ALIAS):"},{"line_number":346,"context_line":"            routers \u003d self.get_ha_sync_data_for_host(context, host, agent,"},{"line_number":347,"context_line":"                                                     router_ids\u003drouter_ids,"},{"line_number":348,"context_line":"                                                     active\u003dTrue)"},{"line_number":349,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":30,"id":"ba0121b8_c554f955","line":346,"in_reply_to":"ba0121b8_14046513","updated":"2016-03-29 12:29:20.000000000","message":"I am suggesting this change\n\n    def ignore_allocating_ha_routers(self, context, router_ids):\n        query \u003d (context.session.query(Router.id).\n                 filter(\n                     Router.id.in_(router_ids),\n                     Router.status !\u003d l3_constants.ROUTER_STATUS_ALLOCATING))\n        valid_routers \u003d set(r.id for r in query)\n        return valid_routers\n\n    def _get_active_l3_agent_routers_sync_data(self, context, host, agent,\n                                               router_ids):\n        if n_utils.is_extension_supported(self,\n                                          constants.L3_HA_MODE_EXT_ALIAS):\n            router_ids \u003d self.ignore_allocating_ha_routers(context, router_ids)\n            return self.get_ha_sync_data_for_host(context, host, agent,\n                                                  router_ids\u003drouter_ids,\n                                                  active\u003dTrue)\n\n        return self.get_sync_data(context, router_ids\u003drouter_ids, active\u003dTrue)\n\nThe advantages are \n1) You are avoiding filtering on get_sync_data(similar to code without this patch) as your filtering is inside \nif n_utils.is_extension_supported():\n2) you are calling \"get_ha_sync_data_for_host\" for only valid routers","commit_id":"c56b9b0d29336960ea48b5da41dd283e507a07c5"},{"author":{"_account_id":10267,"name":"venkata anil","email":"anilvenkata@redhat.com","username":"anil"},"change_message_id":"08d297416d0718d9e0ea7b07681edf0797e6f55f","unresolved":false,"context_lines":[{"line_number":343,"context_line":"                                               router_ids):"},{"line_number":344,"context_line":"        if n_utils.is_extension_supported(self,"},{"line_number":345,"context_line":"                                          constants.L3_HA_MODE_EXT_ALIAS):"},{"line_number":346,"context_line":"            routers \u003d self.get_ha_sync_data_for_host(context, host, agent,"},{"line_number":347,"context_line":"                                                     router_ids\u003drouter_ids,"},{"line_number":348,"context_line":"                                                     active\u003dTrue)"},{"line_number":349,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":30,"id":"ba0121b8_30d9a722","line":346,"in_reply_to":"ba0121b8_55ba5024","updated":"2016-03-29 15:04:50.000000000","message":"@Kevin\nI am fine with existing approach. Let Kevin also share his opinion.","commit_id":"c56b9b0d29336960ea48b5da41dd283e507a07c5"},{"author":{"_account_id":7249,"name":"Ann Taraday","email":"akamyshnikova@mirantis.com","username":"AKamyshnikova"},"change_message_id":"26055eca22c3754fa002fd0e086977a2a7e4b6ba","unresolved":false,"context_lines":[{"line_number":343,"context_line":"                                               router_ids):"},{"line_number":344,"context_line":"        if n_utils.is_extension_supported(self,"},{"line_number":345,"context_line":"                                          constants.L3_HA_MODE_EXT_ALIAS):"},{"line_number":346,"context_line":"            routers \u003d self.get_ha_sync_data_for_host(context, host, agent,"},{"line_number":347,"context_line":"                                                     router_ids\u003drouter_ids,"},{"line_number":348,"context_line":"                                                     active\u003dTrue)"},{"line_number":349,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":30,"id":"ba0121b8_55ba5024","line":346,"in_reply_to":"ba0121b8_c554f955","updated":"2016-03-29 14:09:05.000000000","message":"Your suggestion looks good but, I will feel more comfortable if we stick to Kevin\u0027s changes as there we get sync data and then filter it so router may switch to \u0027ACTIVE\u0027 during that call and won\u0027t be missing.","commit_id":"c56b9b0d29336960ea48b5da41dd283e507a07c5"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"b1fda3bb5c64b686f71c6785cd7c1f6e97bcffd0","unresolved":false,"context_lines":[{"line_number":343,"context_line":"                                               router_ids):"},{"line_number":344,"context_line":"        if n_utils.is_extension_supported(self,"},{"line_number":345,"context_line":"                                          constants.L3_HA_MODE_EXT_ALIAS):"},{"line_number":346,"context_line":"            routers \u003d self.get_ha_sync_data_for_host(context, host, agent,"},{"line_number":347,"context_line":"                                                     router_ids\u003drouter_ids,"},{"line_number":348,"context_line":"                                                     active\u003dTrue)"},{"line_number":349,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":30,"id":"ba0121b8_14046513","line":346,"in_reply_to":"da0c15f0_5f2a3a7f","updated":"2016-03-29 11:20:22.000000000","message":"It\u0027s definitely possible to move this logic to l3_db._get_sync_routers(). However, I\u0027m not inclined to do so for one (good, IMO) reason: The logic that\u0027s done in get_ha_sync_data_for_host (and specifically the dvr part of that logic) is heavy and has a lot of \u0027process_XXX\u0027 functions. Removing the calls for these functions might prove cause a few more hidden errors that will be somewhat hard to debug. In short, I\u0027m not interested in even finding out the consequences here :)\n\nI\u0027m gonna let Kevin pitch in on this since he placed this code here. If he deems it worthy we can always move it onward.","commit_id":"c56b9b0d29336960ea48b5da41dd283e507a07c5"}],"neutron/db/l3_db.py":[{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"2e5ba96b0e6ab9c0bd1fca8cbe434bc4ca5d7286","unresolved":false,"context_lines":[{"line_number":190,"context_line":"           router_db \u003d self.set_active_status(context, router_db[\u0027id\u0027])"},{"line_number":191,"context_line":"        return self._make_router_dict(router_db)"},{"line_number":192,"context_line":""},{"line_number":193,"context_line":"    def set_active_status(self, context, router_id):"},{"line_number":194,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":195,"context_line":"            router \u003d self._get_router(context, router_id)"},{"line_number":196,"context_line":"            data \u003d {\u0027status\u0027: \u0027ACTIVE\u0027}"}],"source_content_type":"text/x-python","patch_set":1,"id":"5a710552_430e663c","line":193,"updated":"2015-12-16 09:08:48.000000000","message":"we can use _update_router_db instead of this method","commit_id":"4ea920487ab128fbfecb057b7113ea7129291827"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"f622be711e4b3d26f5f01f14ab9af46efd618502","unresolved":false,"context_lines":[{"line_number":175,"context_line":"    def create_router(self, context, router, keep_in_build\u003dFalse):"},{"line_number":176,"context_line":"        r \u003d router[\u0027router\u0027]"},{"line_number":177,"context_line":"        gw_info \u003d r.pop(EXTERNAL_GW_INFO, None)"},{"line_number":178,"context_line":"        tenant_id \u003d self._get_tenant_id_for_create(context, r)"},{"line_number":179,"context_line":"        router_db \u003d self._create_router_db(context, r, tenant_id)"},{"line_number":180,"context_line":"        try:"},{"line_number":181,"context_line":"            if gw_info:"}],"source_content_type":"text/x-python","patch_set":3,"id":"fa69d971_19437014","line":178,"updated":"2016-01-06 23:31:03.000000000","message":"rather than have a separate update call, how about just populating the status of \u0027r\u0027 and have _create_router_db set the status from that?","commit_id":"c7bf62e6815378ca2c9edc4d62eda9bd0cdb0b72"},{"author":{"_account_id":7249,"name":"Ann Taraday","email":"akamyshnikova@mirantis.com","username":"AKamyshnikova"},"change_message_id":"3212c06df9a1f0702e708299f64abbccd06287a2","unresolved":false,"context_lines":[{"line_number":175,"context_line":"    def create_router(self, context, router, keep_in_build\u003dFalse):"},{"line_number":176,"context_line":"        r \u003d router[\u0027router\u0027]"},{"line_number":177,"context_line":"        gw_info \u003d r.pop(EXTERNAL_GW_INFO, None)"},{"line_number":178,"context_line":"        tenant_id \u003d self._get_tenant_id_for_create(context, r)"},{"line_number":179,"context_line":"        router_db \u003d self._create_router_db(context, r, tenant_id)"},{"line_number":180,"context_line":"        try:"},{"line_number":181,"context_line":"            if gw_info:"}],"source_content_type":"text/x-python","patch_set":3,"id":"fa69d971_4bef001e","line":178,"in_reply_to":"fa69d971_19437014","updated":"2016-01-11 17:52:00.000000000","message":"Good idea, thanks!","commit_id":"c7bf62e6815378ca2c9edc4d62eda9bd0cdb0b72"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"e7d7e46e572f7d324846abe4b3a072a07caf95c6","unresolved":false,"context_lines":[{"line_number":182,"context_line":"                               tenant_id\u003dtenant_id,"},{"line_number":183,"context_line":"                               name\u003drouter[\u0027name\u0027],"},{"line_number":184,"context_line":"                               admin_state_up\u003drouter[\u0027admin_state_up\u0027],"},{"line_number":185,"context_line":"                               status\u003drouter[\u0027status\u0027])"},{"line_number":186,"context_line":"            context.session.add(router_db)"},{"line_number":187,"context_line":"            return router_db"},{"line_number":188,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"bae84128_5b358d44","line":185,"range":{"start_line":185,"start_character":38,"end_line":185,"end_character":54},"updated":"2016-02-19 14:31:27.000000000","message":"can\u0027t this be router.get(\u0027status\u0027, l3_constants.ROUTER_STATUS_ACTIVE) and no changes in create_router() (and no changes in l3_dvr_db.py)?","commit_id":"909e317d6a6f0f8a76f59ec11618da4ce7aca7cb"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"02e828779da768557ad87059fade019326f7acd3","unresolved":false,"context_lines":[{"line_number":182,"context_line":"                               tenant_id\u003dtenant_id,"},{"line_number":183,"context_line":"                               name\u003drouter[\u0027name\u0027],"},{"line_number":184,"context_line":"                               admin_state_up\u003drouter[\u0027admin_state_up\u0027],"},{"line_number":185,"context_line":"                               status\u003drouter[\u0027status\u0027])"},{"line_number":186,"context_line":"            context.session.add(router_db)"},{"line_number":187,"context_line":"            return router_db"},{"line_number":188,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"bae84128_e2211ffd","line":185,"range":{"start_line":185,"start_character":38,"end_line":185,"end_character":54},"in_reply_to":"bae84128_5b358d44","updated":"2016-02-21 06:15:30.000000000","message":"Done","commit_id":"909e317d6a6f0f8a76f59ec11618da4ce7aca7cb"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"c831d449961c5e1d81098a8a1b47add7338be34f","unresolved":false,"context_lines":[{"line_number":95,"context_line":"        lazy\u003d\u0027dynamic\u0027)"},{"line_number":96,"context_line":"    l3_agents \u003d orm.relationship("},{"line_number":97,"context_line":"        \u0027Agent\u0027, lazy\u003d\u0027joined\u0027, viewonly\u003dTrue,"},{"line_number":98,"context_line":"        secondary\u003d\u0027routerl3agentbindings\u0027)"},{"line_number":99,"context_line":""},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"class FloatingIP(model_base.HasStandardAttributes, model_base.BASEV2,"}],"source_content_type":"text/x-python","patch_set":25,"id":"fa0719c6_22368703","line":98,"range":{"start_line":98,"start_character":18,"end_line":98,"end_character":41},"updated":"2016-03-21 17:34:54.000000000","message":"This is making the whole world (or all Neutron) crash.","commit_id":"71772dbed994cef68d33399e74e13b528886df76"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"7b6b998dfd88959c5a5da95ce92de50d9c7625a0","unresolved":false,"context_lines":[{"line_number":192,"context_line":"                 filter("},{"line_number":193,"context_line":"                     Router.id.in_(router_ids),"},{"line_number":194,"context_line":"                     Router.status !\u003d l3_constants.ROUTER_STATUS_ALLOCATING))"},{"line_number":195,"context_line":"        valid_routers \u003d set(r.id for r in query)"},{"line_number":196,"context_line":"        LOG.debug(\"Removing routers that were either concurrently \""},{"line_number":197,"context_line":"                  \"deleted or are in the ALLOCATING state: %s\","},{"line_number":198,"context_line":"                  (router_ids - valid_routers))"}],"source_content_type":"text/x-python","patch_set":28,"id":"da0c15f0_fd21a3b5","line":195,"updated":"2016-03-28 08:39:18.000000000","message":"Just to help with log noise, can you adjust the logic so that this only logs if there was something to remove?","commit_id":"33404770dd9948cf807eb4f7e6dd2d3da218605b"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"b0cf8df2a5c1aff12bc9ad9acca65c5b92eca88a","unresolved":false,"context_lines":[{"line_number":192,"context_line":"                 filter("},{"line_number":193,"context_line":"                     Router.id.in_(router_ids),"},{"line_number":194,"context_line":"                     Router.status !\u003d l3_constants.ROUTER_STATUS_ALLOCATING))"},{"line_number":195,"context_line":"        valid_routers \u003d set(r.id for r in query)"},{"line_number":196,"context_line":"        LOG.debug(\"Removing routers that were either concurrently \""},{"line_number":197,"context_line":"                  \"deleted or are in the ALLOCATING state: %s\","},{"line_number":198,"context_line":"                  (router_ids - valid_routers))"}],"source_content_type":"text/x-python","patch_set":28,"id":"da0c15f0_ec10cf03","line":195,"in_reply_to":"da0c15f0_fd21a3b5","updated":"2016-03-28 10:30:16.000000000","message":"Sure thing.","commit_id":"33404770dd9948cf807eb4f7e6dd2d3da218605b"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"2a2b51304e81a95e97555b271bb685b02bd364a1","unresolved":false,"context_lines":[{"line_number":194,"context_line":"                     Router.status !\u003d l3_constants.ROUTER_STATUS_ALLOCATING))"},{"line_number":195,"context_line":"        valid_routers \u003d set(r.id for r in query)"},{"line_number":196,"context_line":"        if router_ids - valid_routers:"},{"line_number":197,"context_line":"            LOG.debug(\"Removing routers that were either concurrently \""},{"line_number":198,"context_line":"                      \"deleted or are in the ALLOCATING state: %s\","},{"line_number":199,"context_line":"                      (router_ids - valid_routers))"},{"line_number":200,"context_line":"        return [r for r in routers if r[\u0027id\u0027] in valid_routers]"},{"line_number":201,"context_line":""},{"line_number":202,"context_line":"    def _create_router_db(self, context, router, tenant_id):"}],"source_content_type":"text/x-python","patch_set":31,"id":"ba0121b8_cc491a33","line":199,"range":{"start_line":197,"start_character":0,"end_line":199,"end_character":51},"updated":"2016-04-01 02:30:14.000000000","message":"Here has conflicts between \"were and are\". And router in concurrent deleting procedure was still in ACTIVE state, so you can\u0027t remove it.","commit_id":"53dea4afe07a4eab34f192e519d82d9f5e061771"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"83248492badae9d6bfd3d98f8679de21bb3a0533","unresolved":false,"context_lines":[{"line_number":194,"context_line":"                     Router.status !\u003d l3_constants.ROUTER_STATUS_ALLOCATING))"},{"line_number":195,"context_line":"        valid_routers \u003d set(r.id for r in query)"},{"line_number":196,"context_line":"        if router_ids - valid_routers:"},{"line_number":197,"context_line":"            LOG.debug(\"Removing routers that were either concurrently \""},{"line_number":198,"context_line":"                      \"deleted or are in the ALLOCATING state: %s\","},{"line_number":199,"context_line":"                      (router_ids - valid_routers))"},{"line_number":200,"context_line":"        return [r for r in routers if r[\u0027id\u0027] in valid_routers]"},{"line_number":201,"context_line":""},{"line_number":202,"context_line":"    def _create_router_db(self, context, router, tenant_id):"}],"source_content_type":"text/x-python","patch_set":31,"id":"9a061dce_f562a1d7","line":199,"range":{"start_line":197,"start_character":0,"end_line":199,"end_character":51},"in_reply_to":"ba0121b8_cc491a33","updated":"2016-04-04 15:10:28.000000000","message":"The conflict is intentional: either the router *was* removed sometime in the past (and now we can\u0027t see it) or it *is* there but currently ALLOCATING (and now we can\u0027t see it).\n\nI didn\u0027t understand the second part of your comment.","commit_id":"53dea4afe07a4eab34f192e519d82d9f5e061771"}],"neutron/db/l3_hamode_db.py":[{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"f622be711e4b3d26f5f01f14ab9af46efd618502","unresolved":false,"context_lines":[{"line_number":393,"context_line":""},{"line_number":394,"context_line":"        router[\u0027router\u0027][\u0027ha\u0027] \u003d is_ha"},{"line_number":395,"context_line":"        router_dict \u003d super(L3_HA_NAT_db_mixin,"},{"line_number":396,"context_line":"                            self).create_router(context, router,"},{"line_number":397,"context_line":"                                                keep_in_build\u003dTrue)"},{"line_number":398,"context_line":""},{"line_number":399,"context_line":"        if is_ha:"}],"source_content_type":"text/x-python","patch_set":3,"id":"fa69d971_b94ee438","line":396,"updated":"2016-01-06 23:31:03.000000000","message":"here you could probably get rid of the \u0027keep_in_build\u0027 flag completely if you just populate the \u0027status\u0027 field of router to be BUILD","commit_id":"c7bf62e6815378ca2c9edc4d62eda9bd0cdb0b72"},{"author":{"_account_id":7249,"name":"Ann Taraday","email":"akamyshnikova@mirantis.com","username":"AKamyshnikova"},"change_message_id":"3212c06df9a1f0702e708299f64abbccd06287a2","unresolved":false,"context_lines":[{"line_number":393,"context_line":""},{"line_number":394,"context_line":"        router[\u0027router\u0027][\u0027ha\u0027] \u003d is_ha"},{"line_number":395,"context_line":"        router_dict \u003d super(L3_HA_NAT_db_mixin,"},{"line_number":396,"context_line":"                            self).create_router(context, router,"},{"line_number":397,"context_line":"                                                keep_in_build\u003dTrue)"},{"line_number":398,"context_line":""},{"line_number":399,"context_line":"        if is_ha:"}],"source_content_type":"text/x-python","patch_set":3,"id":"fa69d971_0bcca8b9","line":396,"in_reply_to":"fa69d971_b94ee438","updated":"2016-01-11 17:52:00.000000000","message":"Done","commit_id":"c7bf62e6815378ca2c9edc4d62eda9bd0cdb0b72"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"f4834b2a4da7a34be095f43d7b16b4f7e56af84d","unresolved":false,"context_lines":[{"line_number":427,"context_line":"                with excutils.save_and_reraise_exception():"},{"line_number":428,"context_line":"                    self.delete_router(context, router_dict[\u0027id\u0027])"},{"line_number":429,"context_line":"            router_dict[\u0027ha_vr_id\u0027] \u003d router_db.extra_attributes.ha_vr_id"},{"line_number":430,"context_line":"            router_dict[\u0027ha\u0027] \u003d router_db.extra_attributes.ha"},{"line_number":431,"context_line":"            router_dict[\u0027status\u0027] \u003d self._update_router_db("},{"line_number":432,"context_line":"                context, router_dict[\u0027id\u0027],"},{"line_number":433,"context_line":"                {\u0027status\u0027: constants.ROUTER_STATUS_ACTIVE})[\u0027status\u0027]"}],"source_content_type":"text/x-python","patch_set":12,"id":"bae84128_0dae1285","line":430,"updated":"2016-02-19 23:37:41.000000000","message":"I can\u0027t figure out why you need to set router_dict[\u0027ha\u0027]. You set the value in line 405 and you commit it in line 411. What changed?","commit_id":"909e317d6a6f0f8a76f59ec11618da4ce7aca7cb"},{"author":{"_account_id":7249,"name":"Ann Taraday","email":"akamyshnikova@mirantis.com","username":"AKamyshnikova"},"change_message_id":"e4f28279ad453905ef989d14f0009fe10b8c401d","unresolved":false,"context_lines":[{"line_number":427,"context_line":"                with excutils.save_and_reraise_exception():"},{"line_number":428,"context_line":"                    self.delete_router(context, router_dict[\u0027id\u0027])"},{"line_number":429,"context_line":"            router_dict[\u0027ha_vr_id\u0027] \u003d router_db.extra_attributes.ha_vr_id"},{"line_number":430,"context_line":"            router_dict[\u0027ha\u0027] \u003d router_db.extra_attributes.ha"},{"line_number":431,"context_line":"            router_dict[\u0027status\u0027] \u003d self._update_router_db("},{"line_number":432,"context_line":"                context, router_dict[\u0027id\u0027],"},{"line_number":433,"context_line":"                {\u0027status\u0027: constants.ROUTER_STATUS_ACTIVE})[\u0027status\u0027]"}],"source_content_type":"text/x-python","patch_set":12,"id":"bae84128_5ad8bc53","line":430,"in_reply_to":"bae84128_0dae1285","updated":"2016-02-20 15:46:41.000000000","message":"yes, since 11th patch set this is not needed, as _update_router_db called after this and it changes only router_dict status.","commit_id":"909e317d6a6f0f8a76f59ec11618da4ce7aca7cb"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"02e828779da768557ad87059fade019326f7acd3","unresolved":false,"context_lines":[{"line_number":427,"context_line":"                with excutils.save_and_reraise_exception():"},{"line_number":428,"context_line":"                    self.delete_router(context, router_dict[\u0027id\u0027])"},{"line_number":429,"context_line":"            router_dict[\u0027ha_vr_id\u0027] \u003d router_db.extra_attributes.ha_vr_id"},{"line_number":430,"context_line":"            router_dict[\u0027ha\u0027] \u003d router_db.extra_attributes.ha"},{"line_number":431,"context_line":"            router_dict[\u0027status\u0027] \u003d self._update_router_db("},{"line_number":432,"context_line":"                context, router_dict[\u0027id\u0027],"},{"line_number":433,"context_line":"                {\u0027status\u0027: constants.ROUTER_STATUS_ACTIVE})[\u0027status\u0027]"}],"source_content_type":"text/x-python","patch_set":12,"id":"bae84128_e278fff4","line":430,"in_reply_to":"bae84128_5ad8bc53","updated":"2016-02-21 06:15:30.000000000","message":"Done","commit_id":"909e317d6a6f0f8a76f59ec11618da4ce7aca7cb"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"de9f127dd92528663003e3feabfeb60fc749fe0b","unresolved":false,"context_lines":[{"line_number":422,"context_line":""},{"line_number":423,"context_line":"                self._set_vr_id(context, router_db, ha_network)"},{"line_number":424,"context_line":"                self._create_ha_interfaces(context, router_db, ha_network)"},{"line_number":425,"context_line":"                self._notify_ha_interfaces_updated(context, router_db.id)"},{"line_number":426,"context_line":"            except Exception:"},{"line_number":427,"context_line":"                with excutils.save_and_reraise_exception():"},{"line_number":428,"context_line":"                    self.delete_router(context, router_dict[\u0027id\u0027])"}],"source_content_type":"text/x-python","patch_set":13,"id":"bae84128_294bea88","line":425,"updated":"2016-02-21 13:29:07.000000000","message":"Oops, I believe there\u0027s a race here between this line and the update happening in line 430.\n\nHere you send an RPC with routers_updated, which is received by the agent, then the agent sends sync_routers, which could happen before or after the update in line 430, resulting in the router replica *never* being scheduled to a specific agent.\n\nIt could explain the fullstack test failure.","commit_id":"4097599a6521e174d92c94eaa7abd594e39acd0c"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"6b994e620104952ddaa1f1a1434c4235d9b9b607","unresolved":false,"context_lines":[{"line_number":422,"context_line":""},{"line_number":423,"context_line":"                self._set_vr_id(context, router_db, ha_network)"},{"line_number":424,"context_line":"                self._create_ha_interfaces(context, router_db, ha_network)"},{"line_number":425,"context_line":"                self._notify_ha_interfaces_updated(context, router_db.id)"},{"line_number":426,"context_line":"            except Exception:"},{"line_number":427,"context_line":"                with excutils.save_and_reraise_exception():"},{"line_number":428,"context_line":"                    self.delete_router(context, router_dict[\u0027id\u0027])"}],"source_content_type":"text/x-python","patch_set":13,"id":"bae84128_442a932d","line":425,"in_reply_to":"bae84128_294bea88","updated":"2016-02-21 14:01:26.000000000","message":"Correct me if I\u0027m wrong but shouldn\u0027t [1] make sure that the agent will send sync_routers again after this function is finished, thus avoiding this race?\n\nIf so, I still agree (for explicit-reasons) that this code should handle this case logically.\n\n[1]: https://github.com/openstack/neutron/blob/952f405a2ab968963cab5d210735c7f5ca4c6ebe/neutron/db/l3_db.py#L1563","commit_id":"4097599a6521e174d92c94eaa7abd594e39acd0c"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"1fad7d9a60fd85f3ffaad467d8c97050466d7fe1","unresolved":false,"context_lines":[{"line_number":422,"context_line":""},{"line_number":423,"context_line":"                self._set_vr_id(context, router_db, ha_network)"},{"line_number":424,"context_line":"                self._create_ha_interfaces(context, router_db, ha_network)"},{"line_number":425,"context_line":"                self._notify_ha_interfaces_updated(context, router_db.id)"},{"line_number":426,"context_line":"            except Exception:"},{"line_number":427,"context_line":"                with excutils.save_and_reraise_exception():"},{"line_number":428,"context_line":"                    self.delete_router(context, router_dict[\u0027id\u0027])"}],"source_content_type":"text/x-python","patch_set":13,"id":"bae84128_84f49b87","line":425,"in_reply_to":"bae84128_294bea88","updated":"2016-02-21 14:15:43.000000000","message":"Done","commit_id":"4097599a6521e174d92c94eaa7abd594e39acd0c"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"1fad7d9a60fd85f3ffaad467d8c97050466d7fe1","unresolved":false,"context_lines":[{"line_number":422,"context_line":""},{"line_number":423,"context_line":"                self._set_vr_id(context, router_db, ha_network)"},{"line_number":424,"context_line":"                self._create_ha_interfaces(context, router_db, ha_network)"},{"line_number":425,"context_line":"                self._notify_ha_interfaces_updated(context, router_db.id)"},{"line_number":426,"context_line":"            except Exception:"},{"line_number":427,"context_line":"                with excutils.save_and_reraise_exception():"},{"line_number":428,"context_line":"                    self.delete_router(context, router_dict[\u0027id\u0027])"}],"source_content_type":"text/x-python","patch_set":13,"id":"bae84128_a440bfa6","line":425,"in_reply_to":"bae84128_442a932d","updated":"2016-02-21 14:15:43.000000000","message":"we don\u0027t call update_router though here so it might not be notified again without another update","commit_id":"4097599a6521e174d92c94eaa7abd594e39acd0c"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"f9fc9b69bfad6276b666c6fbfcadd7f2104f74ff","unresolved":false,"context_lines":[{"line_number":422,"context_line":""},{"line_number":423,"context_line":"                self._set_vr_id(context, router_db, ha_network)"},{"line_number":424,"context_line":"                self._create_ha_interfaces(context, router_db, ha_network)"},{"line_number":425,"context_line":"                self._notify_ha_interfaces_updated(context, router_db.id)"},{"line_number":426,"context_line":"            except Exception:"},{"line_number":427,"context_line":"                with excutils.save_and_reraise_exception():"},{"line_number":428,"context_line":"                    self.delete_router(context, router_dict[\u0027id\u0027])"}],"source_content_type":"text/x-python","patch_set":13,"id":"bae84128_c47d03b3","line":425,"in_reply_to":"bae84128_64b7d786","updated":"2016-02-21 14:32:29.000000000","message":"I agree - looking at the traceback it\u0027s the other way around - _update_router_db is called by update_router (which ends up sending a router_updated event), so...","commit_id":"4097599a6521e174d92c94eaa7abd594e39acd0c"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"fbfb7fd4bb5fae1992b48bd680c24ba707269ef3","unresolved":false,"context_lines":[{"line_number":422,"context_line":""},{"line_number":423,"context_line":"                self._set_vr_id(context, router_db, ha_network)"},{"line_number":424,"context_line":"                self._create_ha_interfaces(context, router_db, ha_network)"},{"line_number":425,"context_line":"                self._notify_ha_interfaces_updated(context, router_db.id)"},{"line_number":426,"context_line":"            except Exception:"},{"line_number":427,"context_line":"                with excutils.save_and_reraise_exception():"},{"line_number":428,"context_line":"                    self.delete_router(context, router_dict[\u0027id\u0027])"}],"source_content_type":"text/x-python","patch_set":13,"id":"bae84128_64b7d786","line":425,"in_reply_to":"bae84128_a440bfa6","updated":"2016-02-21 14:30:14.000000000","message":"@John, as Kevin said we call _update_router_db, not update_router.","commit_id":"4097599a6521e174d92c94eaa7abd594e39acd0c"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"4bf6808c476da955dc4e6a775ae732597ef661ee","unresolved":false,"context_lines":[{"line_number":475,"context_line":"            # provided to agents while its interfaces are being re-configured."},{"line_number":476,"context_line":"            # Keep in mind that if we want conversion to be hitless, this"},{"line_number":477,"context_line":"            # status cannot be used because agents treat hidden routers as"},{"line_number":478,"context_line":"            # deleted routers."},{"line_number":479,"context_line":"            data[\u0027status\u0027] \u003d constants.ROUTER_STATUS_ALLOCATING"},{"line_number":480,"context_line":""},{"line_number":481,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"}],"source_content_type":"text/x-python","patch_set":13,"id":"bae84128_c9b51e32","line":478,"updated":"2016-02-21 12:18:48.000000000","message":"Good point, doesn\u0027t this patch allow us to take away that admin state requirement?","commit_id":"4097599a6521e174d92c94eaa7abd594e39acd0c"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"b9256c05ebd639a6f79d49ed452c3d1e873ccb8c","unresolved":false,"context_lines":[{"line_number":474,"context_line":"            # set status to ALLOCATING so this router is no longer"},{"line_number":475,"context_line":"            # provided to agents while its interfaces are being re-configured."},{"line_number":476,"context_line":"            # Keep in mind that if we want conversion to be hitless, this"},{"line_number":477,"context_line":"            # status cannot be used because agents treat hidden routers as"},{"line_number":478,"context_line":"            # deleted routers."},{"line_number":479,"context_line":"            data[\u0027status\u0027] \u003d constants.ROUTER_STATUS_ALLOCATING"},{"line_number":480,"context_line":""},{"line_number":481,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"}],"source_content_type":"text/x-python","patch_set":13,"id":"bae84128_ceb52432","line":478,"range":{"start_line":477,"start_character":44,"end_line":478,"end_character":30},"updated":"2016-02-21 12:08:46.000000000","message":"It\u0027s worth adding to the comment here that a race condition with the l3 agent is not possible since when \u0027ha_changed \u003d\u003d True\u0027 the router is already unscheduled from all the agents (since admin_state_up \u003d\u003d False).","commit_id":"4097599a6521e174d92c94eaa7abd594e39acd0c"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"de2d9e3bd3dac69b5d18009b46368ce4f9458864","unresolved":false,"context_lines":[{"line_number":475,"context_line":"            # provided to agents while its interfaces are being re-configured."},{"line_number":476,"context_line":"            # Keep in mind that if we want conversion to be hitless, this"},{"line_number":477,"context_line":"            # status cannot be used because agents treat hidden routers as"},{"line_number":478,"context_line":"            # deleted routers."},{"line_number":479,"context_line":"            data[\u0027status\u0027] \u003d constants.ROUTER_STATUS_ALLOCATING"},{"line_number":480,"context_line":""},{"line_number":481,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"}],"source_content_type":"text/x-python","patch_set":13,"id":"bae84128_c4c0632d","line":478,"updated":"2016-02-21 14:08:32.000000000","message":"What I was trying to understand is what is the difference between a router not bound to the agent and a router that is hidden from the agent by this status? Aren\u0027t both prevented from being returned to the agent so they are effectively the same?","commit_id":"4097599a6521e174d92c94eaa7abd594e39acd0c"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"492bfd4c6062a8687779f006ce555ab57b9eb42e","unresolved":false,"context_lines":[{"line_number":475,"context_line":"            # provided to agents while its interfaces are being re-configured."},{"line_number":476,"context_line":"            # Keep in mind that if we want conversion to be hitless, this"},{"line_number":477,"context_line":"            # status cannot be used because agents treat hidden routers as"},{"line_number":478,"context_line":"            # deleted routers."},{"line_number":479,"context_line":"            data[\u0027status\u0027] \u003d constants.ROUTER_STATUS_ALLOCATING"},{"line_number":480,"context_line":""},{"line_number":481,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"}],"source_content_type":"text/x-python","patch_set":13,"id":"bae84128_a9fa5abb","line":478,"in_reply_to":"bae84128_896e7694","updated":"2016-02-21 12:38:58.000000000","message":"But we unbind the router explicitly on L500. Either it will be hidden by the ALLOCATING status or it will be hidden by the unbind, no?","commit_id":"4097599a6521e174d92c94eaa7abd594e39acd0c"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"2097c71eaf292e45709748fdeb8517f91f69a989","unresolved":false,"context_lines":[{"line_number":475,"context_line":"            # provided to agents while its interfaces are being re-configured."},{"line_number":476,"context_line":"            # Keep in mind that if we want conversion to be hitless, this"},{"line_number":477,"context_line":"            # status cannot be used because agents treat hidden routers as"},{"line_number":478,"context_line":"            # deleted routers."},{"line_number":479,"context_line":"            data[\u0027status\u0027] \u003d constants.ROUTER_STATUS_ALLOCATING"},{"line_number":480,"context_line":""},{"line_number":481,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"}],"source_content_type":"text/x-python","patch_set":13,"id":"bae84128_69de9240","line":478,"in_reply_to":"bae84128_a9fa5abb","updated":"2016-02-21 12:46:30.000000000","message":"AFAIU, yes, but in the scenario I\u0027ve specified (where runtime stops after line 482 and line 500 has not been called yet), the agent will still see the router but think it was deleted.\n\nCalling _unbind_router before changing the state to ALLOCATING should work, though.. Such a change should be independent of this patch IMO.","commit_id":"4097599a6521e174d92c94eaa7abd594e39acd0c"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"5783afd18dedb4a620158a60b4a065b7953c6347","unresolved":false,"context_lines":[{"line_number":475,"context_line":"            # provided to agents while its interfaces are being re-configured."},{"line_number":476,"context_line":"            # Keep in mind that if we want conversion to be hitless, this"},{"line_number":477,"context_line":"            # status cannot be used because agents treat hidden routers as"},{"line_number":478,"context_line":"            # deleted routers."},{"line_number":479,"context_line":"            data[\u0027status\u0027] \u003d constants.ROUTER_STATUS_ALLOCATING"},{"line_number":480,"context_line":""},{"line_number":481,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"}],"source_content_type":"text/x-python","patch_set":13,"id":"bae84128_896e7694","line":478,"in_reply_to":"bae84128_c9b51e32","updated":"2016-02-21 12:34:40.000000000","message":"While apparently removing the requirement will make converting an HA router to and back from legacy work without rescheduling of the router, consider the following case where a legacy router, \u0027router1\u0027, is changed to be an HA router:\n\n1. The agent happens to be in full sync. It receives \u0027router1\u0027 router_id from the server [1] and adds it to the queue.\n2. A user changes \u0027router1\u0027 to a HA router. Assume that the neutron-server has been changed to ALLOCATING but the rest of the code isn\u0027t executed yet.\n3. The l3 agent tries to retrieves the router\u0027s data from the server, but since the router is ALLOCATING it is not sent to the agent. The agent assumes the router was deleted and deletes the resources (namespaces, interfaces) attached to it [2].\n4. Later on, the router will realise that the router has re-appeared and will re-create the resources.\n\nIn other words, while this will not happen all the time, it will happen *some* of the time, causing the code to do some very implicit and race-conditioned magic, so I\u0027m against the removal - better make the magic explicit 100% of the time and clear in the code, than implicit 2% of the time.\n\n[1]: https://github.com/openstack/neutron/blob/952f405a2ab968963cab5d210735c7f5ca4c6ebe/neutron/agent/l3/agent.py#L551\n[2]: https://github.com/openstack/neutron/blob/952f405a2ab968963cab5d210735c7f5ca4c6ebe/neutron/agent/l3/agent.py#L483","commit_id":"4097599a6521e174d92c94eaa7abd594e39acd0c"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"af9aa2bcbe8a1fd55508e989e3b1c1142d5458ec","unresolved":false,"context_lines":[{"line_number":476,"context_line":"            # Keep in mind that if we want conversion to be hitless, this"},{"line_number":477,"context_line":"            # status cannot be used because agents treat hidden routers as"},{"line_number":478,"context_line":"            # deleted routers."},{"line_number":479,"context_line":"            data[\u0027status\u0027] \u003d constants.ROUTER_STATUS_ALLOCATING"},{"line_number":480,"context_line":""},{"line_number":481,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":482,"context_line":"            router_db \u003d super(L3_HA_NAT_db_mixin, self)._update_router_db("}],"source_content_type":"text/x-python","patch_set":23,"id":"9aed3d3a_fa58c458","line":479,"updated":"2016-02-26 09:10:04.000000000","message":"Can this produce a race condition between HA router updating and creating/deleting?\n\nWhat will happen if a new created HA router was just scheduled to l3 agent and immediately update its HA status to fasle?","commit_id":"c824493940b362da74105ebdac1ce339bc1d3b7a"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"546688e29fa32ca2b74dd758176088c5ffa4e970","unresolved":false,"context_lines":[{"line_number":476,"context_line":"            # Keep in mind that if we want conversion to be hitless, this"},{"line_number":477,"context_line":"            # status cannot be used because agents treat hidden routers as"},{"line_number":478,"context_line":"            # deleted routers."},{"line_number":479,"context_line":"            data[\u0027status\u0027] \u003d constants.ROUTER_STATUS_ALLOCATING"},{"line_number":480,"context_line":""},{"line_number":481,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":482,"context_line":"            router_db \u003d super(L3_HA_NAT_db_mixin, self)._update_router_db("}],"source_content_type":"text/x-python","patch_set":23,"id":"9aed3d3a_6d219bfb","line":479,"in_reply_to":"9aed3d3a_18f2d0d2","updated":"2016-02-26 10:39:08.000000000","message":"I misread what you wrote. I\u0027ve run the following scenario and have found no race:\n\n1. I put a pdb.set_trace() before line 500,\n2. I created an HA router and set its admin-state-up\u003dFalse,\n3. I used \u0027neutron router-update --ha\u003dFalse\u0027 to trigger the relevant code and made sure the server halted.\n4. I issued a \u0027neutron router-delete\u0027 to the delete the router.\n5. I continued the run that was paused in step #3.\n\nNo exception was raised. Somewhere along the code that ran post-line-500, a RouterNotFound (IIRC) exception was raised. This propagated back through the REST API and the client showed me a \u0027router doesn\u0027t exist\u0027 error. I\u0027m satisfied that there is no race in this case.\n\nLiu, do you have another case in mind? If not, I propose we +1 this patch. We can continue testing this code to make sure there are no races, and we can halt this patch/send a followup patch to fix a race if we find one later down the line.","commit_id":"c824493940b362da74105ebdac1ce339bc1d3b7a"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"31caad99692e4777ef521c139486a630ad41a1f2","unresolved":false,"context_lines":[{"line_number":476,"context_line":"            # Keep in mind that if we want conversion to be hitless, this"},{"line_number":477,"context_line":"            # status cannot be used because agents treat hidden routers as"},{"line_number":478,"context_line":"            # deleted routers."},{"line_number":479,"context_line":"            data[\u0027status\u0027] \u003d constants.ROUTER_STATUS_ALLOCATING"},{"line_number":480,"context_line":""},{"line_number":481,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":482,"context_line":"            router_db \u003d super(L3_HA_NAT_db_mixin, self)._update_router_db("}],"source_content_type":"text/x-python","patch_set":23,"id":"9aed3d3a_18f2d0d2","line":479,"in_reply_to":"9aed3d3a_7d7cae72","updated":"2016-02-26 09:33:41.000000000","message":"That patch(282876) is not dealing with the scenario I told here. And this patch just bring a new potential race condition.","commit_id":"c824493940b362da74105ebdac1ce339bc1d3b7a"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"cd0bab0dee1e05355e6b98de75eb206fcc14f040","unresolved":false,"context_lines":[{"line_number":476,"context_line":"            # Keep in mind that if we want conversion to be hitless, this"},{"line_number":477,"context_line":"            # status cannot be used because agents treat hidden routers as"},{"line_number":478,"context_line":"            # deleted routers."},{"line_number":479,"context_line":"            data[\u0027status\u0027] \u003d constants.ROUTER_STATUS_ALLOCATING"},{"line_number":480,"context_line":""},{"line_number":481,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":482,"context_line":"            router_db \u003d super(L3_HA_NAT_db_mixin, self)._update_router_db("}],"source_content_type":"text/x-python","patch_set":23,"id":"9aed3d3a_7d7cae72","line":479,"in_reply_to":"9aed3d3a_fa58c458","updated":"2016-02-26 09:15:37.000000000","message":"It can produce such a race, but this patch doesn\u0027t intend to fix it.\nThe patch to fix the create/delete race is https://review.openstack.org/#/c/282876/","commit_id":"c824493940b362da74105ebdac1ce339bc1d3b7a"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"b0426b54c01ef6cfc072f944a31f039e9b7e1957","unresolved":false,"context_lines":[{"line_number":476,"context_line":"            # Keep in mind that if we want conversion to be hitless, this"},{"line_number":477,"context_line":"            # status cannot be used because agents treat hidden routers as"},{"line_number":478,"context_line":"            # deleted routers."},{"line_number":479,"context_line":"            data[\u0027status\u0027] \u003d constants.ROUTER_STATUS_ALLOCATING"},{"line_number":480,"context_line":""},{"line_number":481,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":482,"context_line":"            router_db \u003d super(L3_HA_NAT_db_mixin, self)._update_router_db("}],"source_content_type":"text/x-python","patch_set":23,"id":"9aed3d3a_f0574000","line":479,"in_reply_to":"9aed3d3a_fa58c458","updated":"2016-02-26 10:46:08.000000000","message":"Please ignore this.","commit_id":"c824493940b362da74105ebdac1ce339bc1d3b7a"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"06292cdb9ebb1515ba8ab4935822baedfe069119","unresolved":false,"context_lines":[{"line_number":497,"context_line":"        # to force a proper re-scheduling to agents."},{"line_number":498,"context_line":"        # TODO(jschwarz): This will have to be more selective to get HA + DVR"},{"line_number":499,"context_line":"        # working (Only unbind from dvr_snat nodes)."},{"line_number":500,"context_line":"        self._unbind_ha_router(context, router_id)"},{"line_number":501,"context_line":""},{"line_number":502,"context_line":"        if requested_ha_state:"},{"line_number":503,"context_line":"            if not ha_network:"}],"source_content_type":"text/x-python","patch_set":23,"id":"9aed3d3a_0330899d","line":500,"updated":"2016-02-26 16:42:36.000000000","message":"@LIU, what does that matter? If it changes to False the router status will still be set back to ACTIVE down below after this update is done.","commit_id":"c824493940b362da74105ebdac1ce339bc1d3b7a"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"af9aa2bcbe8a1fd55508e989e3b1c1142d5458ec","unresolved":false,"context_lines":[{"line_number":497,"context_line":"        # to force a proper re-scheduling to agents."},{"line_number":498,"context_line":"        # TODO(jschwarz): This will have to be more selective to get HA + DVR"},{"line_number":499,"context_line":"        # working (Only unbind from dvr_snat nodes)."},{"line_number":500,"context_line":"        self._unbind_ha_router(context, router_id)"},{"line_number":501,"context_line":""},{"line_number":502,"context_line":"        if requested_ha_state:"},{"line_number":503,"context_line":"            if not ha_network:"}],"source_content_type":"text/x-python","patch_set":23,"id":"9aed3d3a_ba5e3c43","line":500,"updated":"2016-02-26 09:10:04.000000000","message":"And here, what will happen if deteting a HA router with it\u0027s HA interface and immediately update its HA status to fasle?","commit_id":"c824493940b362da74105ebdac1ce339bc1d3b7a"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"546688e29fa32ca2b74dd758176088c5ffa4e970","unresolved":false,"context_lines":[{"line_number":497,"context_line":"        # to force a proper re-scheduling to agents."},{"line_number":498,"context_line":"        # TODO(jschwarz): This will have to be more selective to get HA + DVR"},{"line_number":499,"context_line":"        # working (Only unbind from dvr_snat nodes)."},{"line_number":500,"context_line":"        self._unbind_ha_router(context, router_id)"},{"line_number":501,"context_line":""},{"line_number":502,"context_line":"        if requested_ha_state:"},{"line_number":503,"context_line":"            if not ha_network:"}],"source_content_type":"text/x-python","patch_set":23,"id":"9aed3d3a_6d04fbbf","line":500,"in_reply_to":"9aed3d3a_38799494","updated":"2016-02-26 10:39:08.000000000","message":"You are correct :)","commit_id":"c824493940b362da74105ebdac1ce339bc1d3b7a"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"cd0bab0dee1e05355e6b98de75eb206fcc14f040","unresolved":false,"context_lines":[{"line_number":497,"context_line":"        # to force a proper re-scheduling to agents."},{"line_number":498,"context_line":"        # TODO(jschwarz): This will have to be more selective to get HA + DVR"},{"line_number":499,"context_line":"        # working (Only unbind from dvr_snat nodes)."},{"line_number":500,"context_line":"        self._unbind_ha_router(context, router_id)"},{"line_number":501,"context_line":""},{"line_number":502,"context_line":"        if requested_ha_state:"},{"line_number":503,"context_line":"            if not ha_network:"}],"source_content_type":"text/x-python","patch_set":23,"id":"9aed3d3a_fdc8be76","line":500,"in_reply_to":"9aed3d3a_ba5e3c43","updated":"2016-02-26 09:15:37.000000000","message":"I\u0027m under the impression that only a single API path can run at the same time, so either the update to non-HA is done first or the deletion is done first - they can\u0027t run at the same time, so no race is possible.\n\nCan anyone confirm this is the case?","commit_id":"c824493940b362da74105ebdac1ce339bc1d3b7a"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"b0426b54c01ef6cfc072f944a31f039e9b7e1957","unresolved":false,"context_lines":[{"line_number":497,"context_line":"        # to force a proper re-scheduling to agents."},{"line_number":498,"context_line":"        # TODO(jschwarz): This will have to be more selective to get HA + DVR"},{"line_number":499,"context_line":"        # working (Only unbind from dvr_snat nodes)."},{"line_number":500,"context_line":"        self._unbind_ha_router(context, router_id)"},{"line_number":501,"context_line":""},{"line_number":502,"context_line":"        if requested_ha_state:"},{"line_number":503,"context_line":"            if not ha_network:"}],"source_content_type":"text/x-python","patch_set":23,"id":"9aed3d3a_103f44b5","line":500,"in_reply_to":"9aed3d3a_ba5e3c43","updated":"2016-02-26 10:46:08.000000000","message":"Please ignore this.","commit_id":"c824493940b362da74105ebdac1ce339bc1d3b7a"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"31caad99692e4777ef521c139486a630ad41a1f2","unresolved":false,"context_lines":[{"line_number":497,"context_line":"        # to force a proper re-scheduling to agents."},{"line_number":498,"context_line":"        # TODO(jschwarz): This will have to be more selective to get HA + DVR"},{"line_number":499,"context_line":"        # working (Only unbind from dvr_snat nodes)."},{"line_number":500,"context_line":"        self._unbind_ha_router(context, router_id)"},{"line_number":501,"context_line":""},{"line_number":502,"context_line":"        if requested_ha_state:"},{"line_number":503,"context_line":"            if not ha_network:"}],"source_content_type":"text/x-python","patch_set":23,"id":"9aed3d3a_38799494","line":500,"in_reply_to":"9aed3d3a_fdc8be76","updated":"2016-02-26 09:33:41.000000000","message":"api_worker \u003d N, when \u0027N gt 1\u0027. And for neutron server, there is no router  process Queue for the API, any API worker could do any action on a same router.","commit_id":"c824493940b362da74105ebdac1ce339bc1d3b7a"},{"author":{"_account_id":10267,"name":"venkata anil","email":"anilvenkata@redhat.com","username":"anil"},"change_message_id":"ad9c54e37d2c21b818da9d4d69f68edf5291ad7f","unresolved":false,"context_lines":[{"line_number":549,"context_line":"            ha_network \u003d self._create_ha_interfaces_and_ensure_network("},{"line_number":550,"context_line":"                context, router_db)[1]"},{"line_number":551,"context_line":"            self._set_vr_id(context, router_db, ha_network)"},{"line_number":552,"context_line":"            self._notify_ha_interfaces_updated(context, router_db.id)"},{"line_number":553,"context_line":"        else:"},{"line_number":554,"context_line":"            self._delete_ha_interfaces(context, router_db.id)"},{"line_number":555,"context_line":""}],"source_content_type":"text/x-python","patch_set":28,"id":"da0c15f0_264148aa","line":552,"updated":"2016-03-28 10:17:02.000000000","message":"As \"_notify_ha_interfaces_updated\" called again at L558, can we remove this here at L552?","commit_id":"33404770dd9948cf807eb4f7e6dd2d3da218605b"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"b0cf8df2a5c1aff12bc9ad9acca65c5b92eca88a","unresolved":false,"context_lines":[{"line_number":549,"context_line":"            ha_network \u003d self._create_ha_interfaces_and_ensure_network("},{"line_number":550,"context_line":"                context, router_db)[1]"},{"line_number":551,"context_line":"            self._set_vr_id(context, router_db, ha_network)"},{"line_number":552,"context_line":"            self._notify_ha_interfaces_updated(context, router_db.id)"},{"line_number":553,"context_line":"        else:"},{"line_number":554,"context_line":"            self._delete_ha_interfaces(context, router_db.id)"},{"line_number":555,"context_line":""}],"source_content_type":"text/x-python","patch_set":28,"id":"da0c15f0_cce18b00","line":552,"in_reply_to":"da0c15f0_264148aa","updated":"2016-03-28 10:30:16.000000000","message":"Yes. Nice catch :)","commit_id":"33404770dd9948cf807eb4f7e6dd2d3da218605b"},{"author":{"_account_id":10267,"name":"venkata anil","email":"anilvenkata@redhat.com","username":"anil"},"change_message_id":"f7c5f015eeb2869b562968eea35342a0da8bf41e","unresolved":false,"context_lines":[{"line_number":457,"context_line":"            # until we have created all of the requisite interfaces/networks"},{"line_number":458,"context_line":"            router[\u0027router\u0027][\u0027status\u0027] \u003d constants.ROUTER_STATUS_ALLOCATING"},{"line_number":459,"context_line":""},{"line_number":460,"context_line":"        router_dict \u003d super(L3_HA_NAT_db_mixin,"},{"line_number":461,"context_line":"                            self).create_router(context, router)"},{"line_number":462,"context_line":"        if is_ha:"},{"line_number":463,"context_line":"            try:"}],"source_content_type":"text/x-python","patch_set":31,"id":"9a061dce_0609042d","line":460,"updated":"2016-04-04 09:27:31.000000000","message":"Why can\u0027t we first create HA router resources and then the HA router?","commit_id":"53dea4afe07a4eab34f192e519d82d9f5e061771"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"83248492badae9d6bfd3d98f8679de21bb3a0533","unresolved":false,"context_lines":[{"line_number":457,"context_line":"            # until we have created all of the requisite interfaces/networks"},{"line_number":458,"context_line":"            router[\u0027router\u0027][\u0027status\u0027] \u003d constants.ROUTER_STATUS_ALLOCATING"},{"line_number":459,"context_line":""},{"line_number":460,"context_line":"        router_dict \u003d super(L3_HA_NAT_db_mixin,"},{"line_number":461,"context_line":"                            self).create_router(context, router)"},{"line_number":462,"context_line":"        if is_ha:"},{"line_number":463,"context_line":"            try:"}],"source_content_type":"text/x-python","patch_set":31,"id":"9a061dce_92225bb8","line":460,"in_reply_to":"9a061dce_0609042d","updated":"2016-04-04 15:10:28.000000000","message":"I\u0027m not sure, but I don\u0027t think it\u0027ll solve any races (since it will only change the timings).","commit_id":"53dea4afe07a4eab34f192e519d82d9f5e061771"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"0c1b868a30ecc9701c279787933c48db7037d2ef","unresolved":false,"context_lines":[{"line_number":474,"context_line":"                router_dict[\u0027status\u0027] \u003d self._update_router_db("},{"line_number":475,"context_line":"                    context, router_dict[\u0027id\u0027],"},{"line_number":476,"context_line":"                    {\u0027status\u0027: constants.ROUTER_STATUS_ACTIVE})[\u0027status\u0027]"},{"line_number":477,"context_line":"                self._notify_ha_interfaces_updated(context, router_db.id)"},{"line_number":478,"context_line":"            except Exception:"},{"line_number":479,"context_line":"                with excutils.save_and_reraise_exception():"},{"line_number":480,"context_line":"                    self.delete_router(context, router_dict[\u0027id\u0027])"}],"source_content_type":"text/x-python","patch_set":34,"id":"9a061dce_cfd501ba","line":477,"range":{"start_line":477,"start_character":21,"end_line":477,"end_character":50},"updated":"2016-04-05 18:45:57.000000000","message":"Instead of the change proposed here (where _notify_ha_interfaces_update always lead to schedule), lets just pass schedule_routers\u003dFalse. This will eliminate some code changes and will make the patch less complicated.","commit_id":"5e44de44c2c09b294ea4ed0602e434530e9457e1"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"ff1d7516fbd10b4087312172d4f59e3e2241c293","unresolved":false,"context_lines":[{"line_number":416,"context_line":"                                          l3_port_check\u003dFalse)"},{"line_number":417,"context_line":""},{"line_number":418,"context_line":"    def _notify_ha_interfaces_updated(self, context, router_id,"},{"line_number":419,"context_line":"                                      schedule_routers\u003dTrue):"},{"line_number":420,"context_line":"        self.l3_rpc_notifier.routers_updated("},{"line_number":421,"context_line":"            context, [router_id], shuffle_agents\u003dTrue,"},{"line_number":422,"context_line":"            schedule_routers\u003dschedule_routers)"}],"source_content_type":"text/x-python","patch_set":36,"id":"9a061dce_730c7b3b","line":419,"updated":"2016-04-06 12:00:42.000000000","message":"It looks like every call in the production code calls this method with schedule_routers \u003d False. Did you keep this parameter for tests?","commit_id":"119ece9d480f9fdd7c10bf3dd73147ba4a9f223b"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"c99445e0042d8818d546b46cf6f8530ff95cbf2c","unresolved":false,"context_lines":[{"line_number":416,"context_line":"                                          l3_port_check\u003dFalse)"},{"line_number":417,"context_line":""},{"line_number":418,"context_line":"    def _notify_ha_interfaces_updated(self, context, router_id,"},{"line_number":419,"context_line":"                                      schedule_routers\u003dTrue):"},{"line_number":420,"context_line":"        self.l3_rpc_notifier.routers_updated("},{"line_number":421,"context_line":"            context, [router_id], shuffle_agents\u003dTrue,"},{"line_number":422,"context_line":"            schedule_routers\u003dschedule_routers)"}],"source_content_type":"text/x-python","patch_set":36,"id":"9a061dce_024202ae","line":419,"in_reply_to":"9a061dce_730c7b3b","updated":"2016-04-06 14:32:33.000000000","message":"Yes. Also for consistency (schedule_routers() and co have this value True by default).","commit_id":"119ece9d480f9fdd7c10bf3dd73147ba4a9f223b"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"ff1d7516fbd10b4087312172d4f59e3e2241c293","unresolved":false,"context_lines":[{"line_number":417,"context_line":""},{"line_number":418,"context_line":"    def _notify_ha_interfaces_updated(self, context, router_id,"},{"line_number":419,"context_line":"                                      schedule_routers\u003dTrue):"},{"line_number":420,"context_line":"        self.l3_rpc_notifier.routers_updated("},{"line_number":421,"context_line":"            context, [router_id], shuffle_agents\u003dTrue,"},{"line_number":422,"context_line":"            schedule_routers\u003dschedule_routers)"},{"line_number":423,"context_line":""}],"source_content_type":"text/x-python","patch_set":36,"id":"9a061dce_9010255b","line":420,"updated":"2016-04-06 12:00:42.000000000","message":"I was surprised to learn that routers_updated (And the methods it calls) already had the schedule_routers parameter. It\u0027s actually unused right now \u003dD","commit_id":"119ece9d480f9fdd7c10bf3dd73147ba4a9f223b"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"c99445e0042d8818d546b46cf6f8530ff95cbf2c","unresolved":false,"context_lines":[{"line_number":417,"context_line":""},{"line_number":418,"context_line":"    def _notify_ha_interfaces_updated(self, context, router_id,"},{"line_number":419,"context_line":"                                      schedule_routers\u003dTrue):"},{"line_number":420,"context_line":"        self.l3_rpc_notifier.routers_updated("},{"line_number":421,"context_line":"            context, [router_id], shuffle_agents\u003dTrue,"},{"line_number":422,"context_line":"            schedule_routers\u003dschedule_routers)"},{"line_number":423,"context_line":""}],"source_content_type":"text/x-python","patch_set":36,"id":"9a061dce_022962e6","line":420,"in_reply_to":"9a061dce_9010255b","updated":"2016-04-06 14:32:33.000000000","message":"Thank God for useless parameters ;-)","commit_id":"119ece9d480f9fdd7c10bf3dd73147ba4a9f223b"},{"author":{"_account_id":7249,"name":"Ann Taraday","email":"akamyshnikova@mirantis.com","username":"AKamyshnikova"},"change_message_id":"ee32af1e6a13bbb430134b2de0eed4b509358ccf","unresolved":false,"context_lines":[{"line_number":472,"context_line":"                self._set_vr_id(context, router_db, ha_network)"},{"line_number":473,"context_line":"                router_dict[\u0027ha_vr_id\u0027] \u003d router_db.extra_attributes.ha_vr_id"},{"line_number":474,"context_line":""},{"line_number":475,"context_line":"                self.schedule_router(context, router_dict[\u0027id\u0027])"},{"line_number":476,"context_line":"                router_dict[\u0027status\u0027] \u003d self._update_router_db("},{"line_number":477,"context_line":"                    context, router_dict[\u0027id\u0027],"},{"line_number":478,"context_line":"                    {\u0027status\u0027: constants.ROUTER_STATUS_ACTIVE})[\u0027status\u0027]"}],"source_content_type":"text/x-python","patch_set":36,"id":"9a061dce_39765d06","line":475,"range":{"start_line":475,"start_character":16,"end_line":475,"end_character":64},"updated":"2016-04-06 14:04:50.000000000","message":"schedule_router perform bind_router operation and unit tests are failing because these tests run bind_router after create_router. This was not failing before because method _notify_ha_interfaces_updated is mocked https://github.com/openstack/neutron/blob/master/neutron/tests/unit/db/test_l3_hamode_db.py#L58-L60","commit_id":"119ece9d480f9fdd7c10bf3dd73147ba4a9f223b"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"c99445e0042d8818d546b46cf6f8530ff95cbf2c","unresolved":false,"context_lines":[{"line_number":472,"context_line":"                self._set_vr_id(context, router_db, ha_network)"},{"line_number":473,"context_line":"                router_dict[\u0027ha_vr_id\u0027] \u003d router_db.extra_attributes.ha_vr_id"},{"line_number":474,"context_line":""},{"line_number":475,"context_line":"                self.schedule_router(context, router_dict[\u0027id\u0027])"},{"line_number":476,"context_line":"                router_dict[\u0027status\u0027] \u003d self._update_router_db("},{"line_number":477,"context_line":"                    context, router_dict[\u0027id\u0027],"},{"line_number":478,"context_line":"                    {\u0027status\u0027: constants.ROUTER_STATUS_ACTIVE})[\u0027status\u0027]"}],"source_content_type":"text/x-python","patch_set":36,"id":"9a061dce_0257a258","line":475,"range":{"start_line":475,"start_character":16,"end_line":475,"end_character":64},"in_reply_to":"9a061dce_39765d06","updated":"2016-04-06 14:32:33.000000000","message":"This sounds about right. I\u0027ll push a new revision before I head out today.","commit_id":"119ece9d480f9fdd7c10bf3dd73147ba4a9f223b"}],"neutron/tests/unit/db/test_l3_hamode_db.py":[{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"f4834b2a4da7a34be095f43d7b16b4f7e56af84d","unresolved":false,"context_lines":[{"line_number":249,"context_line":"        router \u003d self._create_router()"},{"line_number":250,"context_line":"        _orig \u003d self.plugin._delete_ha_interfaces"},{"line_number":251,"context_line":""},{"line_number":252,"context_line":"        def check_state(context, router_id):"},{"line_number":253,"context_line":"            self.assertEqual("},{"line_number":254,"context_line":"                constants.ROUTER_STATUS_ALLOCATING,"},{"line_number":255,"context_line":"                self.plugin._get_router(context, router_id)[\u0027status\u0027])"}],"source_content_type":"text/x-python","patch_set":12,"id":"bae84128_0d829294","line":252,"updated":"2016-02-19 23:37:41.000000000","message":"Good lord this is abusing what mock is about... Good on you :)","commit_id":"909e317d6a6f0f8a76f59ec11618da4ce7aca7cb"}]}
