)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"d2c7c3c7100d92ed31fe769e4de99132681825e7","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This patch is a part of the blueprint l3-high-availability"},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"This patch initiates the blueprint by adding base classes"},{"line_number":12,"context_line":"on the plugin side."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Change-Id: I9d935cf5e0c231e8cb7af5f61b9a9fc552c3521e"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":8,"id":"AAAAUH%2F%2Bj9Y%3D","line":11,"updated":"2014-01-24 11:23:45.000000000","message":"blueprint l3-high-availability\n\nbp l3-high-availability\n\nNot sure if there is a way to get a direct link, at least any of those (at the start of the line) make a link to search from gerrit.","commit_id":"8bce8708fb9bb43fe279af0a36acc71e1d69a7fb"},{"author":{"_account_id":5572,"name":"Don Kehn","display_name":"DEKehn","email":"dekehn@gmail.com","username":"dekehn"},"change_message_id":"ffbc30091fb3cb6cbe79f443b02a47d5d915f668","unresolved":false,"context_lines":[{"line_number":10,"context_line":""},{"line_number":11,"context_line":"This patch initiates the blueprint by adding base classes"},{"line_number":12,"context_line":"on the plugin side."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Change-Id: I9d935cf5e0c231e8cb7af5f61b9a9fc552c3521e"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":9,"id":"AAAAUH%2F%2BEUY%3D","line":13,"updated":"2014-01-30 14:30:57.000000000","message":"Can you add the implements tag to bp.","commit_id":"f0b7c6053ec361e8bf2fc44b3e1398cb546ebccb"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"c8e8c26c743e7faba5647226076a368989b0f8c1","unresolved":false,"context_lines":[{"line_number":9,"context_line":"This patch is a part of the blueprint l3-high-availability"},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"This patch initiates the blueprint by adding base classes"},{"line_number":12,"context_line":"on the plugin side."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"A new admin-only ha attribute is added"},{"line_number":15,"context_line":"to the API router resource."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":59,"id":"1abeadc6_b9695327","line":12,"updated":"2014-08-19 23:49:57.000000000","message":"pico-nit:  \"This patch\" is redundant and these paragraphs (with the one below) could be combined and neatly formatted for easier reading.","commit_id":"949dca6b537be509526c05b57772d0632993d8ff"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"9adc89fe1f42f04c48b1b74795146121b835ca5e","unresolved":false,"context_lines":[{"line_number":9,"context_line":"This patch is a part of the blueprint l3-high-availability"},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"This patch initiates the blueprint by adding base classes"},{"line_number":12,"context_line":"on the plugin side."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"A new admin-only ha attribute is added"},{"line_number":15,"context_line":"to the API router resource."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":59,"id":"1abeadc6_f9ded4d8","line":12,"in_reply_to":"1abeadc6_b9695327","updated":"2014-08-24 17:56:31.000000000","message":"Done","commit_id":"949dca6b537be509526c05b57772d0632993d8ff"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"c8e8c26c743e7faba5647226076a368989b0f8c1","unresolved":false,"context_lines":[{"line_number":13,"context_line":""},{"line_number":14,"context_line":"A new admin-only ha attribute is added"},{"line_number":15,"context_line":"to the API router resource."},{"line_number":16,"context_line":"Convertion from or to HA router is possible."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"TODO:"},{"line_number":19,"context_line":" - DVR integration"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":59,"id":"1abeadc6_1962473e","line":16,"updated":"2014-08-19 23:49:57.000000000","message":"nit:  *conversion","commit_id":"949dca6b537be509526c05b57772d0632993d8ff"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"9adc89fe1f42f04c48b1b74795146121b835ca5e","unresolved":false,"context_lines":[{"line_number":13,"context_line":""},{"line_number":14,"context_line":"A new admin-only ha attribute is added"},{"line_number":15,"context_line":"to the API router resource."},{"line_number":16,"context_line":"Convertion from or to HA router is possible."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"TODO:"},{"line_number":19,"context_line":" - DVR integration"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":59,"id":"1abeadc6_19f1d06a","line":16,"in_reply_to":"1abeadc6_1962473e","updated":"2014-08-24 17:56:31.000000000","message":"Done","commit_id":"949dca6b537be509526c05b57772d0632993d8ff"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"c8e8c26c743e7faba5647226076a368989b0f8c1","unresolved":false,"context_lines":[{"line_number":16,"context_line":"Convertion from or to HA router is possible."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"TODO:"},{"line_number":19,"context_line":" - DVR integration"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"DocImpact"},{"line_number":22,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":59,"id":"1abeadc6_795fbb72","line":19,"updated":"2014-08-19 23:49:57.000000000","message":"When is this coming?  Are you planning to add this to this patch or a follow-on patch?  If the latter, remove the TODO from here and file a bug.  Maybe tag it with l3-dvr-backlog","commit_id":"949dca6b537be509526c05b57772d0632993d8ff"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"9adc89fe1f42f04c48b1b74795146121b835ca5e","unresolved":false,"context_lines":[{"line_number":16,"context_line":"Convertion from or to HA router is possible."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"TODO:"},{"line_number":19,"context_line":" - DVR integration"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"DocImpact"},{"line_number":22,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":59,"id":"1abeadc6_59e7c8ab","line":19,"in_reply_to":"1abeadc6_795fbb72","updated":"2014-08-24 17:56:31.000000000","message":"I\u0027ve given this a fair bit of thought, and with the feature freeze the next Thursday I think the correct course of action at this point is to review, iterate and merge the feature knowing that you won\u0027t be able to create a router that\u0027s both distributed and HA. I\u0027ll report all integration issues as bugs. This should both help us merge the feature, and give us more time to fix the bugs after the feature freeze and before the RCs hit.","commit_id":"949dca6b537be509526c05b57772d0632993d8ff"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"9f8252a449537a697084850a356622d727fae24a","unresolved":false,"context_lines":[{"line_number":18,"context_line":"these bindings."},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"DVR integration is not expected to work. Any issues will"},{"line_number":21,"context_line":"be reported as bugs and handled after the feature merges."},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"DocImpact"},{"line_number":24,"context_line":"Partially-implements: blueprint l3-high-availability"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":70,"id":"1abeadc6_b33ccf30","line":21,"updated":"2014-08-28 15:55:31.000000000","message":"What about conversion of routers to HA routers and vice versa? Can you provide some details here?","commit_id":"1fef6ff9362574429f15ab7da35a43c0aaa22721"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"8cec662ede168cd5991e174084a79d98b901b669","unresolved":false,"context_lines":[{"line_number":18,"context_line":"these bindings."},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"DVR integration is not expected to work. Any issues will"},{"line_number":21,"context_line":"be reported as bugs and handled after the feature merges."},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"DocImpact"},{"line_number":24,"context_line":"Partially-implements: blueprint l3-high-availability"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":70,"id":"fa98f980_7bfa6fbe","line":21,"in_reply_to":"1abeadc6_b33ccf30","updated":"2014-09-02 19:48:18.000000000","message":"I\u0027ll add something to the commit message.","commit_id":"1fef6ff9362574429f15ab7da35a43c0aaa22721"}],"etc/neutron.conf":[{"author":{"_account_id":7183,"name":"Xu Han Peng","email":"xuhanp@linux.vnet.ibm.com","username":"xuhanp"},"change_message_id":"881845dec7c852b4f25d1036e678a244e57d5b7c","unresolved":false,"context_lines":[{"line_number":244,"context_line":"# enable_l3_ha \u003d False"},{"line_number":245,"context_line":"#"},{"line_number":246,"context_line":"# CIDR of the administrative network used by the l3 if the mode HA is enabled"},{"line_number":247,"context_line":"# l3_ha_net_cidr \u003d 172.31.255.0/24"},{"line_number":248,"context_line":"# \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d end of items for l3 extension \u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":249,"context_line":""},{"line_number":250,"context_line":"# \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d WSGI parameters related to the API server \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/plain","patch_set":7,"id":"AAAAUH%2F%2ByOU%3D","line":247,"updated":"2014-01-22 06:37:41.000000000","message":"In current design, the admin network is created per tenant, what if there are more than one tenant? should this be a list of cidr? Not sure if this is a good way to manage the admin network.","commit_id":"a531b31d28b1521c2327b8bcc293ab691fcab215"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"change_message_id":"a26b688c2caddf8a11e576637263168158b965bd","unresolved":false,"context_lines":[{"line_number":244,"context_line":"# enable_l3_ha \u003d False"},{"line_number":245,"context_line":"#"},{"line_number":246,"context_line":"# CIDR of the administrative network used by the l3 if the mode HA is enabled"},{"line_number":247,"context_line":"# l3_ha_net_cidr \u003d 172.31.255.0/24"},{"line_number":248,"context_line":"# \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d end of items for l3 extension \u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":249,"context_line":""},{"line_number":250,"context_line":"# \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d WSGI parameters related to the API server \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/plain","patch_set":7,"id":"AAAAUH%2F%2BklI%3D","line":247,"in_reply_to":"AAAAUH%2F%2Bp5Q%3D","updated":"2014-01-24 09:27:17.000000000","message":"I you look at the BP, you will see that is like that\n\nexternal \u003c-- vrrp/router --\u003e tenant-private\n                    \\\n                      \\-----\u003e admin\n\nSo all routers of a same tenant will share the same admin network.","commit_id":"a531b31d28b1521c2327b8bcc293ab691fcab215"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"5642e74ab4dd11df0802c459f30f797d1bc14c08","unresolved":false,"context_lines":[{"line_number":244,"context_line":"# enable_l3_ha \u003d False"},{"line_number":245,"context_line":"#"},{"line_number":246,"context_line":"# CIDR of the administrative network used by the l3 if the mode HA is enabled"},{"line_number":247,"context_line":"# l3_ha_net_cidr \u003d 172.31.255.0/24"},{"line_number":248,"context_line":"# \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d end of items for l3 extension \u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":249,"context_line":""},{"line_number":250,"context_line":"# \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d WSGI parameters related to the API server \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/plain","patch_set":7,"id":"AAAAUH%2F%2Bp5Q%3D","line":247,"in_reply_to":"AAAAUH%2F%2Bre4%3D","updated":"2014-01-23 14:14:35.000000000","message":"I missed that part, so, we have:\n\nexternal\u003c---vrrp/router----\u003eadmin\u003c----router------\u003etenant-private  ?","commit_id":"a531b31d28b1521c2327b8bcc293ab691fcab215"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"change_message_id":"ce6671455b6b29ffa04d1abab528197c7a606b17","unresolved":false,"context_lines":[{"line_number":244,"context_line":"# enable_l3_ha \u003d False"},{"line_number":245,"context_line":"#"},{"line_number":246,"context_line":"# CIDR of the administrative network used by the l3 if the mode HA is enabled"},{"line_number":247,"context_line":"# l3_ha_net_cidr \u003d 172.31.255.0/24"},{"line_number":248,"context_line":"# \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d end of items for l3 extension \u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":249,"context_line":""},{"line_number":250,"context_line":"# \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d WSGI parameters related to the API server \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/plain","patch_set":7,"id":"AAAAUH%2F%2Bre4%3D","line":247,"in_reply_to":"AAAAUH%2F%2Bvl8%3D","updated":"2014-01-23 09:46:52.000000000","message":"The current design is one admin network (for VRRP) per tenant shared by all routers of the tenant. Since the admin network belongs to the tenant and since the tenant\u0027s networks are isolated, the CIDR will be the same for all admin networks.","commit_id":"a531b31d28b1521c2327b8bcc293ab691fcab215"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"e014ff3148c3123237a89ecb32e0344615162412","unresolved":false,"context_lines":[{"line_number":244,"context_line":"# enable_l3_ha \u003d False"},{"line_number":245,"context_line":"#"},{"line_number":246,"context_line":"# CIDR of the administrative network used by the l3 if the mode HA is enabled"},{"line_number":247,"context_line":"# l3_ha_net_cidr \u003d 172.31.255.0/24"},{"line_number":248,"context_line":"# \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d end of items for l3 extension \u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":249,"context_line":""},{"line_number":250,"context_line":"# \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d WSGI parameters related to the API server \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/plain","patch_set":7,"id":"AAAAUH%2F%2Bvl8%3D","line":247,"in_reply_to":"AAAAUH%2F%2ByOU%3D","updated":"2014-01-22 15:39:23.000000000","message":"In the physical world, VRRP traffic is often forwarded in the LAN network. In our case: If R1 and R2 are master and slave, then VRRP traffic would be forwarded through a shared tenant network. What do you guys think about that?","commit_id":"a531b31d28b1521c2327b8bcc293ab691fcab215"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"90b0b7f9e5fb06c0dcaecb2f8dacfe9def950e91","unresolved":false,"context_lines":[{"line_number":252,"context_line":"# \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d  end of items for agent scheduler extension \u003d\u003d\u003d\u003d\u003d"},{"line_number":253,"context_line":""},{"line_number":254,"context_line":"# \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d items for l3 extension \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":255,"context_line":"# Enable the High Availibility for virtual routers. A HA router scheduler have"},{"line_number":256,"context_line":"# to be used."},{"line_number":257,"context_line":"# l3_ha \u003d False"},{"line_number":258,"context_line":"#"}],"source_content_type":"text/plain","patch_set":21,"id":"AAAAUX%2F%2FFiU%3D","line":255,"updated":"2014-02-18 14:00:34.000000000","message":"nit: An HA router scheduler has to be...","commit_id":"4cff24d403df8d593ad045e8fc4048e65bb8b5f8"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"8359731cd189b1a2a35bc6b8138123314a88be01","unresolved":false,"context_lines":[{"line_number":254,"context_line":"# \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d items for l3 extension \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":255,"context_line":"# Enable the High Availibility for virtual routers. A HA router scheduler have"},{"line_number":256,"context_line":"# to be used."},{"line_number":257,"context_line":"# l3_ha \u003d False"},{"line_number":258,"context_line":"#"},{"line_number":259,"context_line":"# Maximum number of l3 agents on which a HA router will be scheduled on. If it"},{"line_number":260,"context_line":"# is set to nothing the router will scheduled on every agent."}],"source_content_type":"text/plain","patch_set":21,"id":"AAAAUX%2F%2Bu38%3D","line":257,"updated":"2014-02-19 13:54:05.000000000","message":"Can we get rid of this boolean? We could consider that HA is enabled if max_l3_agents_per_router is set and is \u003e 1","commit_id":"4cff24d403df8d593ad045e8fc4048e65bb8b5f8"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"95413a577c88d08f63d17ba5eca923c6b26b50ab","unresolved":false,"context_lines":[{"line_number":254,"context_line":"# \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d items for l3 extension \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":255,"context_line":"# Enable the High Availibility for virtual routers. A HA router scheduler have"},{"line_number":256,"context_line":"# to be used."},{"line_number":257,"context_line":"# l3_ha \u003d False"},{"line_number":258,"context_line":"#"},{"line_number":259,"context_line":"# Maximum number of l3 agents on which a HA router will be scheduled on. If it"},{"line_number":260,"context_line":"# is set to nothing the router will scheduled on every agent."}],"source_content_type":"text/plain","patch_set":21,"id":"AAAAUX%2F%2BfNI%3D","line":257,"in_reply_to":"AAAAUX%2F%2BnbQ%3D","updated":"2014-02-21 05:20:19.000000000","message":"I think we should keep this boolean.  Enabling HA routers, we enable a whole lot of other stuff (e.g. HA router scheduler, keepalived, conntrackd).  I think as a deployer, I would like to have this master switch instead of having to infer it from other settings.  My $0.02 USD :-)","commit_id":"4cff24d403df8d593ad045e8fc4048e65bb8b5f8"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"7e123f891a0a5286564ec3db2cd76f1c9993ba2b","unresolved":false,"context_lines":[{"line_number":254,"context_line":"# \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d items for l3 extension \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":255,"context_line":"# Enable the High Availibility for virtual routers. A HA router scheduler have"},{"line_number":256,"context_line":"# to be used."},{"line_number":257,"context_line":"# l3_ha \u003d False"},{"line_number":258,"context_line":"#"},{"line_number":259,"context_line":"# Maximum number of l3 agents on which a HA router will be scheduled on. If it"},{"line_number":260,"context_line":"# is set to nothing the router will scheduled on every agent."}],"source_content_type":"text/plain","patch_set":21,"id":"AAAAUX%2F%2BnbQ%3D","line":257,"in_reply_to":"AAAAUX%2F%2Bu38%3D","updated":"2014-02-20 07:15:10.000000000","message":"I\u0027m unsure if that would be clear, \"max\" is an upper limit,  if you set 3, but there are only 3 nodes available, you should not expect a warning, but... actually, it\u0027s a situation where you may want one at least:\n\nmay be it makes sense to set:\n\nmin_l3_agents_per_router\n\nand\n\nmax_l3_agents_per_router","commit_id":"4cff24d403df8d593ad045e8fc4048e65bb8b5f8"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"90b0b7f9e5fb06c0dcaecb2f8dacfe9def950e91","unresolved":false,"context_lines":[{"line_number":256,"context_line":"# to be used."},{"line_number":257,"context_line":"# l3_ha \u003d False"},{"line_number":258,"context_line":"#"},{"line_number":259,"context_line":"# Maximum number of l3 agents on which a HA router will be scheduled on. If it"},{"line_number":260,"context_line":"# is set to nothing the router will scheduled on every agent."},{"line_number":261,"context_line":"# max_l3_agents_per_router \u003d 2"},{"line_number":262,"context_line":"#"}],"source_content_type":"text/plain","patch_set":21,"id":"AAAAUX%2F%2FFh0%3D","line":259,"updated":"2014-02-18 14:00:34.000000000","message":"nit: ...agents which an HA router will be scheduled on.","commit_id":"4cff24d403df8d593ad045e8fc4048e65bb8b5f8"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"8359731cd189b1a2a35bc6b8138123314a88be01","unresolved":false,"context_lines":[{"line_number":257,"context_line":"# l3_ha \u003d False"},{"line_number":258,"context_line":"#"},{"line_number":259,"context_line":"# Maximum number of l3 agents on which a HA router will be scheduled on. If it"},{"line_number":260,"context_line":"# is set to nothing the router will scheduled on every agent."},{"line_number":261,"context_line":"# max_l3_agents_per_router \u003d 2"},{"line_number":262,"context_line":"#"},{"line_number":263,"context_line":"# CIDR of the administrative network used by the l3 if the mode HA is enabled"}],"source_content_type":"text/plain","patch_set":21,"id":"AAAAUX%2F%2BwGY%3D","line":260,"updated":"2014-02-19 13:54:05.000000000","message":"nit: maybe \"is not set\" would be a bit more clear","commit_id":"4cff24d403df8d593ad045e8fc4048e65bb8b5f8"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"90b0b7f9e5fb06c0dcaecb2f8dacfe9def950e91","unresolved":false,"context_lines":[{"line_number":257,"context_line":"# l3_ha \u003d False"},{"line_number":258,"context_line":"#"},{"line_number":259,"context_line":"# Maximum number of l3 agents on which a HA router will be scheduled on. If it"},{"line_number":260,"context_line":"# is set to nothing the router will scheduled on every agent."},{"line_number":261,"context_line":"# max_l3_agents_per_router \u003d 2"},{"line_number":262,"context_line":"#"},{"line_number":263,"context_line":"# CIDR of the administrative network used by the l3 if the mode HA is enabled"}],"source_content_type":"text/plain","patch_set":21,"id":"AAAAUX%2F%2FFhw%3D","line":260,"updated":"2014-02-18 14:00:34.000000000","message":"nit: will be","commit_id":"4cff24d403df8d593ad045e8fc4048e65bb8b5f8"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"95413a577c88d08f63d17ba5eca923c6b26b50ab","unresolved":false,"context_lines":[{"line_number":258,"context_line":"#"},{"line_number":259,"context_line":"# Maximum number of l3 agents on which a HA router will be scheduled on. If it"},{"line_number":260,"context_line":"# is set to nothing the router will scheduled on every agent."},{"line_number":261,"context_line":"# max_l3_agents_per_router \u003d 2"},{"line_number":262,"context_line":"#"},{"line_number":263,"context_line":"# CIDR of the administrative network used by the l3 if the mode HA is enabled"},{"line_number":264,"context_line":"# l3_ha_net_cidr \u003d 172.31.255.0/24"}],"source_content_type":"text/plain","patch_set":21,"id":"AAAAUX%2F%2BfMY%3D","line":261,"updated":"2014-02-21 05:20:19.000000000","message":"This example hints that the default is 2.  However, the comment says otherwise.\n\nAs a deployer, I\u0027d prefer a reasonable constant default (e.g. 2).  I\u0027ve got environments with many more network nodes and I don\u0027t want HA routers blasting out to all of them.  This defeats the purpose of deploying \u003e 1 network node for scalability because netns doesn\u0027t scale very well to high numbers of namespaces.  \n\nThis isn\u0027t a deal breaker for me.  It is configurable after all.  ;)","commit_id":"4cff24d403df8d593ad045e8fc4048e65bb8b5f8"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"95413a577c88d08f63d17ba5eca923c6b26b50ab","unresolved":false,"context_lines":[{"line_number":261,"context_line":"# max_l3_agents_per_router \u003d 2"},{"line_number":262,"context_line":"#"},{"line_number":263,"context_line":"# CIDR of the administrative network used by the l3 if the mode HA is enabled"},{"line_number":264,"context_line":"# l3_ha_net_cidr \u003d 172.31.255.0/24"},{"line_number":265,"context_line":"# \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d end of items for l3 extension \u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":266,"context_line":""},{"line_number":267,"context_line":"# \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d WSGI parameters related to the API server \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/plain","patch_set":21,"id":"AAAAUX%2F%2BeK0%3D","line":264,"updated":"2014-02-21 05:20:19.000000000","message":"Is this subnet large enough for the maximum number of HA routers for a tenant?  I imagine that each router/agent needs a port on this network.  So, if max_l3_agents_per_router is 2 then I\u0027ll need 510 ports, right?","commit_id":"4cff24d403df8d593ad045e8fc4048e65bb8b5f8"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"9f1281ce6e2d9cac4967eb25297cf4cb64d93b0c","unresolved":false,"context_lines":[{"line_number":258,"context_line":"#"},{"line_number":259,"context_line":"# Maximum number of l3 agents which an HA router will be scheduled on. If it"},{"line_number":260,"context_line":"# is not set the router will be scheduled on every agent."},{"line_number":261,"context_line":"# max_l3_agents_per_router \u003d"},{"line_number":262,"context_line":"#"},{"line_number":263,"context_line":"# Minimum number of l3 agents which an HA router will be scheduled on. If it"},{"line_number":264,"context_line":"# is not set the minimum will be 2."}],"source_content_type":"text/plain","patch_set":23,"id":"AAAAU3%2F%2Fx7M%3D","line":261,"updated":"2014-02-24 20:35:54.000000000","message":"Still not grounds for my -1 but I think having a finite default maximum would be better.  Maybe 3?  I won\u0027t bring it up again if you still disagree.  I saw now response in PS 21 so I thought I\u0027d bring it up again.","commit_id":"da704b1ab647dc96e13766dcf484cfbe14b7885f"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"82f6414ae28fef98f361d922374ccadc0951b925","unresolved":false,"context_lines":[{"line_number":258,"context_line":"#"},{"line_number":259,"context_line":"# Maximum number of l3 agents which an HA router will be scheduled on. If it"},{"line_number":260,"context_line":"# is not set the router will be scheduled on every agent."},{"line_number":261,"context_line":"# max_l3_agents_per_router \u003d"},{"line_number":262,"context_line":"#"},{"line_number":263,"context_line":"# Minimum number of l3 agents which an HA router will be scheduled on. If it"},{"line_number":264,"context_line":"# is not set the minimum will be 2."}],"source_content_type":"text/plain","patch_set":23,"id":"AAAAU3%2F%2FgZw%3D","line":261,"in_reply_to":"AAAAU3%2F%2FgnU%3D","updated":"2014-02-26 08:44:29.000000000","message":"I agree that a setting is better than a constant here (if that\u0027s the exact point).","commit_id":"da704b1ab647dc96e13766dcf484cfbe14b7885f"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"d5fc821f36b8ea2d0a011ac203a94eea892f438a","unresolved":false,"context_lines":[{"line_number":258,"context_line":"#"},{"line_number":259,"context_line":"# Maximum number of l3 agents which an HA router will be scheduled on. If it"},{"line_number":260,"context_line":"# is not set the router will be scheduled on every agent."},{"line_number":261,"context_line":"# max_l3_agents_per_router \u003d"},{"line_number":262,"context_line":"#"},{"line_number":263,"context_line":"# Minimum number of l3 agents which an HA router will be scheduled on. If it"},{"line_number":264,"context_line":"# is not set the minimum will be 2."}],"source_content_type":"text/plain","patch_set":23,"id":"AAAAU3%2F%2Fbxc%3D","line":261,"in_reply_to":"AAAAU3%2F%2FgnU%3D","updated":"2014-02-26 17:17:22.000000000","message":"To be clear, I did not give -1 for this comment.  It is configurable and so I\u0027m content.\n\nMy \"this doesn\u0027t scale\" statement was not a general statement.  It is specifically referring to creating a namespace for every router on every network node.  My statement is from experience.","commit_id":"da704b1ab647dc96e13766dcf484cfbe14b7885f"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"1311ecd3d8cdc537c6250e8864834c086b266ee4","unresolved":false,"context_lines":[{"line_number":258,"context_line":"#"},{"line_number":259,"context_line":"# Maximum number of l3 agents which an HA router will be scheduled on. If it"},{"line_number":260,"context_line":"# is not set the router will be scheduled on every agent."},{"line_number":261,"context_line":"# max_l3_agents_per_router \u003d"},{"line_number":262,"context_line":"#"},{"line_number":263,"context_line":"# Minimum number of l3 agents which an HA router will be scheduled on. If it"},{"line_number":264,"context_line":"# is not set the minimum will be 2."}],"source_content_type":"text/plain","patch_set":23,"id":"AAAAU3%2F%2FgnU%3D","line":261,"in_reply_to":"AAAAU3%2F%2FlPo%3D","updated":"2014-02-26 08:06:37.000000000","message":"I think scaling linearly is as best as we could hope for, so I disagree with the general \"This doesn\u0027t scale\" statement, but I agree with resources not being free. I feel like we might be bike shedding a bit though, as while the default is important, I am sure all deployment tools will have a very high interest in this feature anyway.","commit_id":"da704b1ab647dc96e13766dcf484cfbe14b7885f"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"848b28c9d1dbd08c23046690837ae9a042dbdf24","unresolved":false,"context_lines":[{"line_number":258,"context_line":"#"},{"line_number":259,"context_line":"# Maximum number of l3 agents which an HA router will be scheduled on. If it"},{"line_number":260,"context_line":"# is not set the router will be scheduled on every agent."},{"line_number":261,"context_line":"# max_l3_agents_per_router \u003d"},{"line_number":262,"context_line":"#"},{"line_number":263,"context_line":"# Minimum number of l3 agents which an HA router will be scheduled on. If it"},{"line_number":264,"context_line":"# is not set the minimum will be 2."}],"source_content_type":"text/plain","patch_set":23,"id":"AAAAU3%2F%2FlPo%3D","line":261,"in_reply_to":"AAAAU3%2F%2Fx0Q%3D","updated":"2014-02-25 20:20:34.000000000","message":"As the number of agents gets larger then scheduling a backup router on all of them has diminishing returns.  For example, how is having 9 backup routers much better than having 2?\n\nThe point of scaling out to more agents is to spread the routers out a bit.  Even if the backup routers are not consuming network bandwidth, network namespaces are not free.  Network interface devices (veths, bridges, etc) aren\u0027t free either.  If every router is scheduled to every agent then each agent needs a namespace and interfaces for every router.  This doesn\u0027t scale.","commit_id":"da704b1ab647dc96e13766dcf484cfbe14b7885f"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"c7edeef4e2c1e48b146ac9f66ad6745f0637e3ee","unresolved":false,"context_lines":[{"line_number":258,"context_line":"#"},{"line_number":259,"context_line":"# Maximum number of l3 agents which an HA router will be scheduled on. If it"},{"line_number":260,"context_line":"# is not set the router will be scheduled on every agent."},{"line_number":261,"context_line":"# max_l3_agents_per_router \u003d"},{"line_number":262,"context_line":"#"},{"line_number":263,"context_line":"# Minimum number of l3 agents which an HA router will be scheduled on. If it"},{"line_number":264,"context_line":"# is not set the minimum will be 2."}],"source_content_type":"text/plain","patch_set":23,"id":"AAAAU3%2F%2Fx0Q%3D","line":261,"in_reply_to":"AAAAU3%2F%2Fx7M%3D","updated":"2014-02-24 20:41:50.000000000","message":"Can you explain why setting a finite maximum and not scheduling each router on all agents is better? I see only disadvantages to doing that.","commit_id":"da704b1ab647dc96e13766dcf484cfbe14b7885f"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"9f1281ce6e2d9cac4967eb25297cf4cb64d93b0c","unresolved":false,"context_lines":[{"line_number":265,"context_line":"# min_l3_agents_per_router \u003d 2"},{"line_number":266,"context_line":"#"},{"line_number":267,"context_line":"# CIDR of the administrative network used by the l3 if the mode HA is enabled"},{"line_number":268,"context_line":"# l3_ha_net_cidr \u003d 172.31.255.0/24"},{"line_number":269,"context_line":"# \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d end of items for l3 extension \u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":270,"context_line":""},{"line_number":271,"context_line":"# \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d WSGI parameters related to the API server \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/plain","patch_set":23,"id":"AAAAU3%2F%2FyEY%3D","line":268,"updated":"2014-02-24 20:35:54.000000000","message":"Still want to know if this subnet is large enough to accommodate  the maximum number of routers.  It is shared among all routers owned by a tenant, right?","commit_id":"da704b1ab647dc96e13766dcf484cfbe14b7885f"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"447eabc6ce99bf501d3c391adddc6d96cd59b82e","unresolved":false,"context_lines":[{"line_number":265,"context_line":"# min_l3_agents_per_router \u003d 2"},{"line_number":266,"context_line":"#"},{"line_number":267,"context_line":"# CIDR of the administrative network used by the l3 if the mode HA is enabled"},{"line_number":268,"context_line":"# l3_ha_net_cidr \u003d 172.31.255.0/24"},{"line_number":269,"context_line":"# \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d end of items for l3 extension \u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":270,"context_line":""},{"line_number":271,"context_line":"# \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d WSGI parameters related to the API server \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/plain","patch_set":23,"id":"AAAAU3%2F%2FZgs%3D","line":268,"in_reply_to":"AAAAU3%2F%2Fbw8%3D","updated":"2014-02-26 21:05:17.000000000","message":"After seeing carl numbers, I have the feeling that a more conservative default setting (3) would be good. In the end, it\u0027s a configuration setting anyone can tune if it\u0027s willing to have an higher level of HA.","commit_id":"da704b1ab647dc96e13766dcf484cfbe14b7885f"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"change_message_id":"5d2d349a1b348670f32a3e32af6f7ed43ad82635","unresolved":false,"context_lines":[{"line_number":265,"context_line":"# min_l3_agents_per_router \u003d 2"},{"line_number":266,"context_line":"#"},{"line_number":267,"context_line":"# CIDR of the administrative network used by the l3 if the mode HA is enabled"},{"line_number":268,"context_line":"# l3_ha_net_cidr \u003d 172.31.255.0/24"},{"line_number":269,"context_line":"# \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d end of items for l3 extension \u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":270,"context_line":""},{"line_number":271,"context_line":"# \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d WSGI parameters related to the API server \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/plain","patch_set":23,"id":"AAAAU3%2F%2FZ38%3D","line":268,"in_reply_to":"AAAAU3%2F%2Fbw8%3D","updated":"2014-02-26 21:30:18.000000000","message":"Sorry, currently on vacation, not easy to follow with a bad connection :)\n\nThe ha_network is created per tenant, so this parameter should be set during the deployment and depends on the router quota, the number of l3 agents and the max_l3_agents_per_router. I think the default value should be the minimum to have the HA, then 2.","commit_id":"da704b1ab647dc96e13766dcf484cfbe14b7885f"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"d5fc821f36b8ea2d0a011ac203a94eea892f438a","unresolved":false,"context_lines":[{"line_number":265,"context_line":"# min_l3_agents_per_router \u003d 2"},{"line_number":266,"context_line":"#"},{"line_number":267,"context_line":"# CIDR of the administrative network used by the l3 if the mode HA is enabled"},{"line_number":268,"context_line":"# l3_ha_net_cidr \u003d 172.31.255.0/24"},{"line_number":269,"context_line":"# \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d end of items for l3 extension \u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":270,"context_line":""},{"line_number":271,"context_line":"# \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d WSGI parameters related to the API server \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/plain","patch_set":23,"id":"AAAAU3%2F%2Fbw8%3D","line":268,"in_reply_to":"AAAAU3%2F%2Fgm0%3D","updated":"2014-02-26 17:17:22.000000000","message":"To be clear, I did not give -1 for this comment either but I wanted to clarify...\n\nThe ha_network is created per tenant.  This is made very clear in the \"get_ha_network\" method in \"l3_hamode_db.py\".\n\nSay I have 12 network nodes and I want to create 25 HA routers.    Each router will have 12 router instances:  1 active and 11 backup routers.  Each of these router instances needs a port on the ha_network.  That is 300 ports.\n\nI\u0027m being a bit facetious with that example to illustrate my other point about max_l3_agents_per_router.  A more realistic example for me would be setting max_l3_agents_per_router to 3 and creating 100 HA routers.  Still 300 ports.  765 ports are needed to create the theoretical maximum of 255 routers.","commit_id":"da704b1ab647dc96e13766dcf484cfbe14b7885f"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"1311ecd3d8cdc537c6250e8864834c086b266ee4","unresolved":false,"context_lines":[{"line_number":265,"context_line":"# min_l3_agents_per_router \u003d 2"},{"line_number":266,"context_line":"#"},{"line_number":267,"context_line":"# CIDR of the administrative network used by the l3 if the mode HA is enabled"},{"line_number":268,"context_line":"# l3_ha_net_cidr \u003d 172.31.255.0/24"},{"line_number":269,"context_line":"# \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d end of items for l3 extension \u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":270,"context_line":""},{"line_number":271,"context_line":"# \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d WSGI parameters related to the API server \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/plain","patch_set":23,"id":"AAAAU3%2F%2Fgm0%3D","line":268,"in_reply_to":"AAAAU3%2F%2FyEY%3D","updated":"2014-02-26 08:06:37.000000000","message":"From what I gather the \u0027ha_network\u0027 is created per router, not per tenant, so you can have overlap, and the size of the subnet is a non-issue. You are limited by the VRRP group ID, which goes to 255, nearly the same as this subnet size.","commit_id":"da704b1ab647dc96e13766dcf484cfbe14b7885f"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"b3d5a56c0726794dfd6dc326acc5f9db882df19f","unresolved":false,"context_lines":[{"line_number":264,"context_line":"# is not set the minimum will be 2."},{"line_number":265,"context_line":"# min_l3_agents_per_router \u003d 2"},{"line_number":266,"context_line":"#"},{"line_number":267,"context_line":"# CIDR of the administrative network used by the l3 if the mode HA is enabled"},{"line_number":268,"context_line":"# l3_ha_net_cidr \u003d 172.31.255.0/24"},{"line_number":269,"context_line":"# \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d end of items for l3 extension \u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":270,"context_line":""}],"source_content_type":"text/plain","patch_set":27,"id":"AAAAVn%2F%2FYj0%3D","line":267,"updated":"2014-03-06 13:45:22.000000000","message":"I\u0027m really anxious about the default value here. If you have a running setup and you already have a tenant network using this subnet, then you enable L3 HA, all HA router scheduling will fail. I think changing to 169.254.0.0/16 will work, even if a L3 agent is installed on a compute node, as the main routing table in the default namespace will not be affected.","commit_id":"bf59c080ef53d600b19e10e9db5be4fd78bb70bc"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"change_message_id":"1bc331dccab5e5a2deb34a0fe9ef0364a528c5b3","unresolved":false,"context_lines":[{"line_number":264,"context_line":"# is not set the minimum will be 2."},{"line_number":265,"context_line":"# min_l3_agents_per_router \u003d 2"},{"line_number":266,"context_line":"#"},{"line_number":267,"context_line":"# CIDR of the administrative network used by the l3 if the mode HA is enabled"},{"line_number":268,"context_line":"# l3_ha_net_cidr \u003d 172.31.255.0/24"},{"line_number":269,"context_line":"# \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d end of items for l3 extension \u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":270,"context_line":""}],"source_content_type":"text/plain","patch_set":27,"id":"AAAAVn%2F%2FYbU%3D","line":267,"in_reply_to":"AAAAVn%2F%2FYj0%3D","updated":"2014-03-06 13:56:15.000000000","message":"I will submit a patch soon, and will change this default value.","commit_id":"bf59c080ef53d600b19e10e9db5be4fd78bb70bc"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"507fc602ea30185b68087fc28df0b6a33e002bf5","unresolved":false,"context_lines":[{"line_number":256,"context_line":"# to be used."},{"line_number":257,"context_line":"# l3_ha \u003d False"},{"line_number":258,"context_line":"#"},{"line_number":259,"context_line":"# Maximum number of l3 agents which an HA router will be scheduled on. If it"},{"line_number":260,"context_line":"# is not set the router will be scheduled on every agent."},{"line_number":261,"context_line":"# max_l3_agents_per_router \u003d 2"},{"line_number":262,"context_line":"#"}],"source_content_type":"text/plain","patch_set":36,"id":"1ae5cdf2_0105ea44","line":259,"updated":"2014-06-05 21:42:54.000000000","message":"grammar nit an/a","commit_id":"a8ef318e37de5977cc40d3d3e6ec3808d8d66200"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"507fc602ea30185b68087fc28df0b6a33e002bf5","unresolved":false,"context_lines":[{"line_number":257,"context_line":"# l3_ha \u003d False"},{"line_number":258,"context_line":"#"},{"line_number":259,"context_line":"# Maximum number of l3 agents which an HA router will be scheduled on. If it"},{"line_number":260,"context_line":"# is not set the router will be scheduled on every agent."},{"line_number":261,"context_line":"# max_l3_agents_per_router \u003d 2"},{"line_number":262,"context_line":"#"},{"line_number":263,"context_line":"# Minimum number of l3 agents which an HA router will be scheduled on. If it"}],"source_content_type":"text/plain","patch_set":36,"id":"1ae5cdf2_419292f6","line":260,"updated":"2014-06-05 21:42:54.000000000","message":"not set meaning? This is an integer is it not?","commit_id":"a8ef318e37de5977cc40d3d3e6ec3808d8d66200"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"65c728919e5c2b29be409d8df13c61054ad4ba49","unresolved":false,"context_lines":[{"line_number":257,"context_line":"# l3_ha \u003d False"},{"line_number":258,"context_line":"#"},{"line_number":259,"context_line":"# Maximum number of l3 agents which an HA router will be scheduled on. If it"},{"line_number":260,"context_line":"# is not set the router will be scheduled on every agent."},{"line_number":261,"context_line":"# max_l3_agents_per_router \u003d 2"},{"line_number":262,"context_line":"#"},{"line_number":263,"context_line":"# Minimum number of l3 agents which an HA router will be scheduled on. If it"}],"source_content_type":"text/plain","patch_set":36,"id":"1ae5cdf2_78eaca74","line":260,"in_reply_to":"1ae5cdf2_13dfeed6","updated":"2014-06-06 11:22:09.000000000","message":"ok, so imo it\u0027s clearer to say \u0027set to 0\u0027","commit_id":"a8ef318e37de5977cc40d3d3e6ec3808d8d66200"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"change_message_id":"15b0966afa02b71e815e3636eb2dc8d86bfc6fcb","unresolved":false,"context_lines":[{"line_number":257,"context_line":"# l3_ha \u003d False"},{"line_number":258,"context_line":"#"},{"line_number":259,"context_line":"# Maximum number of l3 agents which an HA router will be scheduled on. If it"},{"line_number":260,"context_line":"# is not set the router will be scheduled on every agent."},{"line_number":261,"context_line":"# max_l3_agents_per_router \u003d 2"},{"line_number":262,"context_line":"#"},{"line_number":263,"context_line":"# Minimum number of l3 agents which an HA router will be scheduled on. If it"}],"source_content_type":"text/plain","patch_set":36,"id":"1ae5cdf2_13dfeed6","line":260,"in_reply_to":"1ae5cdf2_419292f6","updated":"2014-06-06 09:40:39.000000000","message":"\"not set\" means zero, so scheduled on every agent","commit_id":"a8ef318e37de5977cc40d3d3e6ec3808d8d66200"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"change_message_id":"843922b4f08fe6e58fbe858c95e452c456f1adfc","unresolved":false,"context_lines":[{"line_number":257,"context_line":"# l3_ha \u003d False"},{"line_number":258,"context_line":"#"},{"line_number":259,"context_line":"# Maximum number of l3 agents which an HA router will be scheduled on. If it"},{"line_number":260,"context_line":"# is not set the router will be scheduled on every agent."},{"line_number":261,"context_line":"# max_l3_agents_per_router \u003d 2"},{"line_number":262,"context_line":"#"},{"line_number":263,"context_line":"# Minimum number of l3 agents which an HA router will be scheduled on. If it"}],"source_content_type":"text/plain","patch_set":36,"id":"1ae5cdf2_b61d4311","line":260,"in_reply_to":"1ae5cdf2_78eaca74","updated":"2014-06-06 12:08:34.000000000","message":"Agreed","commit_id":"a8ef318e37de5977cc40d3d3e6ec3808d8d66200"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"507fc602ea30185b68087fc28df0b6a33e002bf5","unresolved":false,"context_lines":[{"line_number":261,"context_line":"# max_l3_agents_per_router \u003d 2"},{"line_number":262,"context_line":"#"},{"line_number":263,"context_line":"# Minimum number of l3 agents which an HA router will be scheduled on. If it"},{"line_number":264,"context_line":"# is not set the minimum will be 2."},{"line_number":265,"context_line":"# min_l3_agents_per_router \u003d 2"},{"line_number":266,"context_line":"#"},{"line_number":267,"context_line":"# CIDR of the administrative network used by the l3 if the mode HA is enabled"}],"source_content_type":"text/plain","patch_set":36,"id":"1ae5cdf2_618dced2","line":264,"updated":"2014-06-05 21:42:54.000000000","message":"ditto","commit_id":"a8ef318e37de5977cc40d3d3e6ec3808d8d66200"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"05ad4c877b34bc8b35e1e4b5dfcb0a9ce4fdc8a0","unresolved":false,"context_lines":[{"line_number":180,"context_line":"# min_l3_agents_per_router \u003d 2"},{"line_number":181,"context_line":"#"},{"line_number":182,"context_line":"# CIDR of the administrative network used by the l3 if the mode HA is enabled"},{"line_number":183,"context_line":"# l3_ha_net_cidr \u003d 169.254.0.0/16"},{"line_number":184,"context_line":"# \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d end of items for l3 extension \u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":185,"context_line":""},{"line_number":186,"context_line":"# \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d WSGI parameters related to the API server \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/plain","patch_set":53,"id":"baada198_80173a53","line":183,"updated":"2014-08-04 17:12:32.000000000","message":"169,254.169,254 is used for metadata server IP address and virtual router has NAT rule for metadata. This default value may overlap with the metadata address, so I think it is better not to overlap.","commit_id":"2e3b143ef718a007b741eb44f306e0e1652093ce"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"change_message_id":"83687ab3c48379d02cba6c59b41f4355fcb21676","unresolved":false,"context_lines":[{"line_number":180,"context_line":"# min_l3_agents_per_router \u003d 2"},{"line_number":181,"context_line":"#"},{"line_number":182,"context_line":"# CIDR of the administrative network used by the l3 if the mode HA is enabled"},{"line_number":183,"context_line":"# l3_ha_net_cidr \u003d 169.254.0.0/16"},{"line_number":184,"context_line":"# \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d end of items for l3 extension \u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":185,"context_line":""},{"line_number":186,"context_line":"# \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d WSGI parameters related to the API server \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/plain","patch_set":53,"id":"baada198_27411636","line":183,"in_reply_to":"baada198_80173a53","updated":"2014-08-05 00:08:23.000000000","message":"Done","commit_id":"2e3b143ef718a007b741eb44f306e0e1652093ce"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"5475a2bc0480617f6fd5ed1079fc41c0eaba5300","unresolved":false,"context_lines":[{"line_number":168,"context_line":""},{"line_number":169,"context_line":"# \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d  end of items for agent scheduler extension \u003d\u003d\u003d\u003d\u003d"},{"line_number":170,"context_line":""},{"line_number":171,"context_line":"# \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d items for l3 extension \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":172,"context_line":"# Enable the High Availibility for virtual routers. A HA router scheduler has"},{"line_number":173,"context_line":"# to be used."},{"line_number":174,"context_line":"# l3_ha \u003d False"}],"source_content_type":"text/plain","patch_set":55,"id":"baada198_7ba29440","line":171,"updated":"2014-08-06 06:39:04.000000000","message":"With the recent changes to the scheduler patch, the comment and help text in the code have to be updated.","commit_id":"8007512015565523c977631d1423be5fdd941ba2"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"change_message_id":"58c89c55e6086fb856089ab029a64cbdd1297c1e","unresolved":false,"context_lines":[{"line_number":168,"context_line":""},{"line_number":169,"context_line":"# \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d  end of items for agent scheduler extension \u003d\u003d\u003d\u003d\u003d"},{"line_number":170,"context_line":""},{"line_number":171,"context_line":"# \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d items for l3 extension \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":172,"context_line":"# Enable the High Availibility for virtual routers. A HA router scheduler has"},{"line_number":173,"context_line":"# to be used."},{"line_number":174,"context_line":"# l3_ha \u003d False"}],"source_content_type":"text/plain","patch_set":55,"id":"baada198_6a49dcb7","line":171,"in_reply_to":"baada198_7ba29440","updated":"2014-08-06 09:04:43.000000000","message":"Yes you\u0027re right, I\u0027ll do","commit_id":"8007512015565523c977631d1423be5fdd941ba2"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"c8e8c26c743e7faba5647226076a368989b0f8c1","unresolved":false,"context_lines":[{"line_number":178,"context_line":"#"},{"line_number":179,"context_line":"# Maximum number of l3 agents which a HA router will be scheduled on. If it"},{"line_number":180,"context_line":"# is to 0 the router will be scheduled on every agent."},{"line_number":181,"context_line":"# max_l3_agents_per_router \u003d 2"},{"line_number":182,"context_line":"#"},{"line_number":183,"context_line":"# Minimum number of l3 agents which a HA router will be scheduled on. The"},{"line_number":184,"context_line":"# default value is 2."}],"source_content_type":"text/plain","patch_set":59,"id":"1abeadc6_b9d793be","line":181,"updated":"2014-08-19 23:49:57.000000000","message":"Maybe consider 3 instead of 2.  However, I do like that the default is bound.  So, please keep the default bound.","commit_id":"949dca6b537be509526c05b57772d0632993d8ff"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"9adc89fe1f42f04c48b1b74795146121b835ca5e","unresolved":false,"context_lines":[{"line_number":178,"context_line":"#"},{"line_number":179,"context_line":"# Maximum number of l3 agents which a HA router will be scheduled on. If it"},{"line_number":180,"context_line":"# is to 0 the router will be scheduled on every agent."},{"line_number":181,"context_line":"# max_l3_agents_per_router \u003d 2"},{"line_number":182,"context_line":"#"},{"line_number":183,"context_line":"# Minimum number of l3 agents which a HA router will be scheduled on. The"},{"line_number":184,"context_line":"# default value is 2."}],"source_content_type":"text/plain","patch_set":59,"id":"1abeadc6_d432bff0","line":181,"in_reply_to":"1abeadc6_b9d793be","updated":"2014-08-24 17:56:31.000000000","message":"1) There\u0027s a cost to this both on the server and on the agent side.\n\n2) There\u0027s a certain simplicity to 2... One active, one standby. It\u0027s easy to grasp for documentation purposes.\n\nOtherwise I\u0027m not really sure why we would choose 2 or 3, it\u0027s pretty arbitrary. An additional standby could help certain topologies though I\u0027m sure.","commit_id":"949dca6b537be509526c05b57772d0632993d8ff"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"f1874420672010e825ab95f4a4fab3e038992f98","unresolved":false,"context_lines":[{"line_number":178,"context_line":"#"},{"line_number":179,"context_line":"# Maximum number of l3 agents which a HA router will be scheduled on. If it"},{"line_number":180,"context_line":"# is to 0 the router will be scheduled on every agent."},{"line_number":181,"context_line":"# max_l3_agents_per_router \u003d 2"},{"line_number":182,"context_line":"#"},{"line_number":183,"context_line":"# Minimum number of l3 agents which a HA router will be scheduled on. The"},{"line_number":184,"context_line":"# default value is 2."}],"source_content_type":"text/plain","patch_set":59,"id":"1abeadc6_82b87f12","line":181,"in_reply_to":"1abeadc6_d432bff0","updated":"2014-08-27 22:14:00.000000000","message":"Fair enough.","commit_id":"949dca6b537be509526c05b57772d0632993d8ff"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"c8e8c26c743e7faba5647226076a368989b0f8c1","unresolved":false,"context_lines":[{"line_number":185,"context_line":"# min_l3_agents_per_router \u003d 2"},{"line_number":186,"context_line":"#"},{"line_number":187,"context_line":"# CIDR of the administrative network if HA mode is enabled"},{"line_number":188,"context_line":"# l3_ha_net_cidr \u003d 169.254.0.0/18"},{"line_number":189,"context_line":"# \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d end of items for l3 extension \u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":190,"context_line":""},{"line_number":191,"context_line":"# \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d WSGI parameters related to the API server \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/plain","patch_set":59,"id":"1abeadc6_de06f0cd","line":188,"updated":"2014-08-19 23:49:57.000000000","message":"Noticing that this overlaps with the pool that DVR is using to connect routers to a fip namespace on the compute nodes (169.254.30/23).  They will overlap in the router\u0027s routing table, right?","commit_id":"949dca6b537be509526c05b57772d0632993d8ff"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"9adc89fe1f42f04c48b1b74795146121b835ca5e","unresolved":false,"context_lines":[{"line_number":185,"context_line":"# min_l3_agents_per_router \u003d 2"},{"line_number":186,"context_line":"#"},{"line_number":187,"context_line":"# CIDR of the administrative network if HA mode is enabled"},{"line_number":188,"context_line":"# l3_ha_net_cidr \u003d 169.254.0.0/18"},{"line_number":189,"context_line":"# \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d end of items for l3 extension \u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":190,"context_line":""},{"line_number":191,"context_line":"# \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d WSGI parameters related to the API server \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d"}],"source_content_type":"text/plain","patch_set":59,"id":"1abeadc6_f9f5f450","line":188,"in_reply_to":"1abeadc6_de06f0cd","updated":"2014-08-24 17:56:31.000000000","message":"Correct. The current range is 169.254.0.0 to 169.254.63.255. The DVR range is 169.254.30.0 to 169.254.31.255. Akihiro mentioned in patchset 53 that virtual routers have a NAT rule for 169.254.169.254. I\u0027ll move the HA range to 169.254.192.0 - 169.254.255.255: 169.254.192.0/18.","commit_id":"949dca6b537be509526c05b57772d0632993d8ff"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"224e675d43500778c521a401c53e4f286b4af2bf","unresolved":false,"context_lines":[{"line_number":177,"context_line":"# l3_ha \u003d False"},{"line_number":178,"context_line":"#"},{"line_number":179,"context_line":"# Maximum number of l3 agents which a HA router will be scheduled on. If it"},{"line_number":180,"context_line":"# is to 0 the router will be scheduled on every agent."},{"line_number":181,"context_line":"# max_l3_agents_per_router \u003d 3"},{"line_number":182,"context_line":"#"},{"line_number":183,"context_line":"# Minimum number of l3 agents which a HA router will be scheduled on. The"}],"source_content_type":"text/plain","patch_set":70,"id":"1abeadc6_e84e606e","line":180,"updated":"2014-08-29 20:42:43.000000000","message":"is to -\u003e is set to","commit_id":"1fef6ff9362574429f15ab7da35a43c0aaa22721"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"8cec662ede168cd5991e174084a79d98b901b669","unresolved":false,"context_lines":[{"line_number":177,"context_line":"# l3_ha \u003d False"},{"line_number":178,"context_line":"#"},{"line_number":179,"context_line":"# Maximum number of l3 agents which a HA router will be scheduled on. If it"},{"line_number":180,"context_line":"# is to 0 the router will be scheduled on every agent."},{"line_number":181,"context_line":"# max_l3_agents_per_router \u003d 3"},{"line_number":182,"context_line":"#"},{"line_number":183,"context_line":"# Minimum number of l3 agents which a HA router will be scheduled on. The"}],"source_content_type":"text/plain","patch_set":70,"id":"fa98f980_fbd49f21","line":180,"in_reply_to":"1abeadc6_e84e606e","updated":"2014-09-02 19:48:18.000000000","message":"Done","commit_id":"1fef6ff9362574429f15ab7da35a43c0aaa22721"},{"author":{"_account_id":7987,"name":"Ivar Lazzaro","email":"ivarlazzaro@gmail.com","username":"Ivar"},"change_message_id":"29ae22df88662dc01aaba3f40170fbd6776121cf","unresolved":false,"context_lines":[{"line_number":182,"context_line":"#"},{"line_number":183,"context_line":"# Minimum number of l3 agents which a HA router will be scheduled on. The"},{"line_number":184,"context_line":"# default value is 2."},{"line_number":185,"context_line":"# min_l3_agents_per_router \u003d 2"},{"line_number":186,"context_line":"#"},{"line_number":187,"context_line":"# CIDR of the administrative network if HA mode is enabled"},{"line_number":188,"context_line":"# l3_ha_net_cidr \u003d 169.254.192.0/18"}],"source_content_type":"text/plain","patch_set":70,"id":"1abeadc6_7f13d1b7","line":185,"updated":"2014-08-28 20:33:17.000000000","message":"Is it possible to indicate \"all\"? If so, can you provide explanation like you did above?","commit_id":"1fef6ff9362574429f15ab7da35a43c0aaa22721"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"8cec662ede168cd5991e174084a79d98b901b669","unresolved":false,"context_lines":[{"line_number":182,"context_line":"#"},{"line_number":183,"context_line":"# Minimum number of l3 agents which a HA router will be scheduled on. The"},{"line_number":184,"context_line":"# default value is 2."},{"line_number":185,"context_line":"# min_l3_agents_per_router \u003d 2"},{"line_number":186,"context_line":"#"},{"line_number":187,"context_line":"# CIDR of the administrative network if HA mode is enabled"},{"line_number":188,"context_line":"# l3_ha_net_cidr \u003d 169.254.192.0/18"}],"source_content_type":"text/plain","patch_set":70,"id":"fa98f980_bbc9377a","line":185,"in_reply_to":"1abeadc6_7f13d1b7","updated":"2014-09-02 19:48:18.000000000","message":"Minimum is just used as an error checking mechanism - At the time of the creation of the router we check if there at least \u003cmin\u003e L3 agents up. If not, we fail the creation of the router. \u0027All\u0027 doesn\u0027t make much sense in this context.","commit_id":"1fef6ff9362574429f15ab7da35a43c0aaa22721"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"a3afeebd07d7a9d36600c3000027210b54884f29","unresolved":false,"context_lines":[{"line_number":184,"context_line":"# default value is 2."},{"line_number":185,"context_line":"# min_l3_agents_per_router \u003d 2"},{"line_number":186,"context_line":"#"},{"line_number":187,"context_line":"# CIDR of the administrative network if HA mode is enabled"},{"line_number":188,"context_line":"# l3_ha_net_cidr \u003d 169.254.192.0/18"},{"line_number":189,"context_line":"# \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d end of items for l3 extension \u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":190,"context_line":""}],"source_content_type":"text/plain","patch_set":73,"id":"fa98f980_6c334214","line":187,"updated":"2014-09-04 09:42:04.000000000","message":"Is administrative network the right term here? It\u0027s not like an admin can really do anything on this network.","commit_id":"df909b9c08b22248295400dee3c9d17c5c0a2763"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"change_message_id":"50f90b1dc2e7d1f479a67e6b9ecd3c77549a0ace","unresolved":false,"context_lines":[{"line_number":184,"context_line":"# default value is 2."},{"line_number":185,"context_line":"# min_l3_agents_per_router \u003d 2"},{"line_number":186,"context_line":"#"},{"line_number":187,"context_line":"# CIDR of the administrative network if HA mode is enabled"},{"line_number":188,"context_line":"# l3_ha_net_cidr \u003d 169.254.192.0/18"},{"line_number":189,"context_line":"# \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d end of items for l3 extension \u003d\u003d\u003d\u003d\u003d\u003d\u003d"},{"line_number":190,"context_line":""}],"source_content_type":"text/plain","patch_set":73,"id":"fa98f980_9afb3546","line":187,"in_reply_to":"fa98f980_6c334214","updated":"2014-09-04 12:14:43.000000000","message":"Currently there is no restriction for an admin to manage this network. what do you think about technical HA network ?","commit_id":"df909b9c08b22248295400dee3c9d17c5c0a2763"}],"etc/policy.json":[{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"66d89c9e5fd89e6bedd405574b061f7ddc0b56f6","unresolved":false,"context_lines":[{"line_number":62,"context_line":"    \"update_port:mac_learning_enabled\": \"rule:admin_or_network_owner\","},{"line_number":63,"context_line":"    \"delete_port\": \"rule:admin_or_owner\","},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"    \"create_router:external_gateway_info:enable_snat:ha\": \"rule:admin_only\","},{"line_number":66,"context_line":"    \"update_router:external_gateway_info:enable_snat:ha\": \"rule:admin_only\","},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"    \"create_firewall\": \"\","}],"source_content_type":"application/json","patch_set":39,"id":"baada198_fc3a93cb","line":65,"updated":"2014-07-13 17:36:53.000000000","message":"this does not sound about right. The policy changes should be along the same lines of:\n\nhttps://review.openstack.org/#/c/84223/","commit_id":"e04dff1c37390051469829495a2632b5ef4ddbb0"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"change_message_id":"f0b53dfab9e6a6236ebc25e63677f1b2c60c3d04","unresolved":false,"context_lines":[{"line_number":62,"context_line":"    \"update_port:mac_learning_enabled\": \"rule:admin_or_network_owner\","},{"line_number":63,"context_line":"    \"delete_port\": \"rule:admin_or_owner\","},{"line_number":64,"context_line":""},{"line_number":65,"context_line":"    \"create_router:external_gateway_info:enable_snat:ha\": \"rule:admin_only\","},{"line_number":66,"context_line":"    \"update_router:external_gateway_info:enable_snat:ha\": \"rule:admin_only\","},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"    \"create_firewall\": \"\","}],"source_content_type":"application/json","patch_set":39,"id":"baada198_4e25c908","line":65,"in_reply_to":"baada198_fc3a93cb","updated":"2014-07-18 18:31:34.000000000","message":"Done","commit_id":"e04dff1c37390051469829495a2632b5ef4ddbb0"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"b907b6ad553c1ea8c3a63b709a90d38b726bd4d5","unresolved":false,"context_lines":[{"line_number":67,"context_line":"    \"create_router:ha\": \"rule:admin_only\","},{"line_number":68,"context_line":"    \"update_router:external_gateway_info:enable_snat\": \"rule:admin_only\","},{"line_number":69,"context_line":"    \"update_router:distributed\": \"rule:admin_only\","},{"line_number":70,"context_line":"    \"update_router:ha\": \"rule:admin_only\","},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"    \"create_firewall\": \"\","},{"line_number":73,"context_line":"    \"get_firewall\": \"rule:admin_or_owner\","}],"source_content_type":"application/json","patch_set":41,"id":"baada198_11a46ca4","line":70,"updated":"2014-07-21 18:43:50.000000000","message":"we\u0027d want to limit the exposure of the attributes to tenants too:\n\n\"get_router:ha\": \"rule:admin_only\",","commit_id":"52096cac3a5a7ee9d71c07e2bf6afb8f0954632c"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"change_message_id":"ae048e1cd22928d28f794fe9ae5f9f7e43f56d57","unresolved":false,"context_lines":[{"line_number":67,"context_line":"    \"create_router:ha\": \"rule:admin_only\","},{"line_number":68,"context_line":"    \"update_router:external_gateway_info:enable_snat\": \"rule:admin_only\","},{"line_number":69,"context_line":"    \"update_router:distributed\": \"rule:admin_only\","},{"line_number":70,"context_line":"    \"update_router:ha\": \"rule:admin_only\","},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"    \"create_firewall\": \"\","},{"line_number":73,"context_line":"    \"get_firewall\": \"rule:admin_or_owner\","}],"source_content_type":"application/json","patch_set":41,"id":"baada198_1801c56d","line":70,"in_reply_to":"baada198_11a46ca4","updated":"2014-07-22 12:16:50.000000000","message":"Done","commit_id":"52096cac3a5a7ee9d71c07e2bf6afb8f0954632c"}],"neutron/api/rpc/agentnotifiers/l3_rpc_agent_api.py":[{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"d485e7dd2535f20921d1fb280ae09904df36ba60","unresolved":false,"context_lines":[{"line_number":105,"context_line":"                                host)"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"    def router_created(self, context, router_id, operation\u003dNone, data\u003dNone):"},{"line_number":108,"context_line":"        self._notification(context, \u0027routers_created\u0027, [router_id],"},{"line_number":109,"context_line":"                           operation, data)"},{"line_number":110,"context_line":""},{"line_number":111,"context_line":"    def router_deleted(self, context, router_id):"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAUH%2F%2ByDE%3D","line":108,"updated":"2014-01-22 17:07:59.000000000","message":"since adding the new method to the API I think the requested rpc api version for it should be incremented (1.2?)","commit_id":"a531b31d28b1521c2327b8bcc293ab691fcab215"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"change_message_id":"ce6671455b6b29ffa04d1abab528197c7a606b17","unresolved":false,"context_lines":[{"line_number":105,"context_line":"                                host)"},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"    def router_created(self, context, router_id, operation\u003dNone, data\u003dNone):"},{"line_number":108,"context_line":"        self._notification(context, \u0027routers_created\u0027, [router_id],"},{"line_number":109,"context_line":"                           operation, data)"},{"line_number":110,"context_line":""},{"line_number":111,"context_line":"    def router_deleted(self, context, router_id):"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAUH%2F%2Brew%3D","line":108,"in_reply_to":"AAAAUH%2F%2ByDE%3D","updated":"2014-01-23 09:46:52.000000000","message":"I will increment it.","commit_id":"a531b31d28b1521c2327b8bcc293ab691fcab215"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"787c22cb8eebf2ff2824fb21ec42a227414d0c85","unresolved":false,"context_lines":[{"line_number":27,"context_line":""},{"line_number":28,"context_line":"class L3AgentNotifyAPI(proxy.RpcProxy):"},{"line_number":29,"context_line":"    \"\"\"API for plugin to notify L3 agent.\"\"\""},{"line_number":30,"context_line":"    BASE_RPC_API_VERSION \u003d \u00271.1\u0027"},{"line_number":31,"context_line":"    # History"},{"line_number":32,"context_line":"    #  1.0 Initial version"},{"line_number":33,"context_line":"    #  1.1 Introduce router_created"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAUH%2F%2BaVQ%3D","line":30,"updated":"2014-01-27 08:16:24.000000000","message":"no need to bump base rpc version, just set \u0027version\u0027 parameter in the new added method - this will indicate that rpc handler (l3 agent in this case) should be of version at least not lower than requested.","commit_id":"8bce8708fb9bb43fe279af0a36acc71e1d69a7fb"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"787c22cb8eebf2ff2824fb21ec42a227414d0c85","unresolved":false,"context_lines":[{"line_number":66,"context_line":"                self.cast("},{"line_number":67,"context_line":"                    context, self.make_msg(method,"},{"line_number":68,"context_line":"                                           routers\u003d[router_id]),"},{"line_number":69,"context_line":"                    topic\u003d\u0027%s.%s\u0027 % (l3_agent.topic, l3_agent.host),"},{"line_number":70,"context_line":"                    version\u003d\u00271.1\u0027)"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":"    def _notification(self, context, method, router_ids, operation, data):"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAUH%2F%2BaU0%3D","line":69,"updated":"2014-01-27 08:16:24.000000000","message":"I think version should be the parameter of the func (same for _notification()); seems for router_created() version should be 1.2.","commit_id":"8bce8708fb9bb43fe279af0a36acc71e1d69a7fb"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"787c22cb8eebf2ff2824fb21ec42a227414d0c85","unresolved":false,"context_lines":[{"line_number":107,"context_line":"                                {\u0027admin_state_up\u0027: admin_state_up},"},{"line_number":108,"context_line":"                                host)"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"    def router_created(self, context, router_id, operation\u003dNone, data\u003dNone):"},{"line_number":111,"context_line":"        self._notification(context, \u0027routers_created\u0027, [router_id],"},{"line_number":112,"context_line":"                           operation, data)"},{"line_number":113,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAUH%2F%2BaTo%3D","line":110,"updated":"2014-01-27 08:16:24.000000000","message":"I don\u0027t see the handling for the new method added to the l3 agent in this patch, is it planned (given WIP state of the patch)?","commit_id":"8bce8708fb9bb43fe279af0a36acc71e1d69a7fb"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"change_message_id":"d0bf16440fe9a3805eb16531aaa3c178b8deb32f","unresolved":false,"context_lines":[{"line_number":107,"context_line":"                                {\u0027admin_state_up\u0027: admin_state_up},"},{"line_number":108,"context_line":"                                host)"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"    def router_created(self, context, router_id, operation\u003dNone, data\u003dNone):"},{"line_number":111,"context_line":"        self._notification(context, \u0027routers_created\u0027, [router_id],"},{"line_number":112,"context_line":"                           operation, data)"},{"line_number":113,"context_line":""}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAUH%2F%2BaOc%3D","line":110,"in_reply_to":"AAAAUH%2F%2BaTo%3D","updated":"2014-01-27 08:47:46.000000000","message":"Of course it is planned to be submitted in another patch","commit_id":"8bce8708fb9bb43fe279af0a36acc71e1d69a7fb"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"787c22cb8eebf2ff2824fb21ec42a227414d0c85","unresolved":false,"context_lines":[{"line_number":108,"context_line":"                                host)"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"    def router_created(self, context, router_id, operation\u003dNone, data\u003dNone):"},{"line_number":111,"context_line":"        self._notification(context, \u0027routers_created\u0027, [router_id],"},{"line_number":112,"context_line":"                           operation, data)"},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"    def router_deleted(self, context, router_id):"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAUH%2F%2BaUQ%3D","line":111,"updated":"2014-01-27 08:16:24.000000000","message":"why plural here?","commit_id":"8bce8708fb9bb43fe279af0a36acc71e1d69a7fb"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"change_message_id":"d0bf16440fe9a3805eb16531aaa3c178b8deb32f","unresolved":false,"context_lines":[{"line_number":108,"context_line":"                                host)"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"    def router_created(self, context, router_id, operation\u003dNone, data\u003dNone):"},{"line_number":111,"context_line":"        self._notification(context, \u0027routers_created\u0027, [router_id],"},{"line_number":112,"context_line":"                           operation, data)"},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"    def router_deleted(self, context, router_id):"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAUH%2F%2BaOU%3D","line":111,"in_reply_to":"AAAAUH%2F%2BaUQ%3D","updated":"2014-01-27 08:47:46.000000000","message":"Done","commit_id":"8bce8708fb9bb43fe279af0a36acc71e1d69a7fb"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"507f601d8415f4f94d16141c558c827108bb9523","unresolved":false,"context_lines":[{"line_number":64,"context_line":"                    context, self.make_msg(method,"},{"line_number":65,"context_line":"                                           routers\u003d[router_id]),"},{"line_number":66,"context_line":"                    topic\u003d\u0027%s.%s\u0027 % (l3_agent.topic, l3_agent.host),"},{"line_number":67,"context_line":"                    version\u003drpc_version)"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"    def _notification(self, context, method, router_ids, operation, data,"},{"line_number":70,"context_line":"                      rpc_version\u003dNone):"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAUH%2F918A%3D","line":67,"updated":"2014-02-03 12:16:36.000000000","message":"please pay attention to the rpc version - it was hardcoded as 1.1 and now you set it to 1.0 which seems not correct looking at l3 agent.","commit_id":"498c8648043329a5c7b34bf9aa3ddffb5bb1b0ca"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"22a5600121ab518d84493b688663fdfebacb7008","unresolved":false,"context_lines":[{"line_number":64,"context_line":"                    context, self.make_msg(method,"},{"line_number":65,"context_line":"                                           routers\u003d[router_id]),"},{"line_number":66,"context_line":"                    topic\u003d\u0027%s.%s\u0027 % (l3_agent.topic, l3_agent.host),"},{"line_number":67,"context_line":"                    version\u003drpc_version)"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"    def _notification(self, context, method, router_ids, operation, data,"},{"line_number":70,"context_line":"                      rpc_version\u003dNone):"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAUH%2F91rQ%3D","line":67,"in_reply_to":"AAAAUH%2F910k%3D","updated":"2014-02-03 13:16:59.000000000","message":"router_created() is new method added in this patch. Before  it was version 1.1 for all methods (and l3 agent already has 1.1 version). Now in new method the requested rpc version should be 1.2, and also the version should be incremented in l3 agent once it supports router_created().","commit_id":"498c8648043329a5c7b34bf9aa3ddffb5bb1b0ca"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"change_message_id":"47dceb867a6b5dc99c8f6e7ea88046fc06ee8c51","unresolved":false,"context_lines":[{"line_number":64,"context_line":"                    context, self.make_msg(method,"},{"line_number":65,"context_line":"                                           routers\u003d[router_id]),"},{"line_number":66,"context_line":"                    topic\u003d\u0027%s.%s\u0027 % (l3_agent.topic, l3_agent.host),"},{"line_number":67,"context_line":"                    version\u003drpc_version)"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"    def _notification(self, context, method, router_ids, operation, data,"},{"line_number":70,"context_line":"                      rpc_version\u003dNone):"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAUH%2F910k%3D","line":67,"in_reply_to":"AAAAUH%2F918A%3D","updated":"2014-02-03 12:45:37.000000000","message":"I think nothing has changed, it still set line 110, in the router_created method ?","commit_id":"498c8648043329a5c7b34bf9aa3ddffb5bb1b0ca"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"change_message_id":"170825366ddc2a3920c66f50f8cc16eaf208bc10","unresolved":false,"context_lines":[{"line_number":64,"context_line":"                    context, self.make_msg(method,"},{"line_number":65,"context_line":"                                           routers\u003d[router_id]),"},{"line_number":66,"context_line":"                    topic\u003d\u0027%s.%s\u0027 % (l3_agent.topic, l3_agent.host),"},{"line_number":67,"context_line":"                    version\u003drpc_version)"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"    def _notification(self, context, method, router_ids, operation, data,"},{"line_number":70,"context_line":"                      rpc_version\u003dNone):"}],"source_content_type":"text/x-python","patch_set":11,"id":"AAAAUH%2F91nk%3D","line":67,"in_reply_to":"AAAAUH%2F91rQ%3D","updated":"2014-02-03 15:50:02.000000000","message":"ok, I got it now, thx","commit_id":"498c8648043329a5c7b34bf9aa3ddffb5bb1b0ca"}],"neutron/api/rpc/handlers/l3_hamode_rpc.py":[{"author":{"_account_id":6697,"name":"Sandhya Dasu","email":"sandhya.openinfra@gmail.com","username":"sadasu"},"change_message_id":"5c32dddba18ce2996cdf8cfe3ed41c59ca169dba","unresolved":false,"context_lines":[{"line_number":27,"context_line":"        l3plugin \u003d manager.NeutronManager.get_service_plugins()["},{"line_number":28,"context_line":"            plugin_constants.L3_ROUTER_NAT]"},{"line_number":29,"context_line":"        if not l3plugin:"},{"line_number":30,"context_line":"            LOG.error(_(\u0027No plugin for L3 routing registered!\u0027))"},{"line_number":31,"context_line":"            return"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"        router_id \u003d kwargs.get(\u0027router_id\u0027)"}],"source_content_type":"text/x-python","patch_set":55,"id":"baada198_9043b310","line":30,"updated":"2014-08-06 15:09:05.000000000","message":"Would a LOG.warn suffice here?","commit_id":"8007512015565523c977631d1423be5fdd941ba2"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"1e87ba9af821e65fcb6247380677105eb4c4f842","unresolved":false,"context_lines":[{"line_number":14,"context_line":"# License for the specific language governing permissions and limitations"},{"line_number":15,"context_line":"# under the License."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"from neutron import manager"},{"line_number":18,"context_line":"from neutron.openstack.common import log as logging"},{"line_number":19,"context_line":"from neutron.plugins.common import constants as plugin_constants"},{"line_number":20,"context_line":""}],"source_content_type":"text/x-python","patch_set":59,"id":"1abeadc6_668db331","line":17,"updated":"2014-08-18 06:27:39.000000000","message":"from neutron.openstack.common.gettextutils import _LW","commit_id":"949dca6b537be509526c05b57772d0632993d8ff"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"9adc89fe1f42f04c48b1b74795146121b835ca5e","unresolved":false,"context_lines":[{"line_number":14,"context_line":"# License for the specific language governing permissions and limitations"},{"line_number":15,"context_line":"# under the License."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"from neutron import manager"},{"line_number":18,"context_line":"from neutron.openstack.common import log as logging"},{"line_number":19,"context_line":"from neutron.plugins.common import constants as plugin_constants"},{"line_number":20,"context_line":""}],"source_content_type":"text/x-python","patch_set":59,"id":"1abeadc6_546dcfca","line":17,"in_reply_to":"1abeadc6_668db331","updated":"2014-08-24 17:56:31.000000000","message":"Done","commit_id":"949dca6b537be509526c05b57772d0632993d8ff"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"1e87ba9af821e65fcb6247380677105eb4c4f842","unresolved":false,"context_lines":[{"line_number":27,"context_line":"        l3plugin \u003d manager.NeutronManager.get_service_plugins()["},{"line_number":28,"context_line":"            plugin_constants.L3_ROUTER_NAT]"},{"line_number":29,"context_line":"        if not l3plugin:"},{"line_number":30,"context_line":"            LOG.warn(_(\u0027No plugin for L3 routing registered!\u0027))"},{"line_number":31,"context_line":"            return"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"        router_id \u003d kwargs.get(\u0027router_id\u0027)"}],"source_content_type":"text/x-python","patch_set":59,"id":"1abeadc6_269c9b69","line":30,"updated":"2014-08-18 06:27:39.000000000","message":"_LW instead of _","commit_id":"949dca6b537be509526c05b57772d0632993d8ff"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"9adc89fe1f42f04c48b1b74795146121b835ca5e","unresolved":false,"context_lines":[{"line_number":27,"context_line":"        l3plugin \u003d manager.NeutronManager.get_service_plugins()["},{"line_number":28,"context_line":"            plugin_constants.L3_ROUTER_NAT]"},{"line_number":29,"context_line":"        if not l3plugin:"},{"line_number":30,"context_line":"            LOG.warn(_(\u0027No plugin for L3 routing registered!\u0027))"},{"line_number":31,"context_line":"            return"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"        router_id \u003d kwargs.get(\u0027router_id\u0027)"}],"source_content_type":"text/x-python","patch_set":59,"id":"1abeadc6_74700ba4","line":30,"in_reply_to":"1abeadc6_269c9b69","updated":"2014-08-24 17:56:31.000000000","message":"Done","commit_id":"949dca6b537be509526c05b57772d0632993d8ff"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"c8e8c26c743e7faba5647226076a368989b0f8c1","unresolved":false,"context_lines":[{"line_number":27,"context_line":"        l3plugin \u003d manager.NeutronManager.get_service_plugins()["},{"line_number":28,"context_line":"            plugin_constants.L3_ROUTER_NAT]"},{"line_number":29,"context_line":"        if not l3plugin:"},{"line_number":30,"context_line":"            LOG.warn(_(\u0027No plugin for L3 routing registered!\u0027))"},{"line_number":31,"context_line":"            return"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"        router_id \u003d kwargs.get(\u0027router_id\u0027)"}],"source_content_type":"text/x-python","patch_set":59,"id":"1abeadc6_59467f7d","line":30,"in_reply_to":"1abeadc6_269c9b69","updated":"2014-08-19 23:49:57.000000000","message":"Is this more than a warning?","commit_id":"949dca6b537be509526c05b57772d0632993d8ff"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"9adc89fe1f42f04c48b1b74795146121b835ca5e","unresolved":false,"context_lines":[{"line_number":27,"context_line":"        l3plugin \u003d manager.NeutronManager.get_service_plugins()["},{"line_number":28,"context_line":"            plugin_constants.L3_ROUTER_NAT]"},{"line_number":29,"context_line":"        if not l3plugin:"},{"line_number":30,"context_line":"            LOG.warn(_(\u0027No plugin for L3 routing registered!\u0027))"},{"line_number":31,"context_line":"            return"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"        router_id \u003d kwargs.get(\u0027router_id\u0027)"}],"source_content_type":"text/x-python","patch_set":59,"id":"1abeadc6_f4441b48","line":30,"in_reply_to":"1abeadc6_59467f7d","updated":"2014-08-24 17:56:31.000000000","message":"It indicates a misconfiguration, you\u0027re right. I\u0027ll change it to error.","commit_id":"949dca6b537be509526c05b57772d0632993d8ff"}],"neutron/api/rpc/handlers/l3_rpc.py":[{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"14ae4ad34cd195bc111dfccef95e1d37f2064714","unresolved":false,"context_lines":[{"line_number":233,"context_line":""},{"line_number":234,"context_line":"    def update_router_state(self, context, **kwargs):"},{"line_number":235,"context_line":"        l3plugin \u003d manager.NeutronManager.get_service_plugins()["},{"line_number":236,"context_line":"            plugin_constants.L3_ROUTER_NAT]"},{"line_number":237,"context_line":"        if not l3plugin:"},{"line_number":238,"context_line":"            LOG.error(_LE(\u0027No plugin for L3 routing registered!\u0027))"},{"line_number":239,"context_line":"            return"}],"source_content_type":"text/x-python","patch_set":70,"id":"1abeadc6_c647cb4a","line":236,"updated":"2014-08-28 20:32:06.000000000","message":"You no longer need to call get_service_plugins now. We have \"self.l3plugin\" above. It is the way dvr_rpc.py does.\n\n  if not self.l3plugin:","commit_id":"1fef6ff9362574429f15ab7da35a43c0aaa22721"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"8cec662ede168cd5991e174084a79d98b901b669","unresolved":false,"context_lines":[{"line_number":233,"context_line":""},{"line_number":234,"context_line":"    def update_router_state(self, context, **kwargs):"},{"line_number":235,"context_line":"        l3plugin \u003d manager.NeutronManager.get_service_plugins()["},{"line_number":236,"context_line":"            plugin_constants.L3_ROUTER_NAT]"},{"line_number":237,"context_line":"        if not l3plugin:"},{"line_number":238,"context_line":"            LOG.error(_LE(\u0027No plugin for L3 routing registered!\u0027))"},{"line_number":239,"context_line":"            return"}],"source_content_type":"text/x-python","patch_set":70,"id":"fa98f980_fba2dfac","line":236,"in_reply_to":"1abeadc6_c647cb4a","updated":"2014-09-02 19:48:18.000000000","message":"Correct, I didn\u0027t pay enough attention when I rebased this. Akihiro, should this method be in this class or a separate RPC callback class?","commit_id":"1fef6ff9362574429f15ab7da35a43c0aaa22721"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"a3afeebd07d7a9d36600c3000027210b54884f29","unresolved":false,"context_lines":[{"line_number":230,"context_line":"                  \u0027host\u0027: host})"},{"line_number":231,"context_line":"        return snat_port_list"},{"line_number":232,"context_line":""},{"line_number":233,"context_line":"    def update_router_state(self, context, **kwargs):"},{"line_number":234,"context_line":"        router_id \u003d kwargs.get(\u0027router_id\u0027)"},{"line_number":235,"context_line":"        state \u003d kwargs.get(\u0027state\u0027)"},{"line_number":236,"context_line":"        host \u003d kwargs.get(\u0027host\u0027)"}],"source_content_type":"text/x-python","patch_set":73,"id":"fa98f980_2c569a2a","line":233,"updated":"2014-09-04 09:42:04.000000000","message":"The use of kwargs here isn\u0027t necessary since it\u0027s not passed on.\n\ndef update_router_state(self, context, router_id\u003dNone,\n                        state\u003dNone, host\u003dNone):","commit_id":"df909b9c08b22248295400dee3c9d17c5c0a2763"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"change_message_id":"50f90b1dc2e7d1f479a67e6b9ecd3c77549a0ace","unresolved":false,"context_lines":[{"line_number":230,"context_line":"                  \u0027host\u0027: host})"},{"line_number":231,"context_line":"        return snat_port_list"},{"line_number":232,"context_line":""},{"line_number":233,"context_line":"    def update_router_state(self, context, **kwargs):"},{"line_number":234,"context_line":"        router_id \u003d kwargs.get(\u0027router_id\u0027)"},{"line_number":235,"context_line":"        state \u003d kwargs.get(\u0027state\u0027)"},{"line_number":236,"context_line":"        host \u003d kwargs.get(\u0027host\u0027)"}],"source_content_type":"text/x-python","patch_set":73,"id":"fa98f980_3da883da","line":233,"in_reply_to":"fa98f980_2c569a2a","updated":"2014-09-04 12:14:43.000000000","message":"args are depending of the rpc version, so could evolve, I think that\u0027s why all rpc method here are implemented like this one ?","commit_id":"df909b9c08b22248295400dee3c9d17c5c0a2763"}],"neutron/common/constants.py":[{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"507fc602ea30185b68087fc28df0b6a33e002bf5","unresolved":false,"context_lines":[{"line_number":96,"context_line":"L3_AGENT_SCHEDULER_EXT_ALIAS \u003d \u0027l3_agent_scheduler\u0027"},{"line_number":97,"context_line":"DHCP_AGENT_SCHEDULER_EXT_ALIAS \u003d \u0027dhcp_agent_scheduler\u0027"},{"line_number":98,"context_line":"LBAAS_AGENT_SCHEDULER_EXT_ALIAS \u003d \u0027lbaas_agent_scheduler\u0027"},{"line_number":99,"context_line":"L3_HA_MODE_EXT_ALIAS \u003d \u0027l3-ext-ha-mode\u0027"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"# Protocol names and numbers for Security Groups/Firewalls"},{"line_number":102,"context_line":"PROTO_NAME_TCP \u003d \u0027tcp\u0027"}],"source_content_type":"text/x-python","patch_set":36,"id":"1ae5cdf2_61a4ee4a","line":99,"updated":"2014-06-05 21:42:54.000000000","message":"Minor suggestion: not sure this needs to be so complicated, l3-ha sounds more than enough and it\u0027s easier to remember.","commit_id":"a8ef318e37de5977cc40d3d3e6ec3808d8d66200"}],"neutron/db/l3_agentschedulers_db.py":[{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"82f6414ae28fef98f361d922374ccadc0951b925","unresolved":false,"context_lines":[{"line_number":144,"context_line":"        router_ids \u003d [item[0] for item in query]"},{"line_number":145,"context_line":"        if router_ids:"},{"line_number":146,"context_line":"            return self.get_sync_data(context, router_ids\u003drouter_ids,"},{"line_number":147,"context_line":"                                      active\u003dTrue, host\u003dhost)"},{"line_number":148,"context_line":"        else:"},{"line_number":149,"context_line":"            return []"},{"line_number":150,"context_line":""}],"source_content_type":"text/x-python","patch_set":23,"id":"AAAAU3%2F%2FgXE%3D","line":147,"updated":"2014-02-26 08:44:29.000000000","message":"Why do we need to set host here?, doesn\u0027t it affect other implementations relying on list_active_sync_routers_on_active_l3_agent ?","commit_id":"da704b1ab647dc96e13766dcf484cfbe14b7885f"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"change_message_id":"5d2d349a1b348670f32a3e32af6f7ed43ad82635","unresolved":false,"context_lines":[{"line_number":144,"context_line":"        router_ids \u003d [item[0] for item in query]"},{"line_number":145,"context_line":"        if router_ids:"},{"line_number":146,"context_line":"            return self.get_sync_data(context, router_ids\u003drouter_ids,"},{"line_number":147,"context_line":"                                      active\u003dTrue, host\u003dhost)"},{"line_number":148,"context_line":"        else:"},{"line_number":149,"context_line":"            return []"},{"line_number":150,"context_line":""}],"source_content_type":"text/x-python","patch_set":23,"id":"AAAAU3%2F%2FZzA%3D","line":147,"in_reply_to":"AAAAU3%2F%2FgXE%3D","updated":"2014-02-26 21:30:18.000000000","message":"This method is called by the sync_routers rpc call, since the many l3 agents will host the same router but will not use the same port we need to know which agent requesting in order to reply with the right port according to the L3HARouterAgentPortBinding. I will filter by the extension.","commit_id":"da704b1ab647dc96e13766dcf484cfbe14b7885f"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"b3d5a56c0726794dfd6dc326acc5f9db882df19f","unresolved":false,"context_lines":[{"line_number":143,"context_line":"            query \u003d query.filter("},{"line_number":144,"context_line":"                RouterL3AgentBinding.router_id.in_(router_ids))"},{"line_number":145,"context_line":"        router_ids \u003d [item[0] for item in query]"},{"line_number":146,"context_line":"        if router_ids:"},{"line_number":147,"context_line":"            if utils.is_extension_supported(self,"},{"line_number":148,"context_line":"                                            constants.L3_HA_MODE_EXT_ALIAS):"},{"line_number":149,"context_line":"                return self.get_sync_data(context, router_ids\u003drouter_ids,"}],"source_content_type":"text/x-python","patch_set":27,"id":"AAAAVn%2F%2FYhE%3D","line":146,"updated":"2014-03-06 13:45:22.000000000","message":"How about:\n\nha_mode \u003d utils.is_extension_supported(self, constants.L3_HA_MODE_EXT_ALIAS)\n\nreturn self.get_sync_data(context, router_ids\u003drouter_ids, active\u003dTrue, host\u003dhost if ha_mode else None)\n\nSave a tad of code duplication.","commit_id":"bf59c080ef53d600b19e10e9db5be4fd78bb70bc"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"f6ace64e3204d6290b3de69adc5fb20f4f387456","unresolved":false,"context_lines":[{"line_number":173,"context_line":"        if router_ids:"},{"line_number":174,"context_line":"            if utils.is_extension_supported(self,"},{"line_number":175,"context_line":"                                            constants.L3_HA_MODE_EXT_ALIAS):"},{"line_number":176,"context_line":"                return self.get_sync_data(context, host, router_ids\u003drouter_ids,"},{"line_number":177,"context_line":"                                          active\u003dTrue)"},{"line_number":178,"context_line":"            else:"},{"line_number":179,"context_line":"                return self.get_sync_data(context, router_ids\u003drouter_ids,"}],"source_content_type":"text/x-python","patch_set":35,"id":"AAAAXH%2F%2FPMA%3D","line":176,"updated":"2014-04-24 10:12:01.000000000","message":"why not to pass host in any case?","commit_id":"a3fbab16d1c099ee9ff8fc5b47a2629cf0a1a0df"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"change_message_id":"ee4c15d4c0da3d6f2d5411e596d4472795fc5e6a","unresolved":false,"context_lines":[{"line_number":173,"context_line":"        if router_ids:"},{"line_number":174,"context_line":"            if utils.is_extension_supported(self,"},{"line_number":175,"context_line":"                                            constants.L3_HA_MODE_EXT_ALIAS):"},{"line_number":176,"context_line":"                return self.get_sync_data(context, host, router_ids\u003drouter_ids,"},{"line_number":177,"context_line":"                                          active\u003dTrue)"},{"line_number":178,"context_line":"            else:"},{"line_number":179,"context_line":"                return self.get_sync_data(context, router_ids\u003drouter_ids,"}],"source_content_type":"text/x-python","patch_set":35,"id":"5adbc538_b49fe802","line":176,"in_reply_to":"AAAAXH%2F%2FPMA%3D","updated":"2014-05-26 11:56:39.000000000","message":"Because not all plugins will support the HA mode (ex: bigswitch):","commit_id":"a3fbab16d1c099ee9ff8fc5b47a2629cf0a1a0df"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"c8e8c26c743e7faba5647226076a368989b0f8c1","unresolved":false,"context_lines":[{"line_number":253,"context_line":"            if utils.is_extension_supported(self,"},{"line_number":254,"context_line":"                                            constants.L3_HA_MODE_EXT_ALIAS):"},{"line_number":255,"context_line":"                return self.get_sync_data(context, host, router_ids\u003drouter_ids,"},{"line_number":256,"context_line":"                                          active\u003dTrue)"},{"line_number":257,"context_line":"            else:"},{"line_number":258,"context_line":"                return self.get_sync_data(context, router_ids\u003drouter_ids,"},{"line_number":259,"context_line":"                                          active\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":59,"id":"1abeadc6_a1ae7983","line":256,"updated":"2014-08-19 23:49:57.000000000","message":"I wonder if there is a better pattern to use here.  I don\u0027t like that an overloaded version of the function adds this host parameter.  I\u0027d have to think about it some more to see if I come up with a suggestion.","commit_id":"949dca6b537be509526c05b57772d0632993d8ff"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"9adc89fe1f42f04c48b1b74795146121b835ca5e","unresolved":false,"context_lines":[{"line_number":253,"context_line":"            if utils.is_extension_supported(self,"},{"line_number":254,"context_line":"                                            constants.L3_HA_MODE_EXT_ALIAS):"},{"line_number":255,"context_line":"                return self.get_sync_data(context, host, router_ids\u003drouter_ids,"},{"line_number":256,"context_line":"                                          active\u003dTrue)"},{"line_number":257,"context_line":"            else:"},{"line_number":258,"context_line":"                return self.get_sync_data(context, router_ids\u003drouter_ids,"},{"line_number":259,"context_line":"                                          active\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":59,"id":"1abeadc6_f44edb36","line":256,"in_reply_to":"1abeadc6_a1ae7983","updated":"2014-08-24 17:56:31.000000000","message":"I agree, it\u0027s complicated. The simplest thing to do for now is to rename it.","commit_id":"949dca6b537be509526c05b57772d0632993d8ff"}],"neutron/db/l3_attrs_db.py":[{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"dbe50d93c30b583f3cf674f72b54da3f3d0905b9","unresolved":false,"context_lines":[{"line_number":39,"context_line":"    ha \u003d sa.Column(sa.Boolean(), default\u003dFalse,"},{"line_number":40,"context_line":"                   server_default\u003dsa.sql.false(),"},{"line_number":41,"context_line":"                   nullable\u003dFalse)"},{"line_number":42,"context_line":"    ha_vr_id \u003d sa.Column(sa.Integer())"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"    router \u003d orm.relationship("},{"line_number":45,"context_line":"        l3_db.Router,"}],"source_content_type":"text/x-python","patch_set":55,"id":"baada198_e97981fc","line":42,"updated":"2014-08-06 06:08:52.000000000","message":"why did we decide to use an Int here rather than a string for a uuid?","commit_id":"8007512015565523c977631d1423be5fdd941ba2"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"aad3feda9c0d7361fd816e5f0567679e89fefa6c","unresolved":false,"context_lines":[{"line_number":39,"context_line":"    ha \u003d sa.Column(sa.Boolean(), default\u003dFalse,"},{"line_number":40,"context_line":"                   server_default\u003dsa.sql.false(),"},{"line_number":41,"context_line":"                   nullable\u003dFalse)"},{"line_number":42,"context_line":"    ha_vr_id \u003d sa.Column(sa.Integer())"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"    router \u003d orm.relationship("},{"line_number":45,"context_line":"        l3_db.Router,"}],"source_content_type":"text/x-python","patch_set":55,"id":"baada198_fb5a2481","line":42,"in_reply_to":"baada198_e97981fc","updated":"2014-08-06 06:37:37.000000000","message":"VRRP group IDs must be between 1 and 255.","commit_id":"8007512015565523c977631d1423be5fdd941ba2"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"da51e192303ef1d2abb3501347bc6045344ba768","unresolved":false,"context_lines":[{"line_number":40,"context_line":"    service_router \u003d sa.Column(sa.Boolean, default\u003dFalse,"},{"line_number":41,"context_line":"                               server_default\u003dsa.sql.false(),"},{"line_number":42,"context_line":"                               nullable\u003dFalse)"},{"line_number":43,"context_line":"    ha \u003d sa.Column(sa.Boolean(), default\u003dFalse,"},{"line_number":44,"context_line":"                   server_default\u003dsa.sql.false(),"},{"line_number":45,"context_line":"                   nullable\u003dFalse)"},{"line_number":46,"context_line":"    ha_vr_id \u003d sa.Column(sa.Integer())"}],"source_content_type":"text/x-python","patch_set":60,"id":"1abeadc6_f9779d39","line":43,"updated":"2014-08-25 13:27:52.000000000","message":"sa.Boolean, without parens?","commit_id":"91db4c9bc5f7cbb420532b384c35b2ad4cd62b7c"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"ffedd3e2b5323ee3d26b9e32db9f43b8dd3f156e","unresolved":false,"context_lines":[{"line_number":40,"context_line":"    service_router \u003d sa.Column(sa.Boolean, default\u003dFalse,"},{"line_number":41,"context_line":"                               server_default\u003dsa.sql.false(),"},{"line_number":42,"context_line":"                               nullable\u003dFalse)"},{"line_number":43,"context_line":"    ha \u003d sa.Column(sa.Boolean(), default\u003dFalse,"},{"line_number":44,"context_line":"                   server_default\u003dsa.sql.false(),"},{"line_number":45,"context_line":"                   nullable\u003dFalse)"},{"line_number":46,"context_line":"    ha_vr_id \u003d sa.Column(sa.Integer())"}],"source_content_type":"text/x-python","patch_set":60,"id":"1abeadc6_7811beae","line":43,"in_reply_to":"1abeadc6_f9779d39","updated":"2014-08-25 17:10:30.000000000","message":"Curious... I wonder what effect this had. Thanks!","commit_id":"91db4c9bc5f7cbb420532b384c35b2ad4cd62b7c"}],"neutron/db/l3_db.py":[{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"4c33dd343f00a82e7c31d0c9a11d7b5e8142a290","unresolved":false,"context_lines":[{"line_number":875,"context_line":"                router[l3_constants.INTERFACE_KEY] \u003d router_interfaces"},{"line_number":876,"context_line":"        return routers_dict.values()"},{"line_number":877,"context_line":""},{"line_number":878,"context_line":"    def get_sync_data(self, context, router_ids\u003dNone, active\u003dNone, host\u003dNone):"},{"line_number":879,"context_line":"        \"\"\"Query routers and their related floating_ips, interfaces.\"\"\""},{"line_number":880,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":881,"context_line":"            routers \u003d self._get_sync_routers(context,"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAUH%2F9wzQ%3D","line":878,"updated":"2014-02-04 08:29:34.000000000","message":"can you please clarify why adding the host parameter?","commit_id":"8539b1aef24959c440ea35a835e7a27723adabf0"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"change_message_id":"a0a5b3542eed40d2c4e7c6bf87a08e073afd5477","unresolved":false,"context_lines":[{"line_number":875,"context_line":"                router[l3_constants.INTERFACE_KEY] \u003d router_interfaces"},{"line_number":876,"context_line":"        return routers_dict.values()"},{"line_number":877,"context_line":""},{"line_number":878,"context_line":"    def get_sync_data(self, context, router_ids\u003dNone, active\u003dNone, host\u003dNone):"},{"line_number":879,"context_line":"        \"\"\"Query routers and their related floating_ips, interfaces.\"\"\""},{"line_number":880,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":881,"context_line":"            routers \u003d self._get_sync_routers(context,"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAUH%2F9wFU%3D","line":878,"in_reply_to":"AAAAUH%2F9wzQ%3D","updated":"2014-02-04 11:36:44.000000000","message":"Since an ha router has many ha ports, one per agent, we need to know which agent currently request a get_sync_data. This method is overridden by the HA implementation, which uses the parameter. \n\nso I added this extra parameter to all places using this method, ex: neutron/db/l3_agentschedulers_db.py","commit_id":"8539b1aef24959c440ea35a835e7a27723adabf0"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"95413a577c88d08f63d17ba5eca923c6b26b50ab","unresolved":false,"context_lines":[{"line_number":57,"context_line":"    admin_state_up \u003d sa.Column(sa.Boolean)"},{"line_number":58,"context_line":"    gw_port_id \u003d sa.Column(sa.String(36), sa.ForeignKey(\u0027ports.id\u0027))"},{"line_number":59,"context_line":"    gw_port \u003d orm.relationship(models_v2.Port, foreign_keys\u003d[gw_port_id],"},{"line_number":60,"context_line":"                               primaryjoin\u003d\"Router.gw_port_id\u003d\u003dPort.id\")"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":""},{"line_number":63,"context_line":"class FloatingIP(model_base.BASEV2, models_v2.HasId, models_v2.HasTenant):"}],"source_content_type":"text/x-python","patch_set":21,"id":"AAAAUX%2F%2BemE%3D","line":60,"updated":"2014-02-21 05:20:19.000000000","message":"I\u0027m curious, what is the reason for adding foreign_keys and primaryjoin here?  Did this patch somehow introduce some ambiguity in these tables\u0027 relationship?\n\nNot necessarily grounds for -1, but I\u0027m not seeing the reason.","commit_id":"4cff24d403df8d593ad045e8fc4048e65bb8b5f8"}],"neutron/db/l3_hamode_db.py":[{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"b7ffbca12d0544c8b23b054c306d618d605ab8b0","unresolved":false,"context_lines":[{"line_number":27,"context_line":""},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"L3_HA_OPTS \u003d ["},{"line_number":30,"context_line":"    cfg.StrOpt(\u0027enable_l3_ha\u0027,"},{"line_number":31,"context_line":"               default\u003dFalse,"},{"line_number":32,"context_line":"               help\u003d_(\u0027Enable the high availablilty mode for the l3 agent.\u0027)),"},{"line_number":33,"context_line":"    cfg.StrOpt(\u0027l3_ha_net_cidr\u0027,"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUH%2F%2F39g%3D","line":30,"updated":"2014-01-08 07:30:04.000000000","message":"BoolOpt?","commit_id":"2dceff6e8c9ef7566471c5fc02efb6e9f3e29b8b"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"change_message_id":"3fadecbef45b9be243b9ca32c1cd46d321aedd19","unresolved":false,"context_lines":[{"line_number":27,"context_line":""},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"L3_HA_OPTS \u003d ["},{"line_number":30,"context_line":"    cfg.StrOpt(\u0027enable_l3_ha\u0027,"},{"line_number":31,"context_line":"               default\u003dFalse,"},{"line_number":32,"context_line":"               help\u003d_(\u0027Enable the high availablilty mode for the l3 agent.\u0027)),"},{"line_number":33,"context_line":"    cfg.StrOpt(\u0027l3_ha_net_cidr\u0027,"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUH%2F%2FsZM%3D","line":30,"in_reply_to":"AAAAUH%2F%2F39g%3D","updated":"2014-01-09 14:57:13.000000000","message":"Done","commit_id":"2dceff6e8c9ef7566471c5fc02efb6e9f3e29b8b"},{"author":{"_account_id":162,"name":"Bob Melander","email":"bob.melander@gmail.com","username":"bob-melander"},"change_message_id":"f838f3e2ba4f6be7e6c3dda0fc7d680aac1b728c","unresolved":false,"context_lines":[{"line_number":30,"context_line":"    cfg.StrOpt(\u0027enable_l3_ha\u0027,"},{"line_number":31,"context_line":"               default\u003dFalse,"},{"line_number":32,"context_line":"               help\u003d_(\u0027Enable the high availablilty mode for the l3 agent.\u0027)),"},{"line_number":33,"context_line":"    cfg.StrOpt(\u0027l3_ha_net_cidr\u0027,"},{"line_number":34,"context_line":"               default\u003d\u0027172.31.255.0/24\u0027,"},{"line_number":35,"context_line":"               help\u003d_(\u0027Network address used for the l3 ha admin network.\u0027)),"},{"line_number":36,"context_line":"]"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAT3%2F%2FxqQ%3D","line":33,"updated":"2014-01-01 12:26:22.000000000","message":"I don\u0027t see the benefit of introducing a separate HA network for this use case. Consider dropping the use of a separate HA network/subnet and instead just use the interface of the HA router.","commit_id":"2dceff6e8c9ef7566471c5fc02efb6e9f3e29b8b"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"change_message_id":"3fadecbef45b9be243b9ca32c1cd46d321aedd19","unresolved":false,"context_lines":[{"line_number":30,"context_line":"    cfg.StrOpt(\u0027enable_l3_ha\u0027,"},{"line_number":31,"context_line":"               default\u003dFalse,"},{"line_number":32,"context_line":"               help\u003d_(\u0027Enable the high availablilty mode for the l3 agent.\u0027)),"},{"line_number":33,"context_line":"    cfg.StrOpt(\u0027l3_ha_net_cidr\u0027,"},{"line_number":34,"context_line":"               default\u003d\u0027172.31.255.0/24\u0027,"},{"line_number":35,"context_line":"               help\u003d_(\u0027Network address used for the l3 ha admin network.\u0027)),"},{"line_number":36,"context_line":"]"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUH%2F%2FyyE%3D","line":33,"in_reply_to":"AAAAT3%2F%2FxqQ%3D","updated":"2014-01-09 14:57:13.000000000","message":"Just easier to manage the HA this way, since this network is clearly identified for the HA management. This network is attached to the router during its instantiation, other interfaces can be added or removed at any times. Consider the case where the router is connected to two networks, which one to use, both ? With the current design only one admin network for all user networks. Also more code to refactor/modify for instance the _check_for_dup_router_subnet method. your thought ?","commit_id":"2dceff6e8c9ef7566471c5fc02efb6e9f3e29b8b"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"b7ffbca12d0544c8b23b054c306d618d605ab8b0","unresolved":false,"context_lines":[{"line_number":52,"context_line":"                           nullable\u003dFalse, unique\u003dTrue)"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"class L3_NAT_db_mixin(l3_db.L3_NAT_db_mixin):"},{"line_number":56,"context_line":"    \"\"\"Mixin class to add the high availability mode.\"\"\""},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"    # Register dict extend functions for ports and networks"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUH%2F%2F39M%3D","line":55,"updated":"2014-01-08 07:30:04.000000000","message":"include HA into the class name?","commit_id":"2dceff6e8c9ef7566471c5fc02efb6e9f3e29b8b"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"change_message_id":"3fadecbef45b9be243b9ca32c1cd46d321aedd19","unresolved":false,"context_lines":[{"line_number":52,"context_line":"                           nullable\u003dFalse, unique\u003dTrue)"},{"line_number":53,"context_line":""},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"class L3_NAT_db_mixin(l3_db.L3_NAT_db_mixin):"},{"line_number":56,"context_line":"    \"\"\"Mixin class to add the high availability mode.\"\"\""},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"    # Register dict extend functions for ports and networks"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUH%2F%2FsZI%3D","line":55,"in_reply_to":"AAAAUH%2F%2F39M%3D","updated":"2014-01-09 14:57:13.000000000","message":"Done","commit_id":"2dceff6e8c9ef7566471c5fc02efb6e9f3e29b8b"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"78409f2ff0850e0bc3d9146ef0b7191916fb0c53","unresolved":false,"context_lines":[{"line_number":39,"context_line":""},{"line_number":40,"context_line":"# Modify the Router Data Model adding the ha_master_port and"},{"line_number":41,"context_line":"# ha_failover_port and the type of router"},{"line_number":42,"context_line":"setattr(l3_db.Router, \u0027ha_master_port_id\u0027,"},{"line_number":43,"context_line":"        sa.Column(sa.String(36), sa.ForeignKey(\u0027ports.id\u0027,"},{"line_number":44,"context_line":"                                               ondelete\u003d\u0027SET NULL\u0027)))"},{"line_number":45,"context_line":"setattr(l3_db.Router, \u0027ha_slave_port_id\u0027,"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAUH%2F%2FAI8%3D","line":42,"updated":"2014-01-19 18:08:00.000000000","message":"this will require migration for l3_ha service plugin","commit_id":"5e7f4f7b8794327750dcec80aa3174abe5949fd1"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"change_message_id":"69a24010a7eaca28f55bccf4c816d2de1ed2e3f2","unresolved":false,"context_lines":[{"line_number":39,"context_line":""},{"line_number":40,"context_line":"# Modify the Router Data Model adding the ha_master_port and"},{"line_number":41,"context_line":"# ha_failover_port and the type of router"},{"line_number":42,"context_line":"setattr(l3_db.Router, \u0027ha_master_port_id\u0027,"},{"line_number":43,"context_line":"        sa.Column(sa.String(36), sa.ForeignKey(\u0027ports.id\u0027,"},{"line_number":44,"context_line":"                                               ondelete\u003d\u0027SET NULL\u0027)))"},{"line_number":45,"context_line":"setattr(l3_db.Router, \u0027ha_slave_port_id\u0027,"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAUH%2F%2B7JM%3D","line":42,"in_reply_to":"AAAAUH%2F%2FAI8%3D","updated":"2014-01-20 17:56:12.000000000","message":"Yes, I will add it when close to be merged","commit_id":"5e7f4f7b8794327750dcec80aa3174abe5949fd1"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"78409f2ff0850e0bc3d9146ef0b7191916fb0c53","unresolved":false,"context_lines":[{"line_number":69,"context_line":"                \u0027ha_slave_port_id\u0027: router_db.ha_slave_port_id}"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"    def get_ha_network(self, context, tenant_id):"},{"line_number":72,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":73,"context_line":"            return (context.session.query(L3HANetwork)."},{"line_number":74,"context_line":"                    filter(L3HANetwork.tenant_id \u003d\u003d tenant_id)."},{"line_number":75,"context_line":"                    first())"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAUH%2F%2FAIc%3D","line":72,"updated":"2014-01-19 18:08:00.000000000","message":"not sure transaction is needed on simple select query","commit_id":"5e7f4f7b8794327750dcec80aa3174abe5949fd1"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"change_message_id":"69a24010a7eaca28f55bccf4c816d2de1ed2e3f2","unresolved":false,"context_lines":[{"line_number":69,"context_line":"                \u0027ha_slave_port_id\u0027: router_db.ha_slave_port_id}"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"    def get_ha_network(self, context, tenant_id):"},{"line_number":72,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":73,"context_line":"            return (context.session.query(L3HANetwork)."},{"line_number":74,"context_line":"                    filter(L3HANetwork.tenant_id \u003d\u003d tenant_id)."},{"line_number":75,"context_line":"                    first())"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAUH%2F%2B7I8%3D","line":72,"in_reply_to":"AAAAUH%2F%2FAIc%3D","updated":"2014-01-20 17:56:12.000000000","message":"removed","commit_id":"5e7f4f7b8794327750dcec80aa3174abe5949fd1"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"78409f2ff0850e0bc3d9146ef0b7191916fb0c53","unresolved":false,"context_lines":[{"line_number":120,"context_line":"                return"},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"            subnet \u003d self._get_or_create_ha_network_subnet(context, router_db)"},{"line_number":123,"context_line":"            network \u003d self._core_plugin._get_network(context,"},{"line_number":124,"context_line":"                                                     subnet[\u0027network_id\u0027])"},{"line_number":125,"context_line":""},{"line_number":126,"context_line":"            # no vrrp traffic on external network"}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAUH%2F%2FAIM%3D","line":123,"updated":"2014-01-19 18:08:00.000000000","message":"it\u0027s better to return a tuple of all objects created in _get_or_create_ha_network_subnet","commit_id":"5e7f4f7b8794327750dcec80aa3174abe5949fd1"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"78409f2ff0850e0bc3d9146ef0b7191916fb0c53","unresolved":false,"context_lines":[{"line_number":177,"context_line":"                self._core_plugin._delete_port(context.elevated(),"},{"line_number":178,"context_line":"                                               port[\u0027id\u0027])"},{"line_number":179,"context_line":""},{"line_number":180,"context_line":"            ports \u003d self._core_plugin.get_ports(context.elevated())"},{"line_number":181,"context_line":""},{"line_number":182,"context_line":"            result \u003d super(L3_HA_NAT_db_mixin, self).delete_router(context, id)"},{"line_number":183,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAUH%2F%2FAEM%3D","line":180,"updated":"2014-01-19 18:08:00.000000000","message":"unused","commit_id":"5e7f4f7b8794327750dcec80aa3174abe5949fd1"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"change_message_id":"69a24010a7eaca28f55bccf4c816d2de1ed2e3f2","unresolved":false,"context_lines":[{"line_number":177,"context_line":"                self._core_plugin._delete_port(context.elevated(),"},{"line_number":178,"context_line":"                                               port[\u0027id\u0027])"},{"line_number":179,"context_line":""},{"line_number":180,"context_line":"            ports \u003d self._core_plugin.get_ports(context.elevated())"},{"line_number":181,"context_line":""},{"line_number":182,"context_line":"            result \u003d super(L3_HA_NAT_db_mixin, self).delete_router(context, id)"},{"line_number":183,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"AAAAUH%2F%2B7Ig%3D","line":180,"in_reply_to":"AAAAUH%2F%2FAEM%3D","updated":"2014-01-20 17:56:12.000000000","message":"removed","commit_id":"5e7f4f7b8794327750dcec80aa3174abe5949fd1"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"d485e7dd2535f20921d1fb280ae09904df36ba60","unresolved":false,"context_lines":[{"line_number":97,"context_line":"                     \u0027tenant_id\u0027: tenant_id,"},{"line_number":98,"context_line":"                     \u0027name\u0027: \u0027HA Subnet\u0027,"},{"line_number":99,"context_line":"                     \u0027ip_version\u0027: 4,"},{"line_number":100,"context_line":"                     \u0027cidr\u0027: cfg.CONF.l3_ha_net_cidr,"},{"line_number":101,"context_line":"                     \u0027enable_dhcp\u0027: False,"},{"line_number":102,"context_line":"                     \u0027host_routes\u0027: attributes.ATTR_NOT_SPECIFIED,"},{"line_number":103,"context_line":"                     \u0027dns_nameservers\u0027: attributes.ATTR_NOT_SPECIFIED,"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAUH%2F%2BxoM%3D","line":100,"updated":"2014-01-22 17:07:59.000000000","message":"do we need to verify if configured cidr is of correct format?","commit_id":"a531b31d28b1521c2327b8bcc293ab691fcab215"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"change_message_id":"ce6671455b6b29ffa04d1abab528197c7a606b17","unresolved":false,"context_lines":[{"line_number":97,"context_line":"                     \u0027tenant_id\u0027: tenant_id,"},{"line_number":98,"context_line":"                     \u0027name\u0027: \u0027HA Subnet\u0027,"},{"line_number":99,"context_line":"                     \u0027ip_version\u0027: 4,"},{"line_number":100,"context_line":"                     \u0027cidr\u0027: cfg.CONF.l3_ha_net_cidr,"},{"line_number":101,"context_line":"                     \u0027enable_dhcp\u0027: False,"},{"line_number":102,"context_line":"                     \u0027host_routes\u0027: attributes.ATTR_NOT_SPECIFIED,"},{"line_number":103,"context_line":"                     \u0027dns_nameservers\u0027: attributes.ATTR_NOT_SPECIFIED,"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAUH%2F%2Brek%3D","line":100,"in_reply_to":"AAAAUH%2F%2BxoM%3D","updated":"2014-01-23 09:46:52.000000000","message":"Yes, I will add a check a the startup","commit_id":"a531b31d28b1521c2327b8bcc293ab691fcab215"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"787c22cb8eebf2ff2824fb21ec42a227414d0c85","unresolved":false,"context_lines":[{"line_number":34,"context_line":""},{"line_number":35,"context_line":"L3_HA_OPTS \u003d ["},{"line_number":36,"context_line":"    cfg.IntOpt(\u0027l3_agents_per_router\u0027,"},{"line_number":37,"context_line":"               default\u003dFalse,"},{"line_number":38,"context_line":"               help\u003d_(\u0027Number of l3 agents scheduled to host a router.\u0027)),"},{"line_number":39,"context_line":"    cfg.StrOpt(\u0027l3_ha_net_cidr\u0027,"},{"line_number":40,"context_line":"               default\u003d\u0027172.31.255.0/24\u0027,"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAUH%2F%2BaUk%3D","line":37,"updated":"2014-01-27 08:16:24.000000000","message":"please fix default","commit_id":"8bce8708fb9bb43fe279af0a36acc71e1d69a7fb"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"change_message_id":"d0bf16440fe9a3805eb16531aaa3c178b8deb32f","unresolved":false,"context_lines":[{"line_number":34,"context_line":""},{"line_number":35,"context_line":"L3_HA_OPTS \u003d ["},{"line_number":36,"context_line":"    cfg.IntOpt(\u0027l3_agents_per_router\u0027,"},{"line_number":37,"context_line":"               default\u003dFalse,"},{"line_number":38,"context_line":"               help\u003d_(\u0027Number of l3 agents scheduled to host a router.\u0027)),"},{"line_number":39,"context_line":"    cfg.StrOpt(\u0027l3_ha_net_cidr\u0027,"},{"line_number":40,"context_line":"               default\u003d\u0027172.31.255.0/24\u0027,"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAUH%2F%2BaOQ%3D","line":37,"in_reply_to":"AAAAUH%2F%2BaUk%3D","updated":"2014-01-27 08:47:46.000000000","message":"Done","commit_id":"8bce8708fb9bb43fe279af0a36acc71e1d69a7fb"},{"author":{"_account_id":2711,"name":"Zhang Hua","display_name":"Zhang Hua","email":"joshua.zhang@canonical.com","username":"zhhuabj"},"change_message_id":"dd6308e9d78b67aa3130cf589e9c7472d3a91852","unresolved":false,"context_lines":[{"line_number":43,"context_line":"cfg.CONF.register_opts(L3_HA_OPTS)"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"# Modify the Router Data Model adding the ha_master_port and"},{"line_number":46,"context_line":"# ha_failover_port and the type of router"},{"line_number":47,"context_line":"setattr(l3_db.Router, \u0027ha_master_port_id\u0027,"},{"line_number":48,"context_line":"        sa.Column(sa.String(36), sa.ForeignKey(\u0027ports.id\u0027,"},{"line_number":49,"context_line":"                                               ondelete\u003d\u0027SET NULL\u0027)))"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAUH%2F%2BccE%3D","line":46,"updated":"2014-01-26 10:21:49.000000000","message":"the field below is called ha_slave_port_id, so I think ha_failover_port should change the name into ha_slave_port to maintain the same concept","commit_id":"8bce8708fb9bb43fe279af0a36acc71e1d69a7fb"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"change_message_id":"d0bf16440fe9a3805eb16531aaa3c178b8deb32f","unresolved":false,"context_lines":[{"line_number":43,"context_line":"cfg.CONF.register_opts(L3_HA_OPTS)"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"# Modify the Router Data Model adding the ha_master_port and"},{"line_number":46,"context_line":"# ha_failover_port and the type of router"},{"line_number":47,"context_line":"setattr(l3_db.Router, \u0027ha_master_port_id\u0027,"},{"line_number":48,"context_line":"        sa.Column(sa.String(36), sa.ForeignKey(\u0027ports.id\u0027,"},{"line_number":49,"context_line":"                                               ondelete\u003d\u0027SET NULL\u0027)))"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAUH%2F%2BaN8%3D","line":46,"in_reply_to":"AAAAUH%2F%2BccE%3D","updated":"2014-01-27 08:47:46.000000000","message":"I currently changing the data model in order to support more than 2 instances of a vrrp router","commit_id":"8bce8708fb9bb43fe279af0a36acc71e1d69a7fb"},{"author":{"_account_id":2711,"name":"Zhang Hua","display_name":"Zhang Hua","email":"joshua.zhang@canonical.com","username":"zhhuabj"},"change_message_id":"dd6308e9d78b67aa3130cf589e9c7472d3a91852","unresolved":false,"context_lines":[{"line_number":82,"context_line":"        tenant_id \u003d router.tenant_id"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"        ha_cidr \u003d cfg.CONF.l3_ha_net_cidr"},{"line_number":85,"context_line":"        net \u003d netaddr.IPNetwork(ha_cidr)"},{"line_number":86,"context_line":"        if (\u0027/\u0027 not in ha_cidr or net.network !\u003d net.ip):"},{"line_number":87,"context_line":"            LOG.error(_(\"%(ha_cidr)s is not a valid IP network cidr,\""},{"line_number":88,"context_line":"                        \" %(cidr)s is recommended, check l3_ha_net_cidr in \""}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAUH%2F%2Bcbg%3D","line":85,"updated":"2014-01-26 10:21:49.000000000","message":"those piece of code logic is redundant with _validate_sunet method in attributes.py, could we make it as a common method ?","commit_id":"8bce8708fb9bb43fe279af0a36acc71e1d69a7fb"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"change_message_id":"d0bf16440fe9a3805eb16531aaa3c178b8deb32f","unresolved":false,"context_lines":[{"line_number":82,"context_line":"        tenant_id \u003d router.tenant_id"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":"        ha_cidr \u003d cfg.CONF.l3_ha_net_cidr"},{"line_number":85,"context_line":"        net \u003d netaddr.IPNetwork(ha_cidr)"},{"line_number":86,"context_line":"        if (\u0027/\u0027 not in ha_cidr or net.network !\u003d net.ip):"},{"line_number":87,"context_line":"            LOG.error(_(\"%(ha_cidr)s is not a valid IP network cidr,\""},{"line_number":88,"context_line":"                        \" %(cidr)s is recommended, check l3_ha_net_cidr in \""}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAUH%2F%2BaNc%3D","line":85,"in_reply_to":"AAAAUH%2F%2Bcbg%3D","updated":"2014-01-27 08:47:46.000000000","message":"I will see,, since the condition is the same but not the log message","commit_id":"8bce8708fb9bb43fe279af0a36acc71e1d69a7fb"},{"author":{"_account_id":2711,"name":"Zhang Hua","display_name":"Zhang Hua","email":"joshua.zhang@canonical.com","username":"zhhuabj"},"change_message_id":"dd6308e9d78b67aa3130cf589e9c7472d3a91852","unresolved":false,"context_lines":[{"line_number":96,"context_line":"            if ha_network:"},{"line_number":97,"context_line":"                subnets \u003d self._core_plugin._get_subnets_by_network("},{"line_number":98,"context_line":"                    context, ha_network.network_id)"},{"line_number":99,"context_line":"                return subnets[0]"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"            args \u003d {\u0027network\u0027:"},{"line_number":102,"context_line":"                    {\u0027name\u0027: \"HA Network\","}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAUH%2F%2BcbE%3D","line":99,"updated":"2014-01-26 10:21:49.000000000","message":"could you ensure the length of subnets \u003e 1 for ever ?","commit_id":"8bce8708fb9bb43fe279af0a36acc71e1d69a7fb"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"change_message_id":"d0bf16440fe9a3805eb16531aaa3c178b8deb32f","unresolved":false,"context_lines":[{"line_number":96,"context_line":"            if ha_network:"},{"line_number":97,"context_line":"                subnets \u003d self._core_plugin._get_subnets_by_network("},{"line_number":98,"context_line":"                    context, ha_network.network_id)"},{"line_number":99,"context_line":"                return subnets[0]"},{"line_number":100,"context_line":""},{"line_number":101,"context_line":"            args \u003d {\u0027network\u0027:"},{"line_number":102,"context_line":"                    {\u0027name\u0027: \"HA Network\","}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAUH%2F%2BaMo%3D","line":99,"in_reply_to":"AAAAUH%2F%2BcbE%3D","updated":"2014-01-27 08:47:46.000000000","message":"only this method create a subnet for the ha_network, and We only need here one subnet, so returning the first and the only one seems to be good ?","commit_id":"8bce8708fb9bb43fe279af0a36acc71e1d69a7fb"},{"author":{"_account_id":2711,"name":"Zhang Hua","display_name":"Zhang Hua","email":"joshua.zhang@canonical.com","username":"zhhuabj"},"change_message_id":"dd6308e9d78b67aa3130cf589e9c7472d3a91852","unresolved":false,"context_lines":[{"line_number":134,"context_line":""},{"line_number":135,"context_line":"            subnet \u003d self._get_or_create_ha_network_subnet(context, router_db)"},{"line_number":136,"context_line":""},{"line_number":137,"context_line":"            for device_name in [\u0027ha_master_port\u0027, \u0027ha_slave_port\u0027]:"},{"line_number":138,"context_line":"                result \u003d self._core_plugin._generate_ip(context, [subnet])"},{"line_number":139,"context_line":"                fixed_ip \u003d {\u0027ip_address\u0027: result[\u0027ip_address\u0027],"},{"line_number":140,"context_line":"                            \u0027subnet_id\u0027: result[\u0027subnet_id\u0027]}"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAUH%2F%2Bcac%3D","line":137,"updated":"2014-01-26 10:21:49.000000000","message":"expect constants ? and if need preparing the corresponding db migration script ?","commit_id":"8bce8708fb9bb43fe279af0a36acc71e1d69a7fb"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"change_message_id":"d0bf16440fe9a3805eb16531aaa3c178b8deb32f","unresolved":false,"context_lines":[{"line_number":134,"context_line":""},{"line_number":135,"context_line":"            subnet \u003d self._get_or_create_ha_network_subnet(context, router_db)"},{"line_number":136,"context_line":""},{"line_number":137,"context_line":"            for device_name in [\u0027ha_master_port\u0027, \u0027ha_slave_port\u0027]:"},{"line_number":138,"context_line":"                result \u003d self._core_plugin._generate_ip(context, [subnet])"},{"line_number":139,"context_line":"                fixed_ip \u003d {\u0027ip_address\u0027: result[\u0027ip_address\u0027],"},{"line_number":140,"context_line":"                            \u0027subnet_id\u0027: result[\u0027subnet_id\u0027]}"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAUH%2F%2BaMU%3D","line":137,"in_reply_to":"AAAAUH%2F%2Bcac%3D","updated":"2014-01-27 08:47:46.000000000","message":"The data model has changed, but yes a migration script will be provided when this patch will be close to be merge and the WIP status will be removed","commit_id":"8bce8708fb9bb43fe279af0a36acc71e1d69a7fb"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"787c22cb8eebf2ff2824fb21ec42a227414d0c85","unresolved":false,"context_lines":[{"line_number":168,"context_line":"        if cfg.CONF.l3_agents_per_router \u003e 1:"},{"line_number":169,"context_line":"            info \u003d self._create_ha_interfaces(context, router_dict[\u0027id\u0027])"},{"line_number":170,"context_line":"            if not info:"},{"line_number":171,"context_line":"                raise"},{"line_number":172,"context_line":""},{"line_number":173,"context_line":"            self.l3_rpc_notifier.router_created("},{"line_number":174,"context_line":"                context, router_dict[\u0027id\u0027], \u0027ha_interface_created\u0027)"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAUH%2F%2BaTQ%3D","line":171,"updated":"2014-01-27 08:16:24.000000000","message":"should you raise some particular exception here?","commit_id":"8bce8708fb9bb43fe279af0a36acc71e1d69a7fb"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"change_message_id":"d0bf16440fe9a3805eb16531aaa3c178b8deb32f","unresolved":false,"context_lines":[{"line_number":168,"context_line":"        if cfg.CONF.l3_agents_per_router \u003e 1:"},{"line_number":169,"context_line":"            info \u003d self._create_ha_interfaces(context, router_dict[\u0027id\u0027])"},{"line_number":170,"context_line":"            if not info:"},{"line_number":171,"context_line":"                raise"},{"line_number":172,"context_line":""},{"line_number":173,"context_line":"            self.l3_rpc_notifier.router_created("},{"line_number":174,"context_line":"                context, router_dict[\u0027id\u0027], \u0027ha_interface_created\u0027)"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAUH%2F%2BaMA%3D","line":171,"in_reply_to":"AAAAUH%2F%2BaTQ%3D","updated":"2014-01-27 08:47:46.000000000","message":"Yes I added an exception that you will see in the next patchset","commit_id":"8bce8708fb9bb43fe279af0a36acc71e1d69a7fb"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"4c33dd343f00a82e7c31d0c9a11d7b5e8142a290","unresolved":false,"context_lines":[{"line_number":51,"context_line":""},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"class NoVRIDAvailable(exceptions.NeutronException):"},{"line_number":54,"context_line":"    message \u003d _(\"No more vr_id available\")"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"class HANetworkCIDRNotValid(exceptions.NeutronException):"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAUH%2F9wy0%3D","line":54,"updated":"2014-02-04 08:29:34.000000000","message":"nit: vr_id may not be clear for one reading the log","commit_id":"8539b1aef24959c440ea35a835e7a27723adabf0"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"change_message_id":"a0a5b3542eed40d2c4e7c6bf87a08e073afd5477","unresolved":false,"context_lines":[{"line_number":51,"context_line":""},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"class NoVRIDAvailable(exceptions.NeutronException):"},{"line_number":54,"context_line":"    message \u003d _(\"No more vr_id available\")"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"class HANetworkCIDRNotValid(exceptions.NeutronException):"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAUH%2F9wFM%3D","line":54,"in_reply_to":"AAAAUH%2F9wy0%3D","updated":"2014-02-04 11:36:44.000000000","message":"Done","commit_id":"8539b1aef24959c440ea35a835e7a27723adabf0"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"4c33dd343f00a82e7c31d0c9a11d7b5e8142a290","unresolved":false,"context_lines":[{"line_number":56,"context_line":""},{"line_number":57,"context_line":"class HANetworkCIDRNotValid(exceptions.NeutronException):"},{"line_number":58,"context_line":"    message \u003d _(\"The ha network cidr specified in the configuration file\""},{"line_number":59,"context_line":"                \" isn\u0027t valid; %(cidr)s\")"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"class L3HARouterAgentPortBinding(model_base.BASEV2):"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAUH%2F9wzI%3D","line":59,"updated":"2014-02-04 08:29:34.000000000","message":"; -\u003e :","commit_id":"8539b1aef24959c440ea35a835e7a27723adabf0"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"change_message_id":"a0a5b3542eed40d2c4e7c6bf87a08e073afd5477","unresolved":false,"context_lines":[{"line_number":56,"context_line":""},{"line_number":57,"context_line":"class HANetworkCIDRNotValid(exceptions.NeutronException):"},{"line_number":58,"context_line":"    message \u003d _(\"The ha network cidr specified in the configuration file\""},{"line_number":59,"context_line":"                \" isn\u0027t valid; %(cidr)s\")"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"class L3HARouterAgentPortBinding(model_base.BASEV2):"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAUH%2F9wFE%3D","line":59,"in_reply_to":"AAAAUH%2F9wzI%3D","updated":"2014-02-04 11:36:44.000000000","message":"Done","commit_id":"8539b1aef24959c440ea35a835e7a27723adabf0"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"90b0b7f9e5fb06c0dcaecb2f8dacfe9def950e91","unresolved":false,"context_lines":[{"line_number":34,"context_line":""},{"line_number":35,"context_line":"VR_ID_RANGE \u003d set(range(1, 255))"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"L3_HA_OPTS \u003d ["},{"line_number":40,"context_line":"    cfg.BoolOpt(\u0027l3_ha\u0027,"}],"source_content_type":"text/x-python","patch_set":21,"id":"AAAAUX%2F%2FFg4%3D","line":37,"updated":"2014-02-18 14:00:34.000000000","message":"not used","commit_id":"4cff24d403df8d593ad045e8fc4048e65bb8b5f8"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"8359731cd189b1a2a35bc6b8138123314a88be01","unresolved":false,"context_lines":[{"line_number":40,"context_line":"    cfg.BoolOpt(\u0027l3_ha\u0027,"},{"line_number":41,"context_line":"                default\u003dFalse,"},{"line_number":42,"context_line":"                help\u003d_(\u0027Enable the HA mode of virtual routers\u0027)),"},{"line_number":43,"context_line":"    cfg.IntOpt(\u0027max_l3_agents_per_router\u0027,"},{"line_number":44,"context_line":"               help\u003d_(\u0027Maximun number of agents on which a router will be \u0027"},{"line_number":45,"context_line":"                      \u0027scheduled.\u0027)),"},{"line_number":46,"context_line":"    cfg.StrOpt(\u0027l3_ha_net_cidr\u0027,"}],"source_content_type":"text/x-python","patch_set":21,"id":"AAAAUX%2F%2Bu3M%3D","line":43,"updated":"2014-02-19 13:54:05.000000000","message":"if l3_ha is true then max_l3_agents_per_router should be 2 by default. Anyway my suggestion is to get rid of l3_ha and use just max_l3_agents_per_router, if max_l3_agents_per_router \u003e 1 then HA is enabled.","commit_id":"4cff24d403df8d593ad045e8fc4048e65bb8b5f8"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"7e123f891a0a5286564ec3db2cd76f1c9993ba2b","unresolved":false,"context_lines":[{"line_number":40,"context_line":"    cfg.BoolOpt(\u0027l3_ha\u0027,"},{"line_number":41,"context_line":"                default\u003dFalse,"},{"line_number":42,"context_line":"                help\u003d_(\u0027Enable the HA mode of virtual routers\u0027)),"},{"line_number":43,"context_line":"    cfg.IntOpt(\u0027max_l3_agents_per_router\u0027,"},{"line_number":44,"context_line":"               help\u003d_(\u0027Maximun number of agents on which a router will be \u0027"},{"line_number":45,"context_line":"                      \u0027scheduled.\u0027)),"},{"line_number":46,"context_line":"    cfg.StrOpt(\u0027l3_ha_net_cidr\u0027,"}],"source_content_type":"text/x-python","patch_set":21,"id":"AAAAUX%2F%2Bnag%3D","line":43,"in_reply_to":"AAAAUX%2F%2Bu3M%3D","updated":"2014-02-20 07:15:10.000000000","message":"max_l3_agents_per_router\nand \nmin_l3_agents_per_router \n\nis another suggestion,\n\nCheers,","commit_id":"4cff24d403df8d593ad045e8fc4048e65bb8b5f8"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"95413a577c88d08f63d17ba5eca923c6b26b50ab","unresolved":false,"context_lines":[{"line_number":50,"context_line":"cfg.CONF.register_opts(L3_HA_OPTS)"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":"# Modify the Router Data Model adding the virtual router id"},{"line_number":53,"context_line":"setattr(l3_db.Router, \u0027ha_vr_id\u0027,"},{"line_number":54,"context_line":"        sa.Column(sa.Integer()))"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":""}],"source_content_type":"text/x-python","patch_set":21,"id":"AAAAUX%2F%2Bees%3D","line":53,"updated":"2014-02-21 05:20:19.000000000","message":"Is this a good ideato do this here?  When I look at the database tables and I see ha_vr_id I\u0027m going to scratch my head over why that doesn\u0027t match the model for the table in l3_db.py.  I tend to want the model defined in one place.","commit_id":"4cff24d403df8d593ad045e8fc4048e65bb8b5f8"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"95413a577c88d08f63d17ba5eca923c6b26b50ab","unresolved":false,"context_lines":[{"line_number":54,"context_line":"        sa.Column(sa.Integer()))"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":""},{"line_number":57,"context_line":"class NoVRIDAvailable(exceptions.NeutronException):"},{"line_number":58,"context_line":"    message \u003d _(\"No more Virtual Router Identifier (VRID) available, \""},{"line_number":59,"context_line":"                \"the limit of number of HA Routers per tenant is 254 due to \""},{"line_number":60,"context_line":"                \"the size of the VRID field of the VRRP protocol.\")"}],"source_content_type":"text/x-python","patch_set":21,"id":"AAAAUX%2F%2BeeY%3D","line":57,"updated":"2014-02-21 05:20:19.000000000","message":"Most exceptions are defined in neutron/common/exceptions.py.  I\u0027m not saying this is wrong but I wonder if we have guidelines about where exceptions should be defined.","commit_id":"4cff24d403df8d593ad045e8fc4048e65bb8b5f8"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"8359731cd189b1a2a35bc6b8138123314a88be01","unresolved":false,"context_lines":[{"line_number":77,"context_line":"    l3 agent."},{"line_number":78,"context_line":"    \"\"\""},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"    __tablename__ \u003d \u0027harouter_agent_port_bindings\u0027"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"    port_id \u003d sa.Column(sa.String(36), sa.ForeignKey(\u0027ports.id\u0027,"},{"line_number":83,"context_line":"                                                     ondelete\u003d\u0027CASCADE\u0027),"}],"source_content_type":"text/x-python","patch_set":21,"id":"AAAAUX%2F%2Bu4w%3D","line":80,"updated":"2014-02-19 13:54:05.000000000","message":"nit: ha_router_agent_port_bindings is more consistent with the rest of the code","commit_id":"4cff24d403df8d593ad045e8fc4048e65bb8b5f8"},{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"8359731cd189b1a2a35bc6b8138123314a88be01","unresolved":false,"context_lines":[{"line_number":104,"context_line":"    on this type of network."},{"line_number":105,"context_line":"    \"\"\""},{"line_number":106,"context_line":""},{"line_number":107,"context_line":"    __tablename__ \u003d \u0027harouter_networks\u0027"},{"line_number":108,"context_line":""},{"line_number":109,"context_line":"    network_id \u003d sa.Column(sa.String(36),"},{"line_number":110,"context_line":"                           sa.ForeignKey(\u0027networks.id\u0027, ondelete\u003d\"CASCADE\"),"}],"source_content_type":"text/x-python","patch_set":21,"id":"AAAAUX%2F%2Bu4k%3D","line":107,"updated":"2014-02-19 13:54:05.000000000","message":"same suggestion here","commit_id":"4cff24d403df8d593ad045e8fc4048e65bb8b5f8"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"95413a577c88d08f63d17ba5eca923c6b26b50ab","unresolved":false,"context_lines":[{"line_number":129,"context_line":""},{"line_number":130,"context_line":"    def _set_vr_id(self, context, router_id):"},{"line_number":131,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":132,"context_line":"            query \u003d context.session.query(l3_db.Router)"},{"line_number":133,"context_line":""},{"line_number":134,"context_line":"            allocated_vr_ids \u003d set([r[\u0027ha_vr_id\u0027] for r in query])"},{"line_number":135,"context_line":"            available_vr_ids \u003d VR_ID_RANGE - allocated_vr_ids"}],"source_content_type":"text/x-python","patch_set":21,"id":"AAAAUX%2F%2BcZE%3D","line":132,"updated":"2014-02-21 05:20:19.000000000","message":"Where does the tenant come in to play?  I recall reading in the blue print that the entire vr id range is available per tenant since a tenant has its own admin network.","commit_id":"4cff24d403df8d593ad045e8fc4048e65bb8b5f8"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"95413a577c88d08f63d17ba5eca923c6b26b50ab","unresolved":false,"context_lines":[{"line_number":155,"context_line":"                return subnets[0]"},{"line_number":156,"context_line":""},{"line_number":157,"context_line":"            args \u003d {\u0027network\u0027:"},{"line_number":158,"context_line":"                    {\u0027name\u0027: \"HA Network\","},{"line_number":159,"context_line":"                     \u0027tenant_id\u0027: \u0027\u0027,"},{"line_number":160,"context_line":"                     \u0027shared\u0027: False,"},{"line_number":161,"context_line":"                     \u0027admin_state_up\u0027: True,"}],"source_content_type":"text/x-python","patch_set":21,"id":"AAAAUX%2F%2BcWQ%3D","line":158,"updated":"2014-02-21 05:20:19.000000000","message":"This name could be a little more specific.  Say the tenant already has an HA Network for HA db or something.  Example:  \"HA Router VRRP Network\"","commit_id":"4cff24d403df8d593ad045e8fc4048e65bb8b5f8"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"95413a577c88d08f63d17ba5eca923c6b26b50ab","unresolved":false,"context_lines":[{"line_number":165,"context_line":"            args \u003d {\u0027subnet\u0027:"},{"line_number":166,"context_line":"                    {\u0027network_id\u0027: network[\u0027id\u0027],"},{"line_number":167,"context_line":"                     \u0027tenant_id\u0027: \u0027\u0027,"},{"line_number":168,"context_line":"                     \u0027name\u0027: \u0027HA Subnet\u0027,"},{"line_number":169,"context_line":"                     \u0027ip_version\u0027: 4,"},{"line_number":170,"context_line":"                     \u0027cidr\u0027: cfg.CONF.l3_ha_net_cidr,"},{"line_number":171,"context_line":"                     \u0027enable_dhcp\u0027: False,"}],"source_content_type":"text/x-python","patch_set":21,"id":"AAAAUX%2F%2BcWs%3D","line":168,"updated":"2014-02-21 05:20:19.000000000","message":"ditto","commit_id":"4cff24d403df8d593ad045e8fc4048e65bb8b5f8"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"95413a577c88d08f63d17ba5eca923c6b26b50ab","unresolved":false,"context_lines":[{"line_number":169,"context_line":"                     \u0027ip_version\u0027: 4,"},{"line_number":170,"context_line":"                     \u0027cidr\u0027: cfg.CONF.l3_ha_net_cidr,"},{"line_number":171,"context_line":"                     \u0027enable_dhcp\u0027: False,"},{"line_number":172,"context_line":"                     \u0027host_routes\u0027: attributes.ATTR_NOT_SPECIFIED,"},{"line_number":173,"context_line":"                     \u0027dns_nameservers\u0027: attributes.ATTR_NOT_SPECIFIED,"},{"line_number":174,"context_line":"                     \u0027allocation_pools\u0027: attributes.ATTR_NOT_SPECIFIED,"},{"line_number":175,"context_line":"                     \u0027gateway_ip\u0027: attributes.ATTR_NOT_SPECIFIED}}"}],"source_content_type":"text/x-python","patch_set":21,"id":"AAAAUX%2F%2BcVs%3D","line":172,"updated":"2014-02-21 05:20:19.000000000","message":"Is it not sufficient to not specify?  ;)  Actually, I can see a possible advantage to the way you\u0027ve done this.","commit_id":"4cff24d403df8d593ad045e8fc4048e65bb8b5f8"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"90b0b7f9e5fb06c0dcaecb2f8dacfe9def950e91","unresolved":false,"context_lines":[{"line_number":188,"context_line":"            router_id \u003d router[\u0027id\u0027]"},{"line_number":189,"context_line":""},{"line_number":190,"context_line":"            l3_agents \u003d self.get_l3_agents(context)"},{"line_number":191,"context_line":"            max_agents \u003d cfg.CONF.max_l3_agents_per_router or len(l3_agents)"},{"line_number":192,"context_line":"            if max_agents \u003c 2:"},{"line_number":193,"context_line":"                raise HANotEnoughAvailableAgents()"},{"line_number":194,"context_line":""}],"source_content_type":"text/x-python","patch_set":21,"id":"AAAAUX%2F%2B5js%3D","line":191,"updated":"2014-02-18 14:00:34.000000000","message":"is there a check for cfg.CONF.max_l3_agents_per_router !\u003d 1?","commit_id":"4cff24d403df8d593ad045e8fc4048e65bb8b5f8"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"95413a577c88d08f63d17ba5eca923c6b26b50ab","unresolved":false,"context_lines":[{"line_number":188,"context_line":"            router_id \u003d router[\u0027id\u0027]"},{"line_number":189,"context_line":""},{"line_number":190,"context_line":"            l3_agents \u003d self.get_l3_agents(context)"},{"line_number":191,"context_line":"            max_agents \u003d cfg.CONF.max_l3_agents_per_router or len(l3_agents)"},{"line_number":192,"context_line":"            if max_agents \u003c 2:"},{"line_number":193,"context_line":"                raise HANotEnoughAvailableAgents()"},{"line_number":194,"context_line":""}],"source_content_type":"text/x-python","patch_set":21,"id":"AAAAUX%2F%2BcTw%3D","line":191,"in_reply_to":"AAAAUX%2F%2B5js%3D","updated":"2014-02-21 05:20:19.000000000","message":"I think max_agents should be the minimum of the two values.  It is conceivable that there could only be one available agent.","commit_id":"4cff24d403df8d593ad045e8fc4048e65bb8b5f8"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"90b0b7f9e5fb06c0dcaecb2f8dacfe9def950e91","unresolved":false,"context_lines":[{"line_number":195,"context_line":"            for index in range(max_agents):"},{"line_number":196,"context_line":"                device_name \u003d \u0027L3 HA Admin port %s\u0027 % index"},{"line_number":197,"context_line":""},{"line_number":198,"context_line":"                result \u003d self._core_plugin._generate_ip(context, [subnet])"},{"line_number":199,"context_line":"                fixed_ip \u003d {\u0027ip_address\u0027: result[\u0027ip_address\u0027],"},{"line_number":200,"context_line":"                            \u0027subnet_id\u0027: result[\u0027subnet_id\u0027]}"},{"line_number":201,"context_line":"                port \u003d self._core_plugin.create_port(context, {"}],"source_content_type":"text/x-python","patch_set":21,"id":"AAAAUX%2F%2B5f4%3D","line":198,"updated":"2014-02-18 14:00:34.000000000","message":"why not let self._core_plugin.create_port() generate ip automatically? Seems the result will be the same","commit_id":"4cff24d403df8d593ad045e8fc4048e65bb8b5f8"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"change_message_id":"5d2d349a1b348670f32a3e32af6f7ed43ad82635","unresolved":false,"context_lines":[{"line_number":56,"context_line":"# Modify the Router Data Model adding the virtual router id"},{"line_number":57,"context_line":"setattr(l3_db.Router, \u0027ha_vr_id\u0027,"},{"line_number":58,"context_line":"        sa.Column(sa.Integer()))"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"class NoVRIDAvailable(exceptions.NeutronException):"},{"line_number":62,"context_line":"    message \u003d _(\"No more Virtual Router Identifier (VRID) available, \""}],"source_content_type":"text/x-python","patch_set":23,"id":"AAAAU3%2F%2FZpo%3D","line":59,"updated":"2014-02-26 21:30:18.000000000","message":"Carl, It put the ha_vr_id here just because not all plugin will use the HA. I did that exactly as the same way as the gw extension.","commit_id":"da704b1ab647dc96e13766dcf484cfbe14b7885f"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"86b32f58d22768a8dfd3a71491a54a7cfb87e99e","unresolved":false,"context_lines":[{"line_number":56,"context_line":"# Modify the Router Data Model adding the virtual router id"},{"line_number":57,"context_line":"setattr(l3_db.Router, \u0027ha_vr_id\u0027,"},{"line_number":58,"context_line":"        sa.Column(sa.Integer()))"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"class NoVRIDAvailable(exceptions.NeutronException):"},{"line_number":62,"context_line":"    message \u003d _(\"No more Virtual Router Identifier (VRID) available, \""}],"source_content_type":"text/x-python","patch_set":23,"id":"AAAAVX%2F%2FvLA%3D","line":59,"in_reply_to":"AAAAU3%2F%2FZpo%3D","updated":"2014-02-28 17:09:36.000000000","message":"ok","commit_id":"da704b1ab647dc96e13766dcf484cfbe14b7885f"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"9f1281ce6e2d9cac4967eb25297cf4cb64d93b0c","unresolved":false,"context_lines":[{"line_number":200,"context_line":""},{"line_number":201,"context_line":"            min_agents \u003d cfg.CONF.min_l3_agents_per_router"},{"line_number":202,"context_line":"            if min_agents \u003c 2:"},{"line_number":203,"context_line":"                raise HAMinimumAgentsNumberNotValid()"},{"line_number":204,"context_line":""},{"line_number":205,"context_line":"            l3_agents \u003d len(self.get_l3_agents(context))"},{"line_number":206,"context_line":"            if l3_agents \u003c min_agents:"}],"source_content_type":"text/x-python","patch_set":23,"id":"AAAAU3%2F%2FyDI%3D","line":203,"updated":"2014-02-24 20:35:54.000000000","message":"Check this constraint earlier so that the agent won\u0027t start if it is not valid.  This is bad configuration rather than bad user input or a bad state.","commit_id":"da704b1ab647dc96e13766dcf484cfbe14b7885f"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"86b32f58d22768a8dfd3a71491a54a7cfb87e99e","unresolved":false,"context_lines":[{"line_number":200,"context_line":""},{"line_number":201,"context_line":"            min_agents \u003d cfg.CONF.min_l3_agents_per_router"},{"line_number":202,"context_line":"            if min_agents \u003c 2:"},{"line_number":203,"context_line":"                raise HAMinimumAgentsNumberNotValid()"},{"line_number":204,"context_line":""},{"line_number":205,"context_line":"            l3_agents \u003d len(self.get_l3_agents(context))"},{"line_number":206,"context_line":"            if l3_agents \u003c min_agents:"}],"source_content_type":"text/x-python","patch_set":23,"id":"AAAAVX%2F%2FvL4%3D","line":203,"in_reply_to":"AAAAU3%2F%2FZWk%3D","updated":"2014-02-28 17:09:36.000000000","message":"How about \"from oslo.config import types\" to constrain the value?  See the docstring in the file below for an example.  I\u0027ve never used it but it seems like it could solve the problem.\n\nhttps://github.com/openstack/oslo.config/blob/master/oslo/config/cfg.py","commit_id":"da704b1ab647dc96e13766dcf484cfbe14b7885f"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"change_message_id":"5d2d349a1b348670f32a3e32af6f7ed43ad82635","unresolved":false,"context_lines":[{"line_number":200,"context_line":""},{"line_number":201,"context_line":"            min_agents \u003d cfg.CONF.min_l3_agents_per_router"},{"line_number":202,"context_line":"            if min_agents \u003c 2:"},{"line_number":203,"context_line":"                raise HAMinimumAgentsNumberNotValid()"},{"line_number":204,"context_line":""},{"line_number":205,"context_line":"            l3_agents \u003d len(self.get_l3_agents(context))"},{"line_number":206,"context_line":"            if l3_agents \u003c min_agents:"}],"source_content_type":"text/x-python","patch_set":23,"id":"AAAAU3%2F%2FZWk%3D","line":203,"in_reply_to":"AAAAU3%2F%2FyDI%3D","updated":"2014-02-26 21:30:18.000000000","message":"I\u0027m ok, but I can\u0027t move this check to the constructor since the plugin/service plugin don\u0027t call the super constructor, your thoughts ?","commit_id":"da704b1ab647dc96e13766dcf484cfbe14b7885f"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"9f1281ce6e2d9cac4967eb25297cf4cb64d93b0c","unresolved":false,"context_lines":[{"line_number":204,"context_line":""},{"line_number":205,"context_line":"            l3_agents \u003d len(self.get_l3_agents(context))"},{"line_number":206,"context_line":"            if l3_agents \u003c min_agents:"},{"line_number":207,"context_line":"                raise HANotEnoughAvailableAgents()"},{"line_number":208,"context_line":""},{"line_number":209,"context_line":"            max_agents \u003d cfg.CONF.max_l3_agents_per_router"},{"line_number":210,"context_line":"            if max_agents:"}],"source_content_type":"text/x-python","patch_set":23,"id":"AAAAU3%2F%2Fx90%3D","line":207,"updated":"2014-02-24 20:35:54.000000000","message":"On the other hand, this is a good place for this check since it is based on the current state of the system as a whole.","commit_id":"da704b1ab647dc96e13766dcf484cfbe14b7885f"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"9f1281ce6e2d9cac4967eb25297cf4cb64d93b0c","unresolved":false,"context_lines":[{"line_number":211,"context_line":"                if max_agents \u003e l3_agents:"},{"line_number":212,"context_line":"                    LOG.warn(_(\"Number of available agents lower than \""},{"line_number":213,"context_line":"                               \"max_l3_agents_per_router. L3 agents \""},{"line_number":214,"context_line":"                               \"available: %s\"), l3_agents)"},{"line_number":215,"context_line":"            else:"},{"line_number":216,"context_line":"                max_agents \u003d l3_agents"},{"line_number":217,"context_line":""}],"source_content_type":"text/x-python","patch_set":23,"id":"AAAAU3%2F%2FyBI%3D","line":214,"updated":"2014-02-24 20:35:54.000000000","message":"Need to clamp \"num_agents \u003d l3_agents\" here if max_agents \u003e l3_agents.","commit_id":"da704b1ab647dc96e13766dcf484cfbe14b7885f"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"86b32f58d22768a8dfd3a71491a54a7cfb87e99e","unresolved":false,"context_lines":[{"line_number":211,"context_line":"                if max_agents \u003e l3_agents:"},{"line_number":212,"context_line":"                    LOG.warn(_(\"Number of available agents lower than \""},{"line_number":213,"context_line":"                               \"max_l3_agents_per_router. L3 agents \""},{"line_number":214,"context_line":"                               \"available: %s\"), l3_agents)"},{"line_number":215,"context_line":"            else:"},{"line_number":216,"context_line":"                max_agents \u003d l3_agents"},{"line_number":217,"context_line":""}],"source_content_type":"text/x-python","patch_set":23,"id":"AAAAVX%2F%2FvNk%3D","line":214,"in_reply_to":"AAAAU3%2F%2FZqo%3D","updated":"2014-02-28 17:09:36.000000000","message":"ok","commit_id":"da704b1ab647dc96e13766dcf484cfbe14b7885f"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"change_message_id":"5d2d349a1b348670f32a3e32af6f7ed43ad82635","unresolved":false,"context_lines":[{"line_number":211,"context_line":"                if max_agents \u003e l3_agents:"},{"line_number":212,"context_line":"                    LOG.warn(_(\"Number of available agents lower than \""},{"line_number":213,"context_line":"                               \"max_l3_agents_per_router. L3 agents \""},{"line_number":214,"context_line":"                               \"available: %s\"), l3_agents)"},{"line_number":215,"context_line":"            else:"},{"line_number":216,"context_line":"                max_agents \u003d l3_agents"},{"line_number":217,"context_line":""}],"source_content_type":"text/x-python","patch_set":23,"id":"AAAAU3%2F%2FZqo%3D","line":214,"in_reply_to":"AAAAU3%2F%2FlMc%3D","updated":"2014-02-26 21:30:18.000000000","message":"I prefer to not clamping since if a l3 agents is momentarily down it will be able to use this interface when it will be back to up ?","commit_id":"da704b1ab647dc96e13766dcf484cfbe14b7885f"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"848b28c9d1dbd08c23046690837ae9a042dbdf24","unresolved":false,"context_lines":[{"line_number":211,"context_line":"                if max_agents \u003e l3_agents:"},{"line_number":212,"context_line":"                    LOG.warn(_(\"Number of available agents lower than \""},{"line_number":213,"context_line":"                               \"max_l3_agents_per_router. L3 agents \""},{"line_number":214,"context_line":"                               \"available: %s\"), l3_agents)"},{"line_number":215,"context_line":"            else:"},{"line_number":216,"context_line":"                max_agents \u003d l3_agents"},{"line_number":217,"context_line":""}],"source_content_type":"text/x-python","patch_set":23,"id":"AAAAU3%2F%2FlMc%3D","line":214,"in_reply_to":"AAAAU3%2F%2Fs2E%3D","updated":"2014-02-25 20:20:34.000000000","message":"I suggested clamping because it doesn\u0027t make sense to me to binding to more agents than are actually found.","commit_id":"da704b1ab647dc96e13766dcf484cfbe14b7885f"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"afd188b1b00685652b24fdb33aef1808b09ce03d","unresolved":false,"context_lines":[{"line_number":211,"context_line":"                if max_agents \u003e l3_agents:"},{"line_number":212,"context_line":"                    LOG.warn(_(\"Number of available agents lower than \""},{"line_number":213,"context_line":"                               \"max_l3_agents_per_router. L3 agents \""},{"line_number":214,"context_line":"                               \"available: %s\"), l3_agents)"},{"line_number":215,"context_line":"            else:"},{"line_number":216,"context_line":"                max_agents \u003d l3_agents"},{"line_number":217,"context_line":""}],"source_content_type":"text/x-python","patch_set":23,"id":"AAAAU3%2F%2Fs2E%3D","line":214,"in_reply_to":"AAAAU3%2F%2FyBI%3D","updated":"2014-02-25 07:18:54.000000000","message":"Why clamping is needed?","commit_id":"da704b1ab647dc96e13766dcf484cfbe14b7885f"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"9f1281ce6e2d9cac4967eb25297cf4cb64d93b0c","unresolved":false,"context_lines":[{"line_number":218,"context_line":"            if max_agents \u003c min_agents:"},{"line_number":219,"context_line":"                raise HANotEnoughAvailableAgents()"},{"line_number":220,"context_line":""},{"line_number":221,"context_line":"            for index in range(max_agents):"},{"line_number":222,"context_line":"                device_name \u003d \u0027HA Router VRRP port %s\u0027 % index"},{"line_number":223,"context_line":""},{"line_number":224,"context_line":"                port \u003d self._core_plugin.create_port(context, {"}],"source_content_type":"text/x-python","patch_set":23,"id":"AAAAU3%2F%2FyAE%3D","line":221,"updated":"2014-02-24 20:35:54.000000000","message":"I think min_agents, max_agents, and l3_agents should be set and remain constant to improve the clarity of this code.  Use a fourth variable (maybe called num_agents) and set it based on values from the other three constants.   Iterate on it here.\n\nfor index in range(num_agents):","commit_id":"da704b1ab647dc96e13766dcf484cfbe14b7885f"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"change_message_id":"5d2d349a1b348670f32a3e32af6f7ed43ad82635","unresolved":false,"context_lines":[{"line_number":218,"context_line":"            if max_agents \u003c min_agents:"},{"line_number":219,"context_line":"                raise HANotEnoughAvailableAgents()"},{"line_number":220,"context_line":""},{"line_number":221,"context_line":"            for index in range(max_agents):"},{"line_number":222,"context_line":"                device_name \u003d \u0027HA Router VRRP port %s\u0027 % index"},{"line_number":223,"context_line":""},{"line_number":224,"context_line":"                port \u003d self._core_plugin.create_port(context, {"}],"source_content_type":"text/x-python","patch_set":23,"id":"AAAAU3%2F%2FZqY%3D","line":221,"in_reply_to":"AAAAU3%2F%2Fs18%3D","updated":"2014-02-26 21:30:18.000000000","message":"Done","commit_id":"da704b1ab647dc96e13766dcf484cfbe14b7885f"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"afd188b1b00685652b24fdb33aef1808b09ce03d","unresolved":false,"context_lines":[{"line_number":218,"context_line":"            if max_agents \u003c min_agents:"},{"line_number":219,"context_line":"                raise HANotEnoughAvailableAgents()"},{"line_number":220,"context_line":""},{"line_number":221,"context_line":"            for index in range(max_agents):"},{"line_number":222,"context_line":"                device_name \u003d \u0027HA Router VRRP port %s\u0027 % index"},{"line_number":223,"context_line":""},{"line_number":224,"context_line":"                port \u003d self._core_plugin.create_port(context, {"}],"source_content_type":"text/x-python","patch_set":23,"id":"AAAAU3%2F%2Fs18%3D","line":221,"in_reply_to":"AAAAU3%2F%2FyAE%3D","updated":"2014-02-25 07:18:54.000000000","message":"agree","commit_id":"da704b1ab647dc96e13766dcf484cfbe14b7885f"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"change_message_id":"8a3ed030e8c0b3bac2c76e2914e0e4ae0945cb55","unresolved":false,"context_lines":[{"line_number":145,"context_line":"                l3_db.Router.tenant_id \u003d\u003d router.tenant_id)"},{"line_number":146,"context_line":""},{"line_number":147,"context_line":"            allocated_vr_ids \u003d set([r[\u0027ha_vr_id\u0027] for r in query])"},{"line_number":148,"context_line":"            available_vr_ids \u003d VR_ID_RANGE - allocated_vr_ids"},{"line_number":149,"context_line":"            if not available_vr_ids:"},{"line_number":150,"context_line":"                raise NoVRIDAvailable()"},{"line_number":151,"context_line":""}],"source_content_type":"text/x-python","patch_set":34,"id":"AAAAWn%2F%2F%2Bsk%3D","line":148,"updated":"2014-04-08 05:46:11.000000000","message":"Does it mean we could have only up to 255 HA routers?","commit_id":"85df18755deab7e3dd4fd6a6d955757f10fe4017"},{"author":{"_account_id":8907,"name":"Dmitry Shulyak","email":"dshulyak@mirantis.com","username":"dshulyak"},"change_message_id":"502da32f71bad507c0ee03466d2e6d2c88df0897","unresolved":false,"context_lines":[{"line_number":145,"context_line":"                l3_db.Router.tenant_id \u003d\u003d router.tenant_id)"},{"line_number":146,"context_line":""},{"line_number":147,"context_line":"            allocated_vr_ids \u003d set([r[\u0027ha_vr_id\u0027] for r in query])"},{"line_number":148,"context_line":"            available_vr_ids \u003d VR_ID_RANGE - allocated_vr_ids"},{"line_number":149,"context_line":"            if not available_vr_ids:"},{"line_number":150,"context_line":"                raise NoVRIDAvailable()"},{"line_number":151,"context_line":""}],"source_content_type":"text/x-python","patch_set":34,"id":"AAAAWn%2F%2F9oA%3D","line":148,"in_reply_to":"AAAAWn%2F%2F%2Bsk%3D","updated":"2014-04-08 08:50:26.000000000","message":"yes, but per tenant\n\ni guess it should depend on provided cidr for l3_ha network","commit_id":"85df18755deab7e3dd4fd6a6d955757f10fe4017"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"change_message_id":"d1c0b36d6101eb51e3e61db56b995ec46ef9ef90","unresolved":false,"context_lines":[{"line_number":145,"context_line":"                l3_db.Router.tenant_id \u003d\u003d router.tenant_id)"},{"line_number":146,"context_line":""},{"line_number":147,"context_line":"            allocated_vr_ids \u003d set([r[\u0027ha_vr_id\u0027] for r in query])"},{"line_number":148,"context_line":"            available_vr_ids \u003d VR_ID_RANGE - allocated_vr_ids"},{"line_number":149,"context_line":"            if not available_vr_ids:"},{"line_number":150,"context_line":"                raise NoVRIDAvailable()"},{"line_number":151,"context_line":""}],"source_content_type":"text/x-python","patch_set":34,"id":"AAAAWn%2F%2F9J8%3D","line":148,"in_reply_to":"AAAAWn%2F%2F9oA%3D","updated":"2014-04-08 09:09:47.000000000","message":"Yes, got it.","commit_id":"85df18755deab7e3dd4fd6a6d955757f10fe4017"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"change_message_id":"a4d74e15b9ec069892f704340b23e0a12e5c0bff","unresolved":false,"context_lines":[{"line_number":272,"context_line":"                    self._core_plugin._delete_port(context.elevated(),"},{"line_number":273,"context_line":"                                                   port[\u0027id\u0027])"},{"line_number":274,"context_line":""},{"line_number":275,"context_line":"        return super(L3_HA_NAT_db_mixin, self).delete_router(context, id)"},{"line_number":276,"context_line":""},{"line_number":277,"context_line":"    def get_router_port_binding(self, context, router_ids, host\u003dNone):"},{"line_number":278,"context_line":"        query \u003d context.session.query("}],"source_content_type":"text/x-python","patch_set":34,"id":"AAAAWn%2F%2F9SE%3D","line":275,"updated":"2014-04-08 09:07:19.000000000","message":"put it into the transaction of 266","commit_id":"85df18755deab7e3dd4fd6a6d955757f10fe4017"},{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"change_message_id":"a4d74e15b9ec069892f704340b23e0a12e5c0bff","unresolved":false,"context_lines":[{"line_number":332,"context_line":""},{"line_number":333,"context_line":"        return routers_dict.values()"},{"line_number":334,"context_line":""},{"line_number":335,"context_line":"    def get_sync_data(self, context, router_ids\u003dNone, active\u003dNone, host\u003dNone):"},{"line_number":336,"context_line":"        sync_data \u003d super(L3_HA_NAT_db_mixin, self).get_sync_data(context,"},{"line_number":337,"context_line":"                                                                  router_ids,"},{"line_number":338,"context_line":"                                                                  active)"}],"source_content_type":"text/x-python","patch_set":34,"id":"AAAAWn%2F%2F9OE%3D","line":335,"updated":"2014-04-08 09:07:19.000000000","message":"when we will have host\u003dNone?","commit_id":"85df18755deab7e3dd4fd6a6d955757f10fe4017"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"change_message_id":"53cfdf6b3104e50ffeadba9acf070fcda27e6e43","unresolved":false,"context_lines":[{"line_number":32,"context_line":"from neutron.extensions import l3_ext_ha_mode as l3_ha"},{"line_number":33,"context_line":"from neutron.openstack.common import log as logging"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"VR_ID_RANGE \u003d set(range(1, 255))"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":38,"context_line":""}],"source_content_type":"text/x-python","patch_set":35,"id":"AAAAXH%2F%2FXfs%3D","line":35,"updated":"2014-04-22 09:25:14.000000000","message":"This limit is due to the VRRP protocol, the VRRP id is a 8bits field. If the IP range is lower than the VRRP id range a exception will be raised when ports are created.","commit_id":"a3fbab16d1c099ee9ff8fc5b47a2629cf0a1a0df"},{"author":{"_account_id":8907,"name":"Dmitry Shulyak","email":"dshulyak@mirantis.com","username":"dshulyak"},"change_message_id":"f17661fffb38b16687c7a492c72563bbe5e91e34","unresolved":false,"context_lines":[{"line_number":32,"context_line":"from neutron.extensions import l3_ext_ha_mode as l3_ha"},{"line_number":33,"context_line":"from neutron.openstack.common import log as logging"},{"line_number":34,"context_line":""},{"line_number":35,"context_line":"VR_ID_RANGE \u003d set(range(1, 255))"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":38,"context_line":""}],"source_content_type":"text/x-python","patch_set":35,"id":"AAAAW3%2F%2FVKQ%3D","line":35,"updated":"2014-04-15 10:45:56.000000000","message":"VR_ID_RANGE should depend on provided cidr for l3_ha_net_cidr ?","commit_id":"a3fbab16d1c099ee9ff8fc5b47a2629cf0a1a0df"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"f6ace64e3204d6290b3de69adc5fb20f4f387456","unresolved":false,"context_lines":[{"line_number":59,"context_line":"        sa.Column(sa.Integer()))"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"class NoVRIDAvailable(exceptions.NeutronException):"},{"line_number":63,"context_line":"    message \u003d _(\"No more Virtual Router Identifier (VRID) available, \""},{"line_number":64,"context_line":"                \"the limit of number of HA Routers per tenant is 254 due to \""},{"line_number":65,"context_line":"                \"the size of the VRID field of the VRRP protocol.\")"}],"source_content_type":"text/x-python","patch_set":35,"id":"AAAAXH%2F%2FFDo%3D","line":62,"updated":"2014-04-24 10:12:01.000000000","message":"I think usually exceptions are defined in extension module.","commit_id":"a3fbab16d1c099ee9ff8fc5b47a2629cf0a1a0df"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"f6ace64e3204d6290b3de69adc5fb20f4f387456","unresolved":false,"context_lines":[{"line_number":67,"context_line":""},{"line_number":68,"context_line":"class HANetworkCIDRNotValid(exceptions.NeutronException):"},{"line_number":69,"context_line":"    message \u003d _(\"The HA Network cidr specified in the configuration file\""},{"line_number":70,"context_line":"                \" isn\u0027t valid; %(cidr)s\")"},{"line_number":71,"context_line":""},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"class HANotEnoughAvailableAgents(exceptions.NeutronException):"}],"source_content_type":"text/x-python","patch_set":35,"id":"AAAAXH%2F%2FFDY%3D","line":70,"updated":"2014-04-24 10:12:01.000000000","message":"nit: put space at the end of previous line","commit_id":"a3fbab16d1c099ee9ff8fc5b47a2629cf0a1a0df"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"507fc602ea30185b68087fc28df0b6a33e002bf5","unresolved":false,"context_lines":[{"line_number":31,"context_line":"from neutron.extensions import l3_ext_ha_mode as l3_ha"},{"line_number":32,"context_line":"from neutron.openstack.common import log as logging"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"VR_ID_RANGE \u003d set(range(1, 255))"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":37,"context_line":""}],"source_content_type":"text/x-python","patch_set":36,"id":"1ae5cdf2_9cd6bd4d","line":34,"updated":"2014-06-05 21:42:54.000000000","message":"the fact that the range is exposed here is a leak of implementation details. In the blueprint implementation you mentioned that the 255 upper limit may apply to certain drivers rather than others I think it would be more appropriate if this was encapsulated in the keepalived implementation","commit_id":"a8ef318e37de5977cc40d3d3e6ec3808d8d66200"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"change_message_id":"15b0966afa02b71e815e3636eb2dc8d86bfc6fcb","unresolved":false,"context_lines":[{"line_number":31,"context_line":"from neutron.extensions import l3_ext_ha_mode as l3_ha"},{"line_number":32,"context_line":"from neutron.openstack.common import log as logging"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"VR_ID_RANGE \u003d set(range(1, 255))"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":37,"context_line":""}],"source_content_type":"text/x-python","patch_set":36,"id":"1ae5cdf2_b3b2ba91","line":34,"in_reply_to":"1ae5cdf2_9cd6bd4d","updated":"2014-06-06 09:40:39.000000000","message":"I could associate this limitation to a field on the configuration field of the router saying which HA implementation is used by the agent. In the case of use keepalived the limitation will be this one.","commit_id":"a8ef318e37de5977cc40d3d3e6ec3808d8d66200"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"65c728919e5c2b29be409d8df13c61054ad4ba49","unresolved":false,"context_lines":[{"line_number":31,"context_line":"from neutron.extensions import l3_ext_ha_mode as l3_ha"},{"line_number":32,"context_line":"from neutron.openstack.common import log as logging"},{"line_number":33,"context_line":""},{"line_number":34,"context_line":"VR_ID_RANGE \u003d set(range(1, 255))"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"LOG \u003d logging.getLogger(__name__)"},{"line_number":37,"context_line":""}],"source_content_type":"text/x-python","patch_set":36,"id":"1ae5cdf2_d8fafe41","line":34,"in_reply_to":"1ae5cdf2_b3b2ba91","updated":"2014-06-06 11:22:09.000000000","message":"that would work.","commit_id":"a8ef318e37de5977cc40d3d3e6ec3808d8d66200"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"507fc602ea30185b68087fc28df0b6a33e002bf5","unresolved":false,"context_lines":[{"line_number":54,"context_line":"cfg.CONF.register_opts(L3_HA_OPTS)"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"# Modify the Router Data Model adding the virtual router id"},{"line_number":57,"context_line":"setattr(l3_db.Router, \u0027ha_vr_id\u0027,"},{"line_number":58,"context_line":"        sa.Column(sa.Integer()))"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":""}],"source_content_type":"text/x-python","patch_set":36,"id":"1ae5cdf2_41053212","line":57,"updated":"2014-06-05 21:42:54.000000000","message":"As per our discussion on IRC, I think that setting attributes like this is prone to errors and unexpected behavior in plugin classes that use Router. Also, I am not sure we\u0027d want to associate this to the router rather than the L3HARouterAgentPortBinding (even though this way the schema would become denormalized, but that\u0027s moot).\n\nAnother solution would be to just store a ha bool that marks the router as Highly Available (like the distributed attribute), which abstract the underlying VRRP implementation detail. If we didn\u0027t store the vr_id (which would simplify the model quite a bit, keep on reading) we need to devise a way to keep track of vr_id from the agent side, but I think we\u0027d be a lot better off doing this rather than doing this server-side. On the agent-side we can think of clever ways to keep a consistent view of vr_ids.\n\nBottom line of my digression is this: I find hard to justify the cost of maintaining and processing the vr-id\u0027s, when this is an implementation-dependent bottleneck that might be removed at some point in the future. I think it would be more beneficial to encapsulate this complexity closer to the keepalived implementation where this detail belongs.","commit_id":"a8ef318e37de5977cc40d3d3e6ec3808d8d66200"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"change_message_id":"18e145d2a8c2ce0081bd5917be4b2a86a31bb807","unresolved":false,"context_lines":[{"line_number":54,"context_line":"cfg.CONF.register_opts(L3_HA_OPTS)"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"# Modify the Router Data Model adding the virtual router id"},{"line_number":57,"context_line":"setattr(l3_db.Router, \u0027ha_vr_id\u0027,"},{"line_number":58,"context_line":"        sa.Column(sa.Integer()))"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":""}],"source_content_type":"text/x-python","patch_set":36,"id":"1ae5cdf2_f001536e","line":57,"in_reply_to":"1ae5cdf2_38c202e9","updated":"2014-06-24 11:56:56.000000000","message":"Armando, I can propose something like that :\n\nfor each HA router creation, we could send all ha router ids to agents, so that each agent could build/maintain a local map for each tenant/ha network of the couple router id/vrrp id ?\n\nIf it is ok for you I will update the specs this way ?","commit_id":"a8ef318e37de5977cc40d3d3e6ec3808d8d66200"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"change_message_id":"15b0966afa02b71e815e3636eb2dc8d86bfc6fcb","unresolved":false,"context_lines":[{"line_number":54,"context_line":"cfg.CONF.register_opts(L3_HA_OPTS)"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"# Modify the Router Data Model adding the virtual router id"},{"line_number":57,"context_line":"setattr(l3_db.Router, \u0027ha_vr_id\u0027,"},{"line_number":58,"context_line":"        sa.Column(sa.Integer()))"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":""}],"source_content_type":"text/x-python","patch_set":36,"id":"1ae5cdf2_aeb17148","line":57,"in_reply_to":"1ae5cdf2_41053212","updated":"2014-06-06 09:40:39.000000000","message":"I almost agree, ok for the boolean.\n\nFor the vr-ids, We still need to have a consensus mechanism and this implementation is a first step, could be improved later IMO.\n \nMaintaining/processing vr-ids is not so costly, since I can\u0027t image a tenant with a big number of router (the limitation of 255 is per tenant). For now I can\u0027t image a mechanism to elect a vr-id less costly than request few line in the database per tenant.","commit_id":"a8ef318e37de5977cc40d3d3e6ec3808d8d66200"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"65c728919e5c2b29be409d8df13c61054ad4ba49","unresolved":false,"context_lines":[{"line_number":54,"context_line":"cfg.CONF.register_opts(L3_HA_OPTS)"},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"# Modify the Router Data Model adding the virtual router id"},{"line_number":57,"context_line":"setattr(l3_db.Router, \u0027ha_vr_id\u0027,"},{"line_number":58,"context_line":"        sa.Column(sa.Integer()))"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":""}],"source_content_type":"text/x-python","patch_set":36,"id":"1ae5cdf2_38c202e9","line":57,"in_reply_to":"1ae5cdf2_aeb17148","updated":"2014-06-06 11:22:09.000000000","message":"Why improving later? This is a key concept and it affects the way the implementation is shaped. I think this must be addressed now.\n\nMaintaining/processing is costly for a number of reasons:\n\n1) for performance reasons (see query comment below)\n2) because at some point this needs to be removed (so engineering effort)","commit_id":"a8ef318e37de5977cc40d3d3e6ec3808d8d66200"},{"author":{"_account_id":9820,"name":"Liping Mao","email":"limao@cisco.com","username":"LipingMao"},"change_message_id":"c35b4a4bec378209d43419058ab6f22933109a32","unresolved":false,"context_lines":[{"line_number":55,"context_line":""},{"line_number":56,"context_line":"# Modify the Router Data Model adding the virtual router id"},{"line_number":57,"context_line":"setattr(l3_db.Router, \u0027ha_vr_id\u0027,"},{"line_number":58,"context_line":"        sa.Column(sa.Integer()))"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"class L3HARouterAgentPortBinding(model_base.BASEV2):"}],"source_content_type":"text/x-python","patch_set":36,"id":"baada198_6b75bb30","line":58,"updated":"2014-07-07 09:48:02.000000000","message":"Hi Sylvain,\n\nI\u0027m a newer to l3-ha, a basic question about ha_vr_id.\nIf this is the VRID, then the MAC of the VIP will be \"00-00-5E-00-01-{VRID}\"\n\nThen if we have different tenant with the same VRID, and there Master Router is on different network node. And the network node and compute node is using ML2 (OVS + VLAN). It seems like that the physical switch which connect the network nodes and compute nodes will see the same MAC(00-00-5E-00-01-{VRID} ) on different switch port.(Different Network Node will be connected to different Physical Switch Port).\n\nI think this will cause Switches MAC Table thrashing...\nWhat do you think about this?","commit_id":"a8ef318e37de5977cc40d3d3e6ec3808d8d66200"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"change_message_id":"9aadfc3169d2c4e8c1d0d4c6d4cc07d6f8d25f86","unresolved":false,"context_lines":[{"line_number":55,"context_line":""},{"line_number":56,"context_line":"# Modify the Router Data Model adding the virtual router id"},{"line_number":57,"context_line":"setattr(l3_db.Router, \u0027ha_vr_id\u0027,"},{"line_number":58,"context_line":"        sa.Column(sa.Integer()))"},{"line_number":59,"context_line":""},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"class L3HARouterAgentPortBinding(model_base.BASEV2):"}],"source_content_type":"text/x-python","patch_set":36,"id":"baada198_ae3436fc","line":58,"in_reply_to":"baada198_6b75bb30","updated":"2014-07-07 15:22:09.000000000","message":"Hi, \n\nyes that\u0027s why the MAC address will be generated like the other one, not from the usual VRRP pattern.","commit_id":"a8ef318e37de5977cc40d3d3e6ec3808d8d66200"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"507fc602ea30185b68087fc28df0b6a33e002bf5","unresolved":false,"context_lines":[{"line_number":82,"context_line":"                                          ondelete\u003d\u0027CASCADE\u0027))"},{"line_number":83,"context_line":"    agent \u003d orm.relationship(agents_db.Agent)"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"    priority \u003d sa.Column(sa.Integer, default\u003d50)"},{"line_number":86,"context_line":"    state \u003d sa.Column(sa.Enum(\u0027master\u0027, \u0027slave\u0027, name\u003d\u0027l3_ha_states\u0027),"},{"line_number":87,"context_line":"                      default\u003d\u0027slave\u0027)"},{"line_number":88,"context_line":""}],"source_content_type":"text/x-python","patch_set":36,"id":"1ae5cdf2_103371f6","line":85,"updated":"2014-06-05 21:42:54.000000000","message":"this also spills some underlying details, and could really be randomly generated; as per [1], this is used for master election and so long is uniformly spread we don\u0027t really need to store it.\n\n[1] http://linux.die.net/man/5/keepalived.conf","commit_id":"a8ef318e37de5977cc40d3d3e6ec3808d8d66200"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"change_message_id":"15b0966afa02b71e815e3636eb2dc8d86bfc6fcb","unresolved":false,"context_lines":[{"line_number":82,"context_line":"                                          ondelete\u003d\u0027CASCADE\u0027))"},{"line_number":83,"context_line":"    agent \u003d orm.relationship(agents_db.Agent)"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"    priority \u003d sa.Column(sa.Integer, default\u003d50)"},{"line_number":86,"context_line":"    state \u003d sa.Column(sa.Enum(\u0027master\u0027, \u0027slave\u0027, name\u003d\u0027l3_ha_states\u0027),"},{"line_number":87,"context_line":"                      default\u003d\u0027slave\u0027)"},{"line_number":88,"context_line":""}],"source_content_type":"text/x-python","patch_set":36,"id":"1ae5cdf2_8e7e7568","line":85,"in_reply_to":"1ae5cdf2_103371f6","updated":"2014-06-06 09:40:39.000000000","message":"Yes was used in few patches ago, I will remove this field","commit_id":"a8ef318e37de5977cc40d3d3e6ec3808d8d66200"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"507fc602ea30185b68087fc28df0b6a33e002bf5","unresolved":false,"context_lines":[{"line_number":99,"context_line":""},{"line_number":100,"context_line":"    network_id \u003d sa.Column(sa.String(36),"},{"line_number":101,"context_line":"                           sa.ForeignKey(\u0027networks.id\u0027, ondelete\u003d\"CASCADE\"),"},{"line_number":102,"context_line":"                           nullable\u003dFalse, unique\u003dTrue)"},{"line_number":103,"context_line":""},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"class L3_HA_NAT_db_mixin(l3_gwmode_db.L3_NAT_db_mixin):"}],"source_content_type":"text/x-python","patch_set":36,"id":"1ae5cdf2_bc1ff959","line":102,"updated":"2014-06-05 21:42:54.000000000","message":"unique here is not necessary, I think","commit_id":"a8ef318e37de5977cc40d3d3e6ec3808d8d66200"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"65c728919e5c2b29be409d8df13c61054ad4ba49","unresolved":false,"context_lines":[{"line_number":99,"context_line":""},{"line_number":100,"context_line":"    network_id \u003d sa.Column(sa.String(36),"},{"line_number":101,"context_line":"                           sa.ForeignKey(\u0027networks.id\u0027, ondelete\u003d\"CASCADE\"),"},{"line_number":102,"context_line":"                           nullable\u003dFalse, unique\u003dTrue)"},{"line_number":103,"context_line":""},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"class L3_HA_NAT_db_mixin(l3_gwmode_db.L3_NAT_db_mixin):"}],"source_content_type":"text/x-python","patch_set":36,"id":"1ae5cdf2_d8a83e22","line":102,"in_reply_to":"1ae5cdf2_4ed62d50","updated":"2014-06-06 11:22:09.000000000","message":"and a unique here won\u0027t guarantee you that!! network_id is already unique is a foreign key!!!","commit_id":"a8ef318e37de5977cc40d3d3e6ec3808d8d66200"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"change_message_id":"15b0966afa02b71e815e3636eb2dc8d86bfc6fcb","unresolved":false,"context_lines":[{"line_number":99,"context_line":""},{"line_number":100,"context_line":"    network_id \u003d sa.Column(sa.String(36),"},{"line_number":101,"context_line":"                           sa.ForeignKey(\u0027networks.id\u0027, ondelete\u003d\"CASCADE\"),"},{"line_number":102,"context_line":"                           nullable\u003dFalse, unique\u003dTrue)"},{"line_number":103,"context_line":""},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"class L3_HA_NAT_db_mixin(l3_gwmode_db.L3_NAT_db_mixin):"}],"source_content_type":"text/x-python","patch_set":36,"id":"1ae5cdf2_4ed62d50","line":102,"in_reply_to":"1ae5cdf2_bc1ff959","updated":"2014-06-06 09:40:39.000000000","message":"? I want to be sure to have only one HA network per tenant (as a first implementation)","commit_id":"a8ef318e37de5977cc40d3d3e6ec3808d8d66200"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"change_message_id":"843922b4f08fe6e58fbe858c95e452c456f1adfc","unresolved":false,"context_lines":[{"line_number":99,"context_line":""},{"line_number":100,"context_line":"    network_id \u003d sa.Column(sa.String(36),"},{"line_number":101,"context_line":"                           sa.ForeignKey(\u0027networks.id\u0027, ondelete\u003d\"CASCADE\"),"},{"line_number":102,"context_line":"                           nullable\u003dFalse, unique\u003dTrue)"},{"line_number":103,"context_line":""},{"line_number":104,"context_line":""},{"line_number":105,"context_line":"class L3_HA_NAT_db_mixin(l3_gwmode_db.L3_NAT_db_mixin):"}],"source_content_type":"text/x-python","patch_set":36,"id":"1ae5cdf2_f6426ba9","line":102,"in_reply_to":"1ae5cdf2_d8a83e22","updated":"2014-06-06 12:08:34.000000000","message":"Yes you\u0027re right","commit_id":"a8ef318e37de5977cc40d3d3e6ec3808d8d66200"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"507fc602ea30185b68087fc28df0b6a33e002bf5","unresolved":false,"context_lines":[{"line_number":125,"context_line":"            query \u003d context.session.query(l3_db.Router).filter("},{"line_number":126,"context_line":"                l3_db.Router.tenant_id \u003d\u003d router.tenant_id)"},{"line_number":127,"context_line":""},{"line_number":128,"context_line":"            allocated_vr_ids \u003d set([r[\u0027ha_vr_id\u0027] for r in query])"},{"line_number":129,"context_line":"            available_vr_ids \u003d VR_ID_RANGE - allocated_vr_ids"},{"line_number":130,"context_line":"            if not available_vr_ids:"},{"line_number":131,"context_line":"                raise l3_ha.NoVRIDAvailable()"}],"source_content_type":"text/x-python","patch_set":36,"id":"1ae5cdf2_1c662ded","line":128,"updated":"2014-06-05 21:42:54.000000000","message":"Doing this query is highly inefficient, wouldn\u0027t be better to do a select count(*) and see if we are \u003c\u003d 255? I appreciate that we need to pick the next available vr_id, but I am wondering whether we should offload such a task to the agent-side, where the VRRP implementation based on keepalived is going to be. This is stealing precious CPU and IO cycles. See my comments above.","commit_id":"a8ef318e37de5977cc40d3d3e6ec3808d8d66200"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"change_message_id":"843922b4f08fe6e58fbe858c95e452c456f1adfc","unresolved":false,"context_lines":[{"line_number":125,"context_line":"            query \u003d context.session.query(l3_db.Router).filter("},{"line_number":126,"context_line":"                l3_db.Router.tenant_id \u003d\u003d router.tenant_id)"},{"line_number":127,"context_line":""},{"line_number":128,"context_line":"            allocated_vr_ids \u003d set([r[\u0027ha_vr_id\u0027] for r in query])"},{"line_number":129,"context_line":"            available_vr_ids \u003d VR_ID_RANGE - allocated_vr_ids"},{"line_number":130,"context_line":"            if not available_vr_ids:"},{"line_number":131,"context_line":"                raise l3_ha.NoVRIDAvailable()"}],"source_content_type":"text/x-python","patch_set":36,"id":"1ae5cdf2_f6eb4ba1","line":128,"in_reply_to":"1ae5cdf2_1c662ded","updated":"2014-06-06 12:08:34.000000000","message":"Just to elaborate a bit on this. We are requesting only routers for a specific tenant, so the number of elements in the set should be low.","commit_id":"a8ef318e37de5977cc40d3d3e6ec3808d8d66200"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"acf8d666edde030a0768d6497d6bfbc930e6c036","unresolved":false,"context_lines":[{"line_number":125,"context_line":"            query \u003d context.session.query(l3_db.Router).filter("},{"line_number":126,"context_line":"                l3_db.Router.tenant_id \u003d\u003d router.tenant_id)"},{"line_number":127,"context_line":""},{"line_number":128,"context_line":"            allocated_vr_ids \u003d set([r[\u0027ha_vr_id\u0027] for r in query])"},{"line_number":129,"context_line":"            available_vr_ids \u003d VR_ID_RANGE - allocated_vr_ids"},{"line_number":130,"context_line":"            if not available_vr_ids:"},{"line_number":131,"context_line":"                raise l3_ha.NoVRIDAvailable()"}],"source_content_type":"text/x-python","patch_set":36,"id":"1ae5cdf2_acf5f483","line":128,"in_reply_to":"1ae5cdf2_f6eb4ba1","updated":"2014-06-06 12:56:36.000000000","message":"correct, but you are iterating over a resultset, that\u0027s still more expensive than not doing it at all, namely not track vr ids in the db at all.\n\nWe could still ensure an upper bound limit by doing a select count(*) or setting a new quota element.","commit_id":"a8ef318e37de5977cc40d3d3e6ec3808d8d66200"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"507fc602ea30185b68087fc28df0b6a33e002bf5","unresolved":false,"context_lines":[{"line_number":132,"context_line":""},{"line_number":133,"context_line":"            router.ha_vr_id \u003d available_vr_ids.pop()"},{"line_number":134,"context_line":""},{"line_number":135,"context_line":"    def _get_or_create_ha_network_subnet(self, context, tenant_id):"},{"line_number":136,"context_line":"        ha_cidr \u003d cfg.CONF.l3_ha_net_cidr"},{"line_number":137,"context_line":"        net \u003d netaddr.IPNetwork(ha_cidr)"},{"line_number":138,"context_line":""}],"source_content_type":"text/x-python","patch_set":36,"id":"1ae5cdf2_fc226150","line":135,"updated":"2014-06-05 21:42:54.000000000","message":"please refrain from providing methods like these: get_or_create is a code smell; do either get or create, not both.","commit_id":"a8ef318e37de5977cc40d3d3e6ec3808d8d66200"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"change_message_id":"15b0966afa02b71e815e3636eb2dc8d86bfc6fcb","unresolved":false,"context_lines":[{"line_number":132,"context_line":""},{"line_number":133,"context_line":"            router.ha_vr_id \u003d available_vr_ids.pop()"},{"line_number":134,"context_line":""},{"line_number":135,"context_line":"    def _get_or_create_ha_network_subnet(self, context, tenant_id):"},{"line_number":136,"context_line":"        ha_cidr \u003d cfg.CONF.l3_ha_net_cidr"},{"line_number":137,"context_line":"        net \u003d netaddr.IPNetwork(ha_cidr)"},{"line_number":138,"context_line":""}],"source_content_type":"text/x-python","patch_set":36,"id":"1ae5cdf2_ae4df13f","line":135,"in_reply_to":"1ae5cdf2_fc226150","updated":"2014-06-06 09:40:39.000000000","message":"I\u0027ll do","commit_id":"a8ef318e37de5977cc40d3d3e6ec3808d8d66200"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"507fc602ea30185b68087fc28df0b6a33e002bf5","unresolved":false,"context_lines":[{"line_number":180,"context_line":"                                                           router[\u0027tenant_id\u0027])"},{"line_number":181,"context_line":"            router_id \u003d router[\u0027id\u0027]"},{"line_number":182,"context_line":""},{"line_number":183,"context_line":"            min_agents \u003d cfg.CONF.min_l3_agents_per_router"},{"line_number":184,"context_line":"            # TODO(safchain): use oslo.config types to check the validity"},{"line_number":185,"context_line":"            # when it will be available"},{"line_number":186,"context_line":"            if min_agents \u003c 2:"}],"source_content_type":"text/x-python","patch_set":36,"id":"1ae5cdf2_b0f55dee","line":183,"updated":"2014-06-05 21:42:54.000000000","message":"suggestion: extract validation in its own code","commit_id":"a8ef318e37de5977cc40d3d3e6ec3808d8d66200"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"change_message_id":"15b0966afa02b71e815e3636eb2dc8d86bfc6fcb","unresolved":false,"context_lines":[{"line_number":180,"context_line":"                                                           router[\u0027tenant_id\u0027])"},{"line_number":181,"context_line":"            router_id \u003d router[\u0027id\u0027]"},{"line_number":182,"context_line":""},{"line_number":183,"context_line":"            min_agents \u003d cfg.CONF.min_l3_agents_per_router"},{"line_number":184,"context_line":"            # TODO(safchain): use oslo.config types to check the validity"},{"line_number":185,"context_line":"            # when it will be available"},{"line_number":186,"context_line":"            if min_agents \u003c 2:"}],"source_content_type":"text/x-python","patch_set":36,"id":"1ae5cdf2_ce487d2f","line":183,"in_reply_to":"1ae5cdf2_b0f55dee","updated":"2014-06-06 09:40:39.000000000","message":"I\u0027ll do","commit_id":"a8ef318e37de5977cc40d3d3e6ec3808d8d66200"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"507fc602ea30185b68087fc28df0b6a33e002bf5","unresolved":false,"context_lines":[{"line_number":254,"context_line":"                device_filter \u003d {\u0027device_id\u0027: [id],"},{"line_number":255,"context_line":"                                 \u0027device_owner\u0027:"},{"line_number":256,"context_line":"                                 [constants.DEVICE_OWNER_ROUTER_HA_INTF]}"},{"line_number":257,"context_line":"                ports \u003d self._core_plugin.get_ports(context.elevated(),"},{"line_number":258,"context_line":"                                                    filters\u003ddevice_filter)"},{"line_number":259,"context_line":"                for port in ports:"},{"line_number":260,"context_line":"                    self._core_plugin._delete_port(context.elevated(),"}],"source_content_type":"text/x-python","patch_set":36,"id":"1ae5cdf2_70d67550","line":257,"updated":"2014-06-05 21:42:54.000000000","message":"context.elevated is expensive. Please, do it once and reuse the context.","commit_id":"a8ef318e37de5977cc40d3d3e6ec3808d8d66200"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"change_message_id":"15b0966afa02b71e815e3636eb2dc8d86bfc6fcb","unresolved":false,"context_lines":[{"line_number":254,"context_line":"                device_filter \u003d {\u0027device_id\u0027: [id],"},{"line_number":255,"context_line":"                                 \u0027device_owner\u0027:"},{"line_number":256,"context_line":"                                 [constants.DEVICE_OWNER_ROUTER_HA_INTF]}"},{"line_number":257,"context_line":"                ports \u003d self._core_plugin.get_ports(context.elevated(),"},{"line_number":258,"context_line":"                                                    filters\u003ddevice_filter)"},{"line_number":259,"context_line":"                for port in ports:"},{"line_number":260,"context_line":"                    self._core_plugin._delete_port(context.elevated(),"}],"source_content_type":"text/x-python","patch_set":36,"id":"1ae5cdf2_2e61e1a8","line":257,"in_reply_to":"1ae5cdf2_70d67550","updated":"2014-06-06 09:40:39.000000000","message":"Good point, I\u0027ll do","commit_id":"a8ef318e37de5977cc40d3d3e6ec3808d8d66200"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"156c3e5648a10298c3ac342e03f06a81017c49c9","unresolved":false,"context_lines":[{"line_number":52,"context_line":"]"},{"line_number":53,"context_line":"cfg.CONF.register_opts(L3_HA_OPTS)"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"# TODO(safchain) move this to the extra table when the DVR patch will"},{"line_number":56,"context_line":"# be merged"},{"line_number":57,"context_line":"setattr(l3_db.Router, \u0027ha\u0027,"},{"line_number":58,"context_line":"        sa.Column(sa.Boolean(), default\u003dFalse, nullable\u003dFalse))"}],"source_content_type":"text/x-python","patch_set":37,"id":"baada198_a456e004","line":55,"updated":"2014-07-08 19:48:23.000000000","message":"why not rebase this on top of:\n\nhttps://review.openstack.org/#/c/84223/","commit_id":"fc4ca44ae616a07159e8cab1b54e9cd887220daa"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"change_message_id":"15fb965d0196823005c8544634d4eebe4c066932","unresolved":false,"context_lines":[{"line_number":52,"context_line":"]"},{"line_number":53,"context_line":"cfg.CONF.register_opts(L3_HA_OPTS)"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"# TODO(safchain) move this to the extra table when the DVR patch will"},{"line_number":56,"context_line":"# be merged"},{"line_number":57,"context_line":"setattr(l3_db.Router, \u0027ha\u0027,"},{"line_number":58,"context_line":"        sa.Column(sa.Boolean(), default\u003dFalse, nullable\u003dFalse))"}],"source_content_type":"text/x-python","patch_set":37,"id":"baada198_31e3ed06","line":55,"in_reply_to":"baada198_a456e004","updated":"2014-07-08 20:54:49.000000000","message":"I\u0027ll do","commit_id":"fc4ca44ae616a07159e8cab1b54e9cd887220daa"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"66d89c9e5fd89e6bedd405574b061f7ddc0b56f6","unresolved":false,"context_lines":[{"line_number":52,"context_line":"]"},{"line_number":53,"context_line":"cfg.CONF.register_opts(L3_HA_OPTS)"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"# TODO(safchain) move this to the extra table when the DVR patch will"},{"line_number":56,"context_line":"# be merged"},{"line_number":57,"context_line":"setattr(l3_db.Router, \u0027ha\u0027,"},{"line_number":58,"context_line":"        sa.Column(sa.Boolean(), default\u003dFalse, nullable\u003dFalse))"}],"source_content_type":"text/x-python","patch_set":39,"id":"baada198_1c3827d2","line":55,"updated":"2014-07-13 17:36:53.000000000","message":"I suggested you to rebase, you said you were going to but you did not.","commit_id":"e04dff1c37390051469829495a2632b5ef4ddbb0"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"change_message_id":"421ace75e5d6b38ec24bc4c28baacec6cbdeca09","unresolved":false,"context_lines":[{"line_number":52,"context_line":"]"},{"line_number":53,"context_line":"cfg.CONF.register_opts(L3_HA_OPTS)"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":"# TODO(safchain) move this to the extra table when the DVR patch will"},{"line_number":56,"context_line":"# be merged"},{"line_number":57,"context_line":"setattr(l3_db.Router, \u0027ha\u0027,"},{"line_number":58,"context_line":"        sa.Column(sa.Boolean(), default\u003dFalse, nullable\u003dFalse))"}],"source_content_type":"text/x-python","patch_set":39,"id":"baada198_843f4086","line":55,"in_reply_to":"baada198_1c3827d2","updated":"2014-07-15 11:26:21.000000000","message":"Yes Armando, I just didn\u0027t had the time","commit_id":"e04dff1c37390051469829495a2632b5ef4ddbb0"},{"author":{"_account_id":7249,"name":"Ann Taraday","email":"akamyshnikova@mirantis.com","username":"AKamyshnikova"},"change_message_id":"9229f054125e3fa1008fa7d0a7c9ece561251b9e","unresolved":false,"context_lines":[{"line_number":55,"context_line":"# TODO(safchain) move this to the extra table when the DVR patch will"},{"line_number":56,"context_line":"# be merged"},{"line_number":57,"context_line":"setattr(l3_db.Router, \u0027ha\u0027,"},{"line_number":58,"context_line":"        sa.Column(sa.Boolean(), default\u003dFalse, nullable\u003dFalse))"},{"line_number":59,"context_line":"setattr(l3_db.Router, \u0027ha_vr_id\u0027,"},{"line_number":60,"context_line":"        sa.Column(sa.Integer()))"},{"line_number":61,"context_line":""}],"source_content_type":"text/x-python","patch_set":39,"id":"baada198_9698271d","line":58,"updated":"2014-07-16 09:54:22.000000000","message":"Please add server_default\u003dsa.sql.false()","commit_id":"e04dff1c37390051469829495a2632b5ef4ddbb0"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"change_message_id":"f0b53dfab9e6a6236ebc25e63677f1b2c60c3d04","unresolved":false,"context_lines":[{"line_number":55,"context_line":"# TODO(safchain) move this to the extra table when the DVR patch will"},{"line_number":56,"context_line":"# be merged"},{"line_number":57,"context_line":"setattr(l3_db.Router, \u0027ha\u0027,"},{"line_number":58,"context_line":"        sa.Column(sa.Boolean(), default\u003dFalse, nullable\u003dFalse))"},{"line_number":59,"context_line":"setattr(l3_db.Router, \u0027ha_vr_id\u0027,"},{"line_number":60,"context_line":"        sa.Column(sa.Integer()))"},{"line_number":61,"context_line":""}],"source_content_type":"text/x-python","patch_set":39,"id":"baada198_884d0775","line":58,"in_reply_to":"baada198_9698271d","updated":"2014-07-18 18:31:34.000000000","message":"Done","commit_id":"e04dff1c37390051469829495a2632b5ef4ddbb0"},{"author":{"_account_id":7249,"name":"Ann Taraday","email":"akamyshnikova@mirantis.com","username":"AKamyshnikova"},"change_message_id":"9229f054125e3fa1008fa7d0a7c9ece561251b9e","unresolved":false,"context_lines":[{"line_number":85,"context_line":"    agent \u003d orm.relationship(agents_db.Agent)"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"    state \u003d sa.Column(sa.Enum(\u0027master\u0027, \u0027slave\u0027, name\u003d\u0027l3_ha_states\u0027),"},{"line_number":88,"context_line":"                      default\u003d\u0027slave\u0027)"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"class L3HARouterNetwork(model_base.BASEV2, models_v2.HasId,"}],"source_content_type":"text/x-python","patch_set":39,"id":"baada198_d6b9bf7a","line":88,"updated":"2014-07-16 09:54:22.000000000","message":"Please add server_default\u003d\u0027slave\u0027","commit_id":"e04dff1c37390051469829495a2632b5ef4ddbb0"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"change_message_id":"f0b53dfab9e6a6236ebc25e63677f1b2c60c3d04","unresolved":false,"context_lines":[{"line_number":85,"context_line":"    agent \u003d orm.relationship(agents_db.Agent)"},{"line_number":86,"context_line":""},{"line_number":87,"context_line":"    state \u003d sa.Column(sa.Enum(\u0027master\u0027, \u0027slave\u0027, name\u003d\u0027l3_ha_states\u0027),"},{"line_number":88,"context_line":"                      default\u003d\u0027slave\u0027)"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"class L3HARouterNetwork(model_base.BASEV2, models_v2.HasId,"}],"source_content_type":"text/x-python","patch_set":39,"id":"baada198_283ebbb8","line":88,"in_reply_to":"baada198_d6b9bf7a","updated":"2014-07-18 18:31:34.000000000","message":"Done","commit_id":"e04dff1c37390051469829495a2632b5ef4ddbb0"},{"author":{"_account_id":7249,"name":"Ann Taraday","email":"akamyshnikova@mirantis.com","username":"AKamyshnikova"},"change_message_id":"6ea0aac209ca1fbdcbf12947aa6556ecae34310e","unresolved":false,"context_lines":[{"line_number":100,"context_line":""},{"line_number":101,"context_line":"    network_id \u003d sa.Column(sa.String(36),"},{"line_number":102,"context_line":"                           sa.ForeignKey(\u0027networks.id\u0027, ondelete\u003d\"CASCADE\"),"},{"line_number":103,"context_line":"                           nullable\u003dFalse)"},{"line_number":104,"context_line":""},{"line_number":105,"context_line":""},{"line_number":106,"context_line":"class L3_HA_NAT_db_mixin(l3_db.L3_NAT_db_mixin):"}],"source_content_type":"text/x-python","patch_set":39,"id":"baada198_6ed81780","line":103,"updated":"2014-07-16 12:01:21.000000000","message":"Uniqueconstaint should be also mentioned in models.","commit_id":"e04dff1c37390051469829495a2632b5ef4ddbb0"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"36af3f9a8a8ca690eda5a18b0f344aad7c6ac546","unresolved":false,"context_lines":[{"line_number":119,"context_line":"                filter(L3HARouterNetwork.tenant_id \u003d\u003d tenant_id)."},{"line_number":120,"context_line":"                first())"},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"    def _set_vr_id(self, context, router):"},{"line_number":123,"context_line":"        query \u003d context.session.query(l3_db.Router).filter("},{"line_number":124,"context_line":"            l3_db.Router.tenant_id \u003d\u003d router.tenant_id)"},{"line_number":125,"context_line":""}],"source_content_type":"text/x-python","patch_set":39,"id":"baada198_124947d0","line":122,"updated":"2014-07-10 14:25:49.000000000","message":"Since you don\u0027t lock anything here, if two create_router for the same tenant arrive at the same time when using api_workers \u003e 1 or multiple Neutron servers in A/A the two routers could allocate the same vr_id. I think that the select should be \u0027for update\u0027.","commit_id":"e04dff1c37390051469829495a2632b5ef4ddbb0"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"change_message_id":"f0b53dfab9e6a6236ebc25e63677f1b2c60c3d04","unresolved":false,"context_lines":[{"line_number":119,"context_line":"                filter(L3HARouterNetwork.tenant_id \u003d\u003d tenant_id)."},{"line_number":120,"context_line":"                first())"},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"    def _set_vr_id(self, context, router):"},{"line_number":123,"context_line":"        query \u003d context.session.query(l3_db.Router).filter("},{"line_number":124,"context_line":"            l3_db.Router.tenant_id \u003d\u003d router.tenant_id)"},{"line_number":125,"context_line":""}],"source_content_type":"text/x-python","patch_set":39,"id":"baada198_a8bf2bcf","line":122,"in_reply_to":"baada198_124947d0","updated":"2014-07-18 18:31:34.000000000","message":"Done","commit_id":"e04dff1c37390051469829495a2632b5ef4ddbb0"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"36af3f9a8a8ca690eda5a18b0f344aad7c6ac546","unresolved":false,"context_lines":[{"line_number":125,"context_line":""},{"line_number":126,"context_line":"        allocated_vr_ids \u003d set([r[\u0027ha_vr_id\u0027] for r in query])"},{"line_number":127,"context_line":"        available_vr_ids \u003d VR_ID_RANGE - allocated_vr_ids"},{"line_number":128,"context_line":"        if not available_vr_ids:"},{"line_number":129,"context_line":"            raise l3_ha.NoVRIDAvailable()"},{"line_number":130,"context_line":"        router.ha_vr_id \u003d available_vr_ids.pop()"},{"line_number":131,"context_line":""}],"source_content_type":"text/x-python","patch_set":39,"id":"baada198_4734e6fa","line":128,"updated":"2014-07-10 14:25:49.000000000","message":"Could you add the router id for the failed VRID allocation?","commit_id":"e04dff1c37390051469829495a2632b5ef4ddbb0"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"change_message_id":"f0b53dfab9e6a6236ebc25e63677f1b2c60c3d04","unresolved":false,"context_lines":[{"line_number":125,"context_line":""},{"line_number":126,"context_line":"        allocated_vr_ids \u003d set([r[\u0027ha_vr_id\u0027] for r in query])"},{"line_number":127,"context_line":"        available_vr_ids \u003d VR_ID_RANGE - allocated_vr_ids"},{"line_number":128,"context_line":"        if not available_vr_ids:"},{"line_number":129,"context_line":"            raise l3_ha.NoVRIDAvailable()"},{"line_number":130,"context_line":"        router.ha_vr_id \u003d available_vr_ids.pop()"},{"line_number":131,"context_line":""}],"source_content_type":"text/x-python","patch_set":39,"id":"baada198_a88d6b33","line":128,"in_reply_to":"baada198_4734e6fa","updated":"2014-07-18 18:31:34.000000000","message":"Done","commit_id":"e04dff1c37390051469829495a2632b5ef4ddbb0"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"36af3f9a8a8ca690eda5a18b0f344aad7c6ac546","unresolved":false,"context_lines":[{"line_number":168,"context_line":""},{"line_number":169,"context_line":"            return subnet"},{"line_number":170,"context_line":""},{"line_number":171,"context_line":"    def _get_number_of_agents(self, context):"},{"line_number":172,"context_line":"        min_agents \u003d cfg.CONF.min_l3_agents_per_router"},{"line_number":173,"context_line":"        # TODO(safchain): use oslo.config types to check the validity"},{"line_number":174,"context_line":"        # when it will be available"}],"source_content_type":"text/x-python","patch_set":39,"id":"baada198_79618ea7","line":171,"updated":"2014-07-10 14:25:49.000000000","message":"Could you add a comment reminding that if max_l3_agents_per_router is 0 then all agents are used?","commit_id":"e04dff1c37390051469829495a2632b5ef4ddbb0"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"change_message_id":"f0b53dfab9e6a6236ebc25e63677f1b2c60c3d04","unresolved":false,"context_lines":[{"line_number":168,"context_line":""},{"line_number":169,"context_line":"            return subnet"},{"line_number":170,"context_line":""},{"line_number":171,"context_line":"    def _get_number_of_agents(self, context):"},{"line_number":172,"context_line":"        min_agents \u003d cfg.CONF.min_l3_agents_per_router"},{"line_number":173,"context_line":"        # TODO(safchain): use oslo.config types to check the validity"},{"line_number":174,"context_line":"        # when it will be available"}],"source_content_type":"text/x-python","patch_set":39,"id":"baada198_cb7e191b","line":171,"in_reply_to":"baada198_79618ea7","updated":"2014-07-18 18:31:34.000000000","message":"Done","commit_id":"e04dff1c37390051469829495a2632b5ef4ddbb0"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"36af3f9a8a8ca690eda5a18b0f344aad7c6ac546","unresolved":false,"context_lines":[{"line_number":172,"context_line":"        min_agents \u003d cfg.CONF.min_l3_agents_per_router"},{"line_number":173,"context_line":"        # TODO(safchain): use oslo.config types to check the validity"},{"line_number":174,"context_line":"        # when it will be available"},{"line_number":175,"context_line":"        if min_agents \u003c 2:"},{"line_number":176,"context_line":"            raise l3_ha.HAMinimumAgentsNumberNotValid()"},{"line_number":177,"context_line":""},{"line_number":178,"context_line":"        num_agents \u003d len(self.get_l3_agents(context))"}],"source_content_type":"text/x-python","patch_set":39,"id":"baada198_99f3c209","line":175,"updated":"2014-07-10 14:25:49.000000000","message":"Could you add the value of min_agents into the exception message?","commit_id":"e04dff1c37390051469829495a2632b5ef4ddbb0"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"change_message_id":"f0b53dfab9e6a6236ebc25e63677f1b2c60c3d04","unresolved":false,"context_lines":[{"line_number":172,"context_line":"        min_agents \u003d cfg.CONF.min_l3_agents_per_router"},{"line_number":173,"context_line":"        # TODO(safchain): use oslo.config types to check the validity"},{"line_number":174,"context_line":"        # when it will be available"},{"line_number":175,"context_line":"        if min_agents \u003c 2:"},{"line_number":176,"context_line":"            raise l3_ha.HAMinimumAgentsNumberNotValid()"},{"line_number":177,"context_line":""},{"line_number":178,"context_line":"        num_agents \u003d len(self.get_l3_agents(context))"}],"source_content_type":"text/x-python","patch_set":39,"id":"baada198_2bceb55a","line":175,"in_reply_to":"baada198_99f3c209","updated":"2014-07-18 18:31:34.000000000","message":"Also added the current available number","commit_id":"e04dff1c37390051469829495a2632b5ef4ddbb0"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"36af3f9a8a8ca690eda5a18b0f344aad7c6ac546","unresolved":false,"context_lines":[{"line_number":194,"context_line":"        ha_network \u003d self.get_ha_network(context, router.tenant_id)"},{"line_number":195,"context_line":"        if ha_network:"},{"line_number":196,"context_line":"            subnets \u003d self._core_plugin._get_subnets_by_network("},{"line_number":197,"context_line":"                context, ha_network.network_id)"},{"line_number":198,"context_line":"            if not subnets:"},{"line_number":199,"context_line":"                subnet \u003d self._create_ha_subnet(context, ha_network)"},{"line_number":200,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":39,"id":"baada198_792fce3e","line":197,"updated":"2014-07-10 14:25:49.000000000","message":"Why is this check needed? _create_ha_network creates a subnet as well.\n\nOn a somewhat related note:\nPerhaps separate _create_ha_subnet out of _create_ha_network and call it explicitly on line 205? I would expect create_network to create a network, and create_subnet to create a subnet, like the plugins do. Whatever you think though I\u0027m not going to stress this point.","commit_id":"e04dff1c37390051469829495a2632b5ef4ddbb0"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"change_message_id":"f0b53dfab9e6a6236ebc25e63677f1b2c60c3d04","unresolved":false,"context_lines":[{"line_number":194,"context_line":"        ha_network \u003d self.get_ha_network(context, router.tenant_id)"},{"line_number":195,"context_line":"        if ha_network:"},{"line_number":196,"context_line":"            subnets \u003d self._core_plugin._get_subnets_by_network("},{"line_number":197,"context_line":"                context, ha_network.network_id)"},{"line_number":198,"context_line":"            if not subnets:"},{"line_number":199,"context_line":"                subnet \u003d self._create_ha_subnet(context, ha_network)"},{"line_number":200,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":39,"id":"baada198_8b634119","line":197,"in_reply_to":"baada198_792fce3e","updated":"2014-07-18 18:31:34.000000000","message":"Done","commit_id":"e04dff1c37390051469829495a2632b5ef4ddbb0"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"36af3f9a8a8ca690eda5a18b0f344aad7c6ac546","unresolved":false,"context_lines":[{"line_number":244,"context_line":"        self._delete_ha_interfaces(context, router)"},{"line_number":245,"context_line":"        router.ha_vr_id \u003d None"},{"line_number":246,"context_line":""},{"line_number":247,"context_line":"    def _create_router_db(self, context, router, tenant_id, gw_info):"},{"line_number":248,"context_line":"        notify \u003d False"},{"line_number":249,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":250,"context_line":"            router_db \u003d super(L3_HA_NAT_db_mixin, self)._create_router_db("}],"source_content_type":"text/x-python","patch_set":39,"id":"baada198_194ed2c1","line":247,"updated":"2014-07-10 14:25:49.000000000","message":"Isn\u0027t it a bit weird to override a \"private\" method? Why not override create_router instead? Apart from writing a bit more code I think it\u0027s a safer practice.","commit_id":"e04dff1c37390051469829495a2632b5ef4ddbb0"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"change_message_id":"f0b53dfab9e6a6236ebc25e63677f1b2c60c3d04","unresolved":false,"context_lines":[{"line_number":244,"context_line":"        self._delete_ha_interfaces(context, router)"},{"line_number":245,"context_line":"        router.ha_vr_id \u003d None"},{"line_number":246,"context_line":""},{"line_number":247,"context_line":"    def _create_router_db(self, context, router, tenant_id, gw_info):"},{"line_number":248,"context_line":"        notify \u003d False"},{"line_number":249,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":250,"context_line":"            router_db \u003d super(L3_HA_NAT_db_mixin, self)._create_router_db("}],"source_content_type":"text/x-python","patch_set":39,"id":"baada198_cb0e193d","line":247,"in_reply_to":"baada198_194ed2c1","updated":"2014-07-18 18:31:34.000000000","message":"It\u0027s seems that the dvr code took the same approach, so I let this like that for now","commit_id":"e04dff1c37390051469829495a2632b5ef4ddbb0"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"36af3f9a8a8ca690eda5a18b0f344aad7c6ac546","unresolved":false,"context_lines":[{"line_number":313,"context_line":""},{"line_number":314,"context_line":"        return query"},{"line_number":315,"context_line":""},{"line_number":316,"context_line":"    def _make_port_binding_dict(self, binding):"},{"line_number":317,"context_line":"        port \u003d binding.port"},{"line_number":318,"context_line":""},{"line_number":319,"context_line":"        res \u003d {\u0027id\u0027: port.id,"}],"source_content_type":"text/x-python","patch_set":39,"id":"baada198_9912e260","line":316,"updated":"2014-07-10 14:25:49.000000000","message":"Shouldn\u0027t it be possible to re-use _make_port_dict and only add the diff?","commit_id":"e04dff1c37390051469829495a2632b5ef4ddbb0"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"change_message_id":"f0b53dfab9e6a6236ebc25e63677f1b2c60c3d04","unresolved":false,"context_lines":[{"line_number":313,"context_line":""},{"line_number":314,"context_line":"        return query"},{"line_number":315,"context_line":""},{"line_number":316,"context_line":"    def _make_port_binding_dict(self, binding):"},{"line_number":317,"context_line":"        port \u003d binding.port"},{"line_number":318,"context_line":""},{"line_number":319,"context_line":"        res \u003d {\u0027id\u0027: port.id,"}],"source_content_type":"text/x-python","patch_set":39,"id":"baada198_0eaf3fe4","line":316,"in_reply_to":"baada198_9912e260","updated":"2014-07-18 18:31:34.000000000","message":"Done","commit_id":"e04dff1c37390051469829495a2632b5ef4ddbb0"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"36af3f9a8a8ca690eda5a18b0f344aad7c6ac546","unresolved":false,"context_lines":[{"line_number":359,"context_line":"            if interfaces:"},{"line_number":360,"context_line":"                self._populate_subnet_for_ports(context, interfaces)"},{"line_number":361,"context_line":""},{"line_number":362,"context_line":"        return routers_dict.values()"},{"line_number":363,"context_line":""},{"line_number":364,"context_line":""},{"line_number":365,"context_line":"    def get_sync_data(self, context, host, router_ids\u003dNone, active\u003dNone):"}],"source_content_type":"text/x-python","patch_set":39,"id":"baada198_7cd33c5f","line":362,"updated":"2014-07-10 14:25:49.000000000","message":"Extra blank line.","commit_id":"e04dff1c37390051469829495a2632b5ef4ddbb0"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"36af3f9a8a8ca690eda5a18b0f344aad7c6ac546","unresolved":false,"context_lines":[{"line_number":368,"context_line":"                                                                  active)"},{"line_number":369,"context_line":"        return self._process_sync_ha_data(context, sync_data, host)"},{"line_number":370,"context_line":""},{"line_number":371,"context_line":""},{"line_number":372,"context_line":"def _is_ha_router(router):"},{"line_number":373,"context_line":"    \"\"\"Return True if router to be handled is ha.\"\"\""},{"line_number":374,"context_line":"    try:"}],"source_content_type":"text/x-python","patch_set":39,"id":"baada198_dc53686a","line":371,"updated":"2014-07-10 14:25:49.000000000","message":"As we discussed on IRC, I think this function should either be deleted or split to 2 different functions. Right now it\u0027s used in create_router and delete_router with entirely different logic and this makes this function really hard to follow (For me).","commit_id":"e04dff1c37390051469829495a2632b5ef4ddbb0"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"change_message_id":"f0b53dfab9e6a6236ebc25e63677f1b2c60c3d04","unresolved":false,"context_lines":[{"line_number":368,"context_line":"                                                                  active)"},{"line_number":369,"context_line":"        return self._process_sync_ha_data(context, sync_data, host)"},{"line_number":370,"context_line":""},{"line_number":371,"context_line":""},{"line_number":372,"context_line":"def _is_ha_router(router):"},{"line_number":373,"context_line":"    \"\"\"Return True if router to be handled is ha.\"\"\""},{"line_number":374,"context_line":"    try:"}],"source_content_type":"text/x-python","patch_set":39,"id":"baada198_71a6daac","line":371,"in_reply_to":"baada198_dc53686a","updated":"2014-07-18 18:31:34.000000000","message":"Done","commit_id":"e04dff1c37390051469829495a2632b5ef4ddbb0"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"847254a637d1dd71d1a6cadbd9a3f174b41ecfab","unresolved":false,"context_lines":[{"line_number":109,"context_line":"             \u0027default\u0027: 0}])"},{"line_number":110,"context_line":""},{"line_number":111,"context_line":"    def get_ha_network(self, context, tenant_id):"},{"line_number":112,"context_line":"        return (context.session.query(L3HARouterNetwork)."},{"line_number":113,"context_line":"                filter(L3HARouterNetwork.tenant_id \u003d\u003d tenant_id)."},{"line_number":114,"context_line":"                first())"},{"line_number":115,"context_line":""}],"source_content_type":"text/x-python","patch_set":40,"id":"baada198_fa18ec85","line":112,"updated":"2014-07-19 06:14:06.000000000","message":"Does this logic mean that tenant may practically have only 1 network which is served by ha routers?","commit_id":"47cc7a0ae2e107088757b64583135360cee5a4dd"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"change_message_id":"11f8812d09c79969788bb1896f5bfb3fc2f1e366","unresolved":false,"context_lines":[{"line_number":109,"context_line":"             \u0027default\u0027: 0}])"},{"line_number":110,"context_line":""},{"line_number":111,"context_line":"    def get_ha_network(self, context, tenant_id):"},{"line_number":112,"context_line":"        return (context.session.query(L3HARouterNetwork)."},{"line_number":113,"context_line":"                filter(L3HARouterNetwork.tenant_id \u003d\u003d tenant_id)."},{"line_number":114,"context_line":"                first())"},{"line_number":115,"context_line":""}],"source_content_type":"text/x-python","patch_set":40,"id":"baada198_ac10e200","line":112,"in_reply_to":"baada198_fa18ec85","updated":"2014-07-21 15:02:35.000000000","message":"Correct, one ha network per tenant","commit_id":"47cc7a0ae2e107088757b64583135360cee5a4dd"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"847254a637d1dd71d1a6cadbd9a3f174b41ecfab","unresolved":false,"context_lines":[{"line_number":115,"context_line":""},{"line_number":116,"context_line":"    def _set_vr_id(self, context, router):"},{"line_number":117,"context_line":"        query \u003d context.session.query(l3_db.Router).with_lockmode(\u0027update\u0027)"},{"line_number":118,"context_line":"        query \u003d query.filter(l3_db.Router.tenant_id \u003d\u003d router.tenant_id)"},{"line_number":119,"context_line":""},{"line_number":120,"context_line":"        allocated_vr_ids \u003d set([r.extra_attributes.ha_vr_id for r in query])"},{"line_number":121,"context_line":"        available_vr_ids \u003d VR_ID_RANGE - allocated_vr_ids"}],"source_content_type":"text/x-python","patch_set":40,"id":"baada198_15057110","line":118,"updated":"2014-07-19 06:14:06.000000000","message":"nit: shorter version\n query.filter_by(tenant_id\u003drouter.tenant_id)","commit_id":"47cc7a0ae2e107088757b64583135360cee5a4dd"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"847254a637d1dd71d1a6cadbd9a3f174b41ecfab","unresolved":false,"context_lines":[{"line_number":148,"context_line":"        with session.begin(subtransactions\u003dTrue):"},{"line_number":149,"context_line":"            args \u003d {\u0027network\u0027:"},{"line_number":150,"context_line":"                    {\u0027name\u0027: \"HA Router VRRP Network\","},{"line_number":151,"context_line":"                     \u0027tenant_id\u0027: \u0027\u0027,"},{"line_number":152,"context_line":"                     \u0027shared\u0027: False,"},{"line_number":153,"context_line":"                     \u0027admin_state_up\u0027: True,"},{"line_number":154,"context_line":"                     \u0027status\u0027: constants.NET_STATUS_ACTIVE}}"}],"source_content_type":"text/x-python","patch_set":40,"id":"baada198_156491b7","line":151,"updated":"2014-07-19 06:14:06.000000000","message":"why no tenant_id here?","commit_id":"47cc7a0ae2e107088757b64583135360cee5a4dd"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"change_message_id":"11f8812d09c79969788bb1896f5bfb3fc2f1e366","unresolved":false,"context_lines":[{"line_number":148,"context_line":"        with session.begin(subtransactions\u003dTrue):"},{"line_number":149,"context_line":"            args \u003d {\u0027network\u0027:"},{"line_number":150,"context_line":"                    {\u0027name\u0027: \"HA Router VRRP Network\","},{"line_number":151,"context_line":"                     \u0027tenant_id\u0027: \u0027\u0027,"},{"line_number":152,"context_line":"                     \u0027shared\u0027: False,"},{"line_number":153,"context_line":"                     \u0027admin_state_up\u0027: True,"},{"line_number":154,"context_line":"                     \u0027status\u0027: constants.NET_STATUS_ACTIVE}}"}],"source_content_type":"text/x-python","patch_set":40,"id":"baada198_ac270262","line":151,"in_reply_to":"baada198_156491b7","updated":"2014-07-21 15:02:35.000000000","message":"no tenant id, so that this ha network is hidden for the tenant","commit_id":"47cc7a0ae2e107088757b64583135360cee5a4dd"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"847254a637d1dd71d1a6cadbd9a3f174b41ecfab","unresolved":false,"context_lines":[{"line_number":225,"context_line":"            context.session.add(portbinding)"},{"line_number":226,"context_line":""},{"line_number":227,"context_line":"    def _delete_ha_interfaces(self, context, router):"},{"line_number":228,"context_line":"            ctx \u003d context.elevated()"},{"line_number":229,"context_line":"            device_filter \u003d {\u0027device_id\u0027: [router.id],"},{"line_number":230,"context_line":"                             \u0027device_owner\u0027:"},{"line_number":231,"context_line":"                             [constants.DEVICE_OWNER_ROUTER_HA_INTF]}"}],"source_content_type":"text/x-python","patch_set":40,"id":"baada198_d5ea19d7","line":228,"updated":"2014-07-19 06:14:06.000000000","message":"nit: looks like indentation is increased here","commit_id":"47cc7a0ae2e107088757b64583135360cee5a4dd"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"change_message_id":"11f8812d09c79969788bb1896f5bfb3fc2f1e366","unresolved":false,"context_lines":[{"line_number":225,"context_line":"            context.session.add(portbinding)"},{"line_number":226,"context_line":""},{"line_number":227,"context_line":"    def _delete_ha_interfaces(self, context, router):"},{"line_number":228,"context_line":"            ctx \u003d context.elevated()"},{"line_number":229,"context_line":"            device_filter \u003d {\u0027device_id\u0027: [router.id],"},{"line_number":230,"context_line":"                             \u0027device_owner\u0027:"},{"line_number":231,"context_line":"                             [constants.DEVICE_OWNER_ROUTER_HA_INTF]}"}],"source_content_type":"text/x-python","patch_set":40,"id":"baada198_cc1fd607","line":228,"in_reply_to":"baada198_d5ea19d7","updated":"2014-07-21 15:02:35.000000000","message":"Done","commit_id":"47cc7a0ae2e107088757b64583135360cee5a4dd"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"847254a637d1dd71d1a6cadbd9a3f174b41ecfab","unresolved":false,"context_lines":[{"line_number":309,"context_line":"                for port in ports:"},{"line_number":310,"context_line":"                    self._core_plugin._delete_port(ctx, port[\u0027id\u0027])"},{"line_number":311,"context_line":""},{"line_number":312,"context_line":"            return super(L3_HA_NAT_db_mixin, self).delete_router(context, id)"},{"line_number":313,"context_line":""},{"line_number":314,"context_line":"    def get_ha_router_port_binding(self, context, router_ids, host\u003dNone):"},{"line_number":315,"context_line":"        query \u003d context.session.query("}],"source_content_type":"text/x-python","patch_set":40,"id":"baada198_53ee1a23","line":312,"updated":"2014-07-19 06:14:06.000000000","message":"that will actually make rpc call under transaction.\nConsider moving it outside","commit_id":"47cc7a0ae2e107088757b64583135360cee5a4dd"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"change_message_id":"11f8812d09c79969788bb1896f5bfb3fc2f1e366","unresolved":false,"context_lines":[{"line_number":309,"context_line":"                for port in ports:"},{"line_number":310,"context_line":"                    self._core_plugin._delete_port(ctx, port[\u0027id\u0027])"},{"line_number":311,"context_line":""},{"line_number":312,"context_line":"            return super(L3_HA_NAT_db_mixin, self).delete_router(context, id)"},{"line_number":313,"context_line":""},{"line_number":314,"context_line":"    def get_ha_router_port_binding(self, context, router_ids, host\u003dNone):"},{"line_number":315,"context_line":"        query \u003d context.session.query("}],"source_content_type":"text/x-python","patch_set":40,"id":"baada198_0c162ef2","line":312,"in_reply_to":"baada198_53ee1a23","updated":"2014-07-21 15:02:35.000000000","message":"Done","commit_id":"47cc7a0ae2e107088757b64583135360cee5a4dd"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"b907b6ad553c1ea8c3a63b709a90d38b726bd4d5","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright (C) 2014 eNovance SAS \u003clicensing@enovance.com\u003e"},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"# Author: Sylvain Afchain \u003csylvain.afchain@enovance.com\u003e"},{"line_number":4,"context_line":"#"}],"source_content_type":"text/x-python","patch_set":41,"id":"baada198_91debc0f","line":1,"updated":"2014-07-21 18:43:50.000000000","message":"should this be Red Hat now? :)","commit_id":"52096cac3a5a7ee9d71c07e2bf6afb8f0954632c"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"change_message_id":"ae048e1cd22928d28f794fe9ae5f9f7e43f56d57","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright (C) 2014 eNovance SAS \u003clicensing@enovance.com\u003e"},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"# Author: Sylvain Afchain \u003csylvain.afchain@enovance.com\u003e"},{"line_number":4,"context_line":"#"}],"source_content_type":"text/x-python","patch_set":41,"id":"baada198_2a51d20d","line":1,"in_reply_to":"baada198_91debc0f","updated":"2014-07-22 12:16:50.000000000","message":"oops :)","commit_id":"52096cac3a5a7ee9d71c07e2bf6afb8f0954632c"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"b907b6ad553c1ea8c3a63b709a90d38b726bd4d5","unresolved":false,"context_lines":[{"line_number":37,"context_line":"L3_HA_OPTS \u003d ["},{"line_number":38,"context_line":"    cfg.BoolOpt(\u0027l3_ha\u0027,"},{"line_number":39,"context_line":"                default\u003dFalse,"},{"line_number":40,"context_line":"                help\u003d_(\u0027Enable the HA mode of virtual routers\u0027)),"},{"line_number":41,"context_line":"    cfg.IntOpt(\u0027max_l3_agents_per_router\u0027,"},{"line_number":42,"context_line":"               default\u003d2,"},{"line_number":43,"context_line":"               help\u003d_(\u0027Maximun number of agents on which a router will be \u0027"}],"source_content_type":"text/x-python","patch_set":41,"id":"baada198_1140eca3","line":40,"updated":"2014-07-21 18:43:50.000000000","message":"missing period.","commit_id":"52096cac3a5a7ee9d71c07e2bf6afb8f0954632c"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"b907b6ad553c1ea8c3a63b709a90d38b726bd4d5","unresolved":false,"context_lines":[{"line_number":77,"context_line":"                                          ondelete\u003d\u0027CASCADE\u0027))"},{"line_number":78,"context_line":"    agent \u003d orm.relationship(agents_db.Agent)"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"    state \u003d sa.Column(sa.Enum(\u0027master\u0027, \u0027slave\u0027, name\u003d\u0027l3_ha_states\u0027),"},{"line_number":81,"context_line":"                      default\u003d\u0027slave\u0027,"},{"line_number":82,"context_line":"                      server_default\u003d\u0027slave\u0027)"},{"line_number":83,"context_line":""}],"source_content_type":"text/x-python","patch_set":41,"id":"baada198_f1e8d87c","line":80,"updated":"2014-07-21 18:43:50.000000000","message":"according to spec this should be active/standby instead","commit_id":"52096cac3a5a7ee9d71c07e2bf6afb8f0954632c"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"b907b6ad553c1ea8c3a63b709a90d38b726bd4d5","unresolved":false,"context_lines":[{"line_number":92,"context_line":""},{"line_number":93,"context_line":"    __tablename__ \u003d \u0027ha_router_networks\u0027"},{"line_number":94,"context_line":""},{"line_number":95,"context_line":"    network_id \u003d sa.Column(sa.String(36),"},{"line_number":96,"context_line":"                           sa.ForeignKey(\u0027networks.id\u0027, ondelete\u003d\"CASCADE\"),"},{"line_number":97,"context_line":"                           nullable\u003dFalse, unique\u003dTrue)"},{"line_number":98,"context_line":"    network \u003d orm.relationship(models_v2.Network)"}],"source_content_type":"text/x-python","patch_set":41,"id":"baada198_11262cce","line":95,"updated":"2014-07-21 18:43:50.000000000","message":"Please, remember our discussion on PS36, a unique constraint here is not necessary, as network is already key. If you want to allow only one tenant to have HA network you\u0027d need to make (network_id, tenant_id) primary key; to this aim you might want to remove model_v2.HasTenant and add the tenant_id column explicitly.","commit_id":"52096cac3a5a7ee9d71c07e2bf6afb8f0954632c"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"change_message_id":"ae048e1cd22928d28f794fe9ae5f9f7e43f56d57","unresolved":false,"context_lines":[{"line_number":92,"context_line":""},{"line_number":93,"context_line":"    __tablename__ \u003d \u0027ha_router_networks\u0027"},{"line_number":94,"context_line":""},{"line_number":95,"context_line":"    network_id \u003d sa.Column(sa.String(36),"},{"line_number":96,"context_line":"                           sa.ForeignKey(\u0027networks.id\u0027, ondelete\u003d\"CASCADE\"),"},{"line_number":97,"context_line":"                           nullable\u003dFalse, unique\u003dTrue)"},{"line_number":98,"context_line":"    network \u003d orm.relationship(models_v2.Network)"}],"source_content_type":"text/x-python","patch_set":41,"id":"baada198_dfc3ac37","line":95,"in_reply_to":"baada198_11262cce","updated":"2014-07-22 12:16:50.000000000","message":"Done","commit_id":"52096cac3a5a7ee9d71c07e2bf6afb8f0954632c"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"b907b6ad553c1ea8c3a63b709a90d38b726bd4d5","unresolved":false,"context_lines":[{"line_number":115,"context_line":"                first())"},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"    def _set_vr_id(self, context, router):"},{"line_number":118,"context_line":"        query \u003d context.session.query(l3_db.Router).with_lockmode(\u0027update\u0027)"},{"line_number":119,"context_line":"        query \u003d query.filter(l3_db.Router.tenant_id \u003d\u003d router.tenant_id)"},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"        allocated_vr_ids \u003d set([r.extra_attributes.ha_vr_id for r in query])"}],"source_content_type":"text/x-python","patch_set":41,"id":"baada198_3c222701","line":118,"updated":"2014-07-21 18:43:50.000000000","message":"this lockmode is not necessary","commit_id":"52096cac3a5a7ee9d71c07e2bf6afb8f0954632c"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"b907b6ad553c1ea8c3a63b709a90d38b726bd4d5","unresolved":false,"context_lines":[{"line_number":225,"context_line":"                                                     router_id\u003drouter_id)"},{"line_number":226,"context_line":"            context.session.add(portbinding)"},{"line_number":227,"context_line":""},{"line_number":228,"context_line":"    def _delete_ha_interfaces(self, context, router):"},{"line_number":229,"context_line":"        ctx \u003d context.elevated()"},{"line_number":230,"context_line":"        device_filter \u003d {\u0027device_id\u0027: [router.id],"},{"line_number":231,"context_line":"                         \u0027device_owner\u0027:"}],"source_content_type":"text/x-python","patch_set":41,"id":"baada198_f78288fd","line":228,"updated":"2014-07-21 18:43:50.000000000","message":"you elevate the context here but not in _create_ha_interfaces, is that an oversight?","commit_id":"52096cac3a5a7ee9d71c07e2bf6afb8f0954632c"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"change_message_id":"ae048e1cd22928d28f794fe9ae5f9f7e43f56d57","unresolved":false,"context_lines":[{"line_number":225,"context_line":"                                                     router_id\u003drouter_id)"},{"line_number":226,"context_line":"            context.session.add(portbinding)"},{"line_number":227,"context_line":""},{"line_number":228,"context_line":"    def _delete_ha_interfaces(self, context, router):"},{"line_number":229,"context_line":"        ctx \u003d context.elevated()"},{"line_number":230,"context_line":"        device_filter \u003d {\u0027device_id\u0027: [router.id],"},{"line_number":231,"context_line":"                         \u0027device_owner\u0027:"}],"source_content_type":"text/x-python","patch_set":41,"id":"baada198_33669fbc","line":228,"in_reply_to":"baada198_f78288fd","updated":"2014-07-22 12:16:50.000000000","message":"the _create_ha_interfaces is called with a elevated context, but I\u0027ll move the elevation to improve the readability","commit_id":"52096cac3a5a7ee9d71c07e2bf6afb8f0954632c"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"b907b6ad553c1ea8c3a63b709a90d38b726bd4d5","unresolved":false,"context_lines":[{"line_number":226,"context_line":"            context.session.add(portbinding)"},{"line_number":227,"context_line":""},{"line_number":228,"context_line":"    def _delete_ha_interfaces(self, context, router):"},{"line_number":229,"context_line":"        ctx \u003d context.elevated()"},{"line_number":230,"context_line":"        device_filter \u003d {\u0027device_id\u0027: [router.id],"},{"line_number":231,"context_line":"                         \u0027device_owner\u0027:"},{"line_number":232,"context_line":"                         [constants.DEVICE_OWNER_ROUTER_HA_INTF]}"}],"source_content_type":"text/x-python","patch_set":41,"id":"baada198_1c0d633e","line":229,"updated":"2014-07-21 18:43:50.000000000","message":"consider calling this admin_ctx to improve readability.","commit_id":"52096cac3a5a7ee9d71c07e2bf6afb8f0954632c"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"b907b6ad553c1ea8c3a63b709a90d38b726bd4d5","unresolved":false,"context_lines":[{"line_number":246,"context_line":"        router.extra_attributes.ha_vr_id \u003d None"},{"line_number":247,"context_line":""},{"line_number":248,"context_line":"    @staticmethod"},{"line_number":249,"context_line":"    def _is_ha(router):"},{"line_number":250,"context_line":"        ha \u003d router.get(\u0027ha\u0027)"},{"line_number":251,"context_line":"        if not attributes.is_attr_set(ha):"},{"line_number":252,"context_line":"            ha \u003d cfg.CONF.l3_ha"}],"source_content_type":"text/x-python","patch_set":41,"id":"baada198_979cecc1","line":249,"updated":"2014-07-21 18:43:50.000000000","message":"why does this need to be a static method rather than a module one?","commit_id":"52096cac3a5a7ee9d71c07e2bf6afb8f0954632c"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"b907b6ad553c1ea8c3a63b709a90d38b726bd4d5","unresolved":false,"context_lines":[{"line_number":258,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":259,"context_line":"            router_db \u003d super(L3_HA_NAT_db_mixin, self)._create_router_db("},{"line_number":260,"context_line":"                context, router, tenant_id)"},{"line_number":261,"context_line":"            self._process_extra_attr_router_create(context, router_db, router)"},{"line_number":262,"context_line":""},{"line_number":263,"context_line":"            if router[\u0027ha\u0027]:"},{"line_number":264,"context_line":"                self._add_ha(context, router_db)"}],"source_content_type":"text/x-python","patch_set":41,"id":"baada198_d754a4ff","line":261,"updated":"2014-07-21 18:43:50.000000000","message":"this is not necessary as it\u0027s already done here:\n\nhttps://github.com/openstack/neutron/blob/master/neutron/db/l3_dvr_db.py#L66","commit_id":"52096cac3a5a7ee9d71c07e2bf6afb8f0954632c"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"change_message_id":"ae048e1cd22928d28f794fe9ae5f9f7e43f56d57","unresolved":false,"context_lines":[{"line_number":258,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":259,"context_line":"            router_db \u003d super(L3_HA_NAT_db_mixin, self)._create_router_db("},{"line_number":260,"context_line":"                context, router, tenant_id)"},{"line_number":261,"context_line":"            self._process_extra_attr_router_create(context, router_db, router)"},{"line_number":262,"context_line":""},{"line_number":263,"context_line":"            if router[\u0027ha\u0027]:"},{"line_number":264,"context_line":"                self._add_ha(context, router_db)"}],"source_content_type":"text/x-python","patch_set":41,"id":"baada198_ff4a30ac","line":261,"in_reply_to":"baada198_d754a4ff","updated":"2014-07-22 12:16:50.000000000","message":"Done","commit_id":"52096cac3a5a7ee9d71c07e2bf6afb8f0954632c"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"b907b6ad553c1ea8c3a63b709a90d38b726bd4d5","unresolved":false,"context_lines":[{"line_number":301,"context_line":"    def delete_router(self, context, id):"},{"line_number":302,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":303,"context_line":"            router \u003d self._get_router(context, id)"},{"line_number":304,"context_line":"            if router.extra_attributes.ha:"},{"line_number":305,"context_line":"                ctx \u003d context.elevated()"},{"line_number":306,"context_line":"                device_filter \u003d {\u0027device_id\u0027: [id],"},{"line_number":307,"context_line":"                                 \u0027device_owner\u0027:"}],"source_content_type":"text/x-python","patch_set":41,"id":"baada198_d77f4415","line":304,"updated":"2014-07-21 18:43:50.000000000","message":"why not use: _delete_ha_interfaces","commit_id":"52096cac3a5a7ee9d71c07e2bf6afb8f0954632c"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"change_message_id":"ae048e1cd22928d28f794fe9ae5f9f7e43f56d57","unresolved":false,"context_lines":[{"line_number":301,"context_line":"    def delete_router(self, context, id):"},{"line_number":302,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":303,"context_line":"            router \u003d self._get_router(context, id)"},{"line_number":304,"context_line":"            if router.extra_attributes.ha:"},{"line_number":305,"context_line":"                ctx \u003d context.elevated()"},{"line_number":306,"context_line":"                device_filter \u003d {\u0027device_id\u0027: [id],"},{"line_number":307,"context_line":"                                 \u0027device_owner\u0027:"}],"source_content_type":"text/x-python","patch_set":41,"id":"baada198_ff54f023","line":304,"in_reply_to":"baada198_d77f4415","updated":"2014-07-22 12:16:50.000000000","message":"Done","commit_id":"52096cac3a5a7ee9d71c07e2bf6afb8f0954632c"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"d0aac3c0d94d025ef2a9a777406b44cb6a052146","unresolved":false,"context_lines":[{"line_number":77,"context_line":"                                          ondelete\u003d\u0027CASCADE\u0027))"},{"line_number":78,"context_line":"    agent \u003d orm.relationship(agents_db.Agent)"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"    state \u003d sa.Column(sa.Enum(\u0027master\u0027, \u0027standby\u0027, name\u003d\u0027l3_ha_states\u0027),"},{"line_number":81,"context_line":"                      default\u003d\u0027standby\u0027,"},{"line_number":82,"context_line":"                      server_default\u003d\u0027standby\u0027)"},{"line_number":83,"context_line":""}],"source_content_type":"text/x-python","patch_set":43,"id":"baada198_1973754f","line":80,"updated":"2014-07-22 14:04:11.000000000","message":"this should be active.","commit_id":"643406b2a512e0be8450ececeadb0a8266f75902"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"change_message_id":"1754a8e2e5eb162eca4762eaf6db7e959f9a80f0","unresolved":false,"context_lines":[{"line_number":77,"context_line":"                                          ondelete\u003d\u0027CASCADE\u0027))"},{"line_number":78,"context_line":"    agent \u003d orm.relationship(agents_db.Agent)"},{"line_number":79,"context_line":""},{"line_number":80,"context_line":"    state \u003d sa.Column(sa.Enum(\u0027master\u0027, \u0027standby\u0027, name\u003d\u0027l3_ha_states\u0027),"},{"line_number":81,"context_line":"                      default\u003d\u0027standby\u0027,"},{"line_number":82,"context_line":"                      server_default\u003d\u0027standby\u0027)"},{"line_number":83,"context_line":""}],"source_content_type":"text/x-python","patch_set":43,"id":"baada198_45efbbb1","line":80,"in_reply_to":"baada198_1973754f","updated":"2014-07-22 15:32:30.000000000","message":"Done","commit_id":"643406b2a512e0be8450ececeadb0a8266f75902"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"d0aac3c0d94d025ef2a9a777406b44cb6a052146","unresolved":false,"context_lines":[{"line_number":115,"context_line":"                first())"},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"    def _set_vr_id(self, context, router):"},{"line_number":118,"context_line":"        query \u003d context.session.query(l3_db.Router).with_lockmode(\u0027update\u0027)"},{"line_number":119,"context_line":"        query \u003d query.filter(l3_db.Router.tenant_id \u003d\u003d router.tenant_id)"},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"        allocated_vr_ids \u003d set([r.extra_attributes.ha_vr_id for r in query])"}],"source_content_type":"text/x-python","patch_set":43,"id":"baada198_19d8d51d","line":118,"updated":"2014-07-22 14:04:11.000000000","message":"this went unaddressed.","commit_id":"643406b2a512e0be8450ececeadb0a8266f75902"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"change_message_id":"1754a8e2e5eb162eca4762eaf6db7e959f9a80f0","unresolved":false,"context_lines":[{"line_number":115,"context_line":"                first())"},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"    def _set_vr_id(self, context, router):"},{"line_number":118,"context_line":"        query \u003d context.session.query(l3_db.Router).with_lockmode(\u0027update\u0027)"},{"line_number":119,"context_line":"        query \u003d query.filter(l3_db.Router.tenant_id \u003d\u003d router.tenant_id)"},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"        allocated_vr_ids \u003d set([r.extra_attributes.ha_vr_id for r in query])"}],"source_content_type":"text/x-python","patch_set":43,"id":"baada198_914af959","line":118,"in_reply_to":"baada198_19d8d51d","updated":"2014-07-22 15:32:30.000000000","message":"We need to be sure that there will be no change on this table during the vr_ip computation ?","commit_id":"643406b2a512e0be8450ececeadb0a8266f75902"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"4f51f2c9bf6639262afa217b4d26c4846ded79ba","unresolved":false,"context_lines":[{"line_number":115,"context_line":"                first())"},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"    def _set_vr_id(self, context, router):"},{"line_number":118,"context_line":"        query \u003d context.session.query(l3_db.Router).with_lockmode(\u0027update\u0027)"},{"line_number":119,"context_line":"        query \u003d query.filter(l3_db.Router.tenant_id \u003d\u003d router.tenant_id)"},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"        allocated_vr_ids \u003d set([r.extra_attributes.ha_vr_id for r in query])"}],"source_content_type":"text/x-python","patch_set":48,"id":"baada198_30847c5c","line":118,"updated":"2014-07-23 21:29:04.000000000","message":"still not sure why this is needed.","commit_id":"6c24b0553b3b022f405fe61f0a3cf2dfbb360b0d"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"change_message_id":"06911a630f127f54b0abe2152cdb7ee8e3db4c34","unresolved":false,"context_lines":[{"line_number":115,"context_line":"                first())"},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"    def _set_vr_id(self, context, router):"},{"line_number":118,"context_line":"        query \u003d context.session.query(l3_db.Router).with_lockmode(\u0027update\u0027)"},{"line_number":119,"context_line":"        query \u003d query.filter(l3_db.Router.tenant_id \u003d\u003d router.tenant_id)"},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"        allocated_vr_ids \u003d set([r.extra_attributes.ha_vr_id for r in query])"}],"source_content_type":"text/x-python","patch_set":48,"id":"baada198_bb5436c7","line":118,"in_reply_to":"baada198_14225702","updated":"2014-07-29 17:19:14.000000000","message":".... finally few rows locked, only for routers of a specific tenant, but yes I\u0027d would love to narrow down the lock too. I can filter a bit more by just locking the ha routers, will do that in a next patch.","commit_id":"6c24b0553b3b022f405fe61f0a3cf2dfbb360b0d"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"change_message_id":"01961097e35e7e5f4fbc52ac68cd0f01bdb297e3","unresolved":false,"context_lines":[{"line_number":115,"context_line":"                first())"},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"    def _set_vr_id(self, context, router):"},{"line_number":118,"context_line":"        query \u003d context.session.query(l3_db.Router).with_lockmode(\u0027update\u0027)"},{"line_number":119,"context_line":"        query \u003d query.filter(l3_db.Router.tenant_id \u003d\u003d router.tenant_id)"},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"        allocated_vr_ids \u003d set([r.extra_attributes.ha_vr_id for r in query])"}],"source_content_type":"text/x-python","patch_set":48,"id":"baada198_f7d4ac20","line":118,"in_reply_to":"baada198_30847c5c","updated":"2014-07-24 08:41:48.000000000","message":"I\u0027ll try to elaborate a bit. We need to be sure that if there are two router creations in parallel that each line we are iterating will not change. I mean that a new vr id will not appear during the vr id computation in order to avoid to give twice the same vr id.","commit_id":"6c24b0553b3b022f405fe61f0a3cf2dfbb360b0d"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"3e8c56ff1cd5a1b1c0376f6728c7f1ee821c730c","unresolved":false,"context_lines":[{"line_number":115,"context_line":"                first())"},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"    def _set_vr_id(self, context, router):"},{"line_number":118,"context_line":"        query \u003d context.session.query(l3_db.Router).with_lockmode(\u0027update\u0027)"},{"line_number":119,"context_line":"        query \u003d query.filter(l3_db.Router.tenant_id \u003d\u003d router.tenant_id)"},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"        allocated_vr_ids \u003d set([r.extra_attributes.ha_vr_id for r in query])"}],"source_content_type":"text/x-python","patch_set":48,"id":"baada198_14225702","line":118,"in_reply_to":"baada198_3f701908","updated":"2014-07-29 15:35:34.000000000","message":"I\u0027ve been meaning to talk to you about this subject: Our only means of synchronization is the database if we\u0027re working with multiple Neutron servers or workers, so, what\u0027s the deal with the movement to remove select for update? Generally you apply optimizations if they don\u0027t break correctness. Generally the reason we\u0027re seeing DB locks is because Eventlet is weird and it\u0027s yielding mid-transaction (Which Ihar is trying to fix by moving to a native Python SQL driver). I don\u0027t think \u0027select for update\u0027 is the root cause of our issues, and since I don\u0027t see any other options I don\u0027t understand why we\u0027re moving away from it (When it\u0027s actually needed, like here).\n\nAs for this specific case, I\u0027d love to find a way to narrow down the lock so that update and delete methods would still work because it\u0027s kind of ridiculous that the creation of an HA router would block updates and deletes of all kinds of routers, but I\u0027m far from a DB or SQLAlchemy guru.","commit_id":"6c24b0553b3b022f405fe61f0a3cf2dfbb360b0d"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"f5981f73872a8289e33474af46ad7324e7c61db1","unresolved":false,"context_lines":[{"line_number":115,"context_line":"                first())"},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"    def _set_vr_id(self, context, router):"},{"line_number":118,"context_line":"        query \u003d context.session.query(l3_db.Router).with_lockmode(\u0027update\u0027)"},{"line_number":119,"context_line":"        query \u003d query.filter(l3_db.Router.tenant_id \u003d\u003d router.tenant_id)"},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"        allocated_vr_ids \u003d set([r.extra_attributes.ha_vr_id for r in query])"}],"source_content_type":"text/x-python","patch_set":48,"id":"baada198_65314358","line":118,"in_reply_to":"baada198_4508bfd8","updated":"2014-07-28 21:52:34.000000000","message":"that still not going to help, if we really wanted to eradicate the race condition we should really change the approach and preprovision the list of vr ids per tenant like so:\n\n(tenant, id, allocated) --\u003e [tenant, id] is key\n\nAllocation is the result of:\n\nselect for update where allocated\u003dFalse, you pick the first and then set it to true. That guarantees you that no two concurrent requests are going to pick the same vr id. Same thing for deallocation.\n\nYour solution is flawed by the race condition, I don\u0027t think there\u0027s any way around it, if not revising the model. This is what I tried to stress all along, but my concerns fell on deaf ears ;)","commit_id":"6c24b0553b3b022f405fe61f0a3cf2dfbb360b0d"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"26154f6dfa82b08099c56d74849b077f69735d79","unresolved":false,"context_lines":[{"line_number":115,"context_line":"                first())"},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"    def _set_vr_id(self, context, router):"},{"line_number":118,"context_line":"        query \u003d context.session.query(l3_db.Router).with_lockmode(\u0027update\u0027)"},{"line_number":119,"context_line":"        query \u003d query.filter(l3_db.Router.tenant_id \u003d\u003d router.tenant_id)"},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"        allocated_vr_ids \u003d set([r.extra_attributes.ha_vr_id for r in query])"}],"source_content_type":"text/x-python","patch_set":48,"id":"baada198_3f701908","line":118,"in_reply_to":"baada198_47d4381f","updated":"2014-07-29 14:58:22.000000000","message":"I played with this a little more; I think what happens here is that you don\u0027t even get to create the second router, i.e. access to the routers table ends up being prevented for any operation (create, delete, update). This is somewhat dependent on the DB transaction isolation level, cluster configuration etc (I only tried under basic settings). So, yes this may avoid the duplication, but we might end up killing throughput and/or see a lot more \u0027lock timeout\u0027 exceptions (especially at scale).\n\nGranted the contention window may be small, but if I could stay away from the infamous lockout timeout errors I would. Also if we want to eradicate the use of lockmode because of Galera support, this instance is not going to help either.\n\nNot sure what\u0027s the best course of action here to be honest, if we try without the lockmode we risk the contention, if we try with, we might impair performance...um...","commit_id":"6c24b0553b3b022f405fe61f0a3cf2dfbb360b0d"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"a11c02147c22ba7db6747f65c8f69e394e29afaf","unresolved":false,"context_lines":[{"line_number":115,"context_line":"                first())"},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"    def _set_vr_id(self, context, router):"},{"line_number":118,"context_line":"        query \u003d context.session.query(l3_db.Router).with_lockmode(\u0027update\u0027)"},{"line_number":119,"context_line":"        query \u003d query.filter(l3_db.Router.tenant_id \u003d\u003d router.tenant_id)"},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"        allocated_vr_ids \u003d set([r.extra_attributes.ha_vr_id for r in query])"}],"source_content_type":"text/x-python","patch_set":48,"id":"baada198_47d4381f","line":118,"in_reply_to":"baada198_65314358","updated":"2014-07-29 07:28:33.000000000","message":"Armando, maybe I\u0027m misunderstanding this in a huge way, but assuming the routers table isn\u0027t empty, if two requests come in together, the first one will lock all routers for that tenant, continue doing its business, the second one will come and attempt to lock the same routers, and block. Isn\u0027t that the case?","commit_id":"6c24b0553b3b022f405fe61f0a3cf2dfbb360b0d"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"change_message_id":"61df277c2dda39d7ead9759b5920a750a8239776","unresolved":false,"context_lines":[{"line_number":115,"context_line":"                first())"},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"    def _set_vr_id(self, context, router):"},{"line_number":118,"context_line":"        query \u003d context.session.query(l3_db.Router).with_lockmode(\u0027update\u0027)"},{"line_number":119,"context_line":"        query \u003d query.filter(l3_db.Router.tenant_id \u003d\u003d router.tenant_id)"},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"        allocated_vr_ids \u003d set([r.extra_attributes.ha_vr_id for r in query])"}],"source_content_type":"text/x-python","patch_set":48,"id":"baada198_4508bfd8","line":118,"in_reply_to":"baada198_a157d6c7","updated":"2014-07-28 21:45:02.000000000","message":"I\u0027ll move this in another transaction so that new rows without vr id should be there ?","commit_id":"6c24b0553b3b022f405fe61f0a3cf2dfbb360b0d"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"f04d95f86a569302fff8f7b5026df0117c18d983","unresolved":false,"context_lines":[{"line_number":115,"context_line":"                first())"},{"line_number":116,"context_line":""},{"line_number":117,"context_line":"    def _set_vr_id(self, context, router):"},{"line_number":118,"context_line":"        query \u003d context.session.query(l3_db.Router).with_lockmode(\u0027update\u0027)"},{"line_number":119,"context_line":"        query \u003d query.filter(l3_db.Router.tenant_id \u003d\u003d router.tenant_id)"},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"        allocated_vr_ids \u003d set([r.extra_attributes.ha_vr_id for r in query])"}],"source_content_type":"text/x-python","patch_set":48,"id":"baada198_a157d6c7","line":118,"in_reply_to":"baada198_f7d4ac20","updated":"2014-07-28 18:43:51.000000000","message":"you\u0027re locking existing rows in the routers table. New rows won\u0027t show up in your resultset. If you want to prevent the same vr id being assigned more than once per tenant then the lock for update is not going to help you, I believe.","commit_id":"6c24b0553b3b022f405fe61f0a3cf2dfbb360b0d"},{"author":{"_account_id":4149,"name":"Itsuro Oda","email":"oda@valinux.co.jp","username":"oda-g"},"change_message_id":"4174775784f3a69b7a2c013986f3815ad2ef7fd3","unresolved":false,"context_lines":[{"line_number":153,"context_line":"                     \u0027shared\u0027: False,"},{"line_number":154,"context_line":"                     \u0027admin_state_up\u0027: True,"},{"line_number":155,"context_line":"                     \u0027status\u0027: constants.NET_STATUS_ACTIVE}}"},{"line_number":156,"context_line":"            network \u003d self._core_plugin.create_network(context, args)"},{"line_number":157,"context_line":""},{"line_number":158,"context_line":"            ha_network \u003d L3HARouterNetwork(tenant_id\u003dtenant_id,"},{"line_number":159,"context_line":"                                           network_id\u003dnetwork[\u0027id\u0027])"}],"source_content_type":"text/x-python","patch_set":48,"id":"baada198_86d95985","line":156,"updated":"2014-07-25 07:42:30.000000000","message":"It should not be called within a transaction. It may cause the \u0027lock wait timeout\u0027.","commit_id":"6c24b0553b3b022f405fe61f0a3cf2dfbb360b0d"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"change_message_id":"30f8565d89d8d86524414d09b2053902f1aa8b1f","unresolved":false,"context_lines":[{"line_number":153,"context_line":"                     \u0027shared\u0027: False,"},{"line_number":154,"context_line":"                     \u0027admin_state_up\u0027: True,"},{"line_number":155,"context_line":"                     \u0027status\u0027: constants.NET_STATUS_ACTIVE}}"},{"line_number":156,"context_line":"            network \u003d self._core_plugin.create_network(context, args)"},{"line_number":157,"context_line":""},{"line_number":158,"context_line":"            ha_network \u003d L3HARouterNetwork(tenant_id\u003dtenant_id,"},{"line_number":159,"context_line":"                                           network_id\u003dnetwork[\u0027id\u0027])"}],"source_content_type":"text/x-python","patch_set":48,"id":"baada198_b8111555","line":156,"in_reply_to":"baada198_86d95985","updated":"2014-07-25 10:42:40.000000000","message":"Yes and a bit of refactoring is needed to remove all this king of \"lock\". Thx","commit_id":"6c24b0553b3b022f405fe61f0a3cf2dfbb360b0d"},{"author":{"_account_id":4149,"name":"Itsuro Oda","email":"oda@valinux.co.jp","username":"oda-g"},"change_message_id":"4174775784f3a69b7a2c013986f3815ad2ef7fd3","unresolved":false,"context_lines":[{"line_number":257,"context_line":"                self._add_ha(context, router_db)"},{"line_number":258,"context_line":"                notify \u003d True"},{"line_number":259,"context_line":""},{"line_number":260,"context_line":"        if notify:"},{"line_number":261,"context_line":"            self._notify_ha_interfaces_updated(context, router_db.id,"},{"line_number":262,"context_line":"                                               \u0027add_ha_interfaces\u0027)"},{"line_number":263,"context_line":"        return router_db"}],"source_content_type":"text/x-python","patch_set":48,"id":"baada198_c6b6f124","line":260,"updated":"2014-07-25 07:42:30.000000000","message":"nit: It seems \u0027notify\u0027 is not necessary. Just \"if router[\u0027ha\u0027]:\" is OK here.","commit_id":"6c24b0553b3b022f405fe61f0a3cf2dfbb360b0d"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"change_message_id":"30f8565d89d8d86524414d09b2053902f1aa8b1f","unresolved":false,"context_lines":[{"line_number":257,"context_line":"                self._add_ha(context, router_db)"},{"line_number":258,"context_line":"                notify \u003d True"},{"line_number":259,"context_line":""},{"line_number":260,"context_line":"        if notify:"},{"line_number":261,"context_line":"            self._notify_ha_interfaces_updated(context, router_db.id,"},{"line_number":262,"context_line":"                                               \u0027add_ha_interfaces\u0027)"},{"line_number":263,"context_line":"        return router_db"}],"source_content_type":"text/x-python","patch_set":48,"id":"baada198_78e21dd5","line":260,"in_reply_to":"baada198_c6b6f124","updated":"2014-07-25 10:42:40.000000000","message":"Done","commit_id":"6c24b0553b3b022f405fe61f0a3cf2dfbb360b0d"},{"author":{"_account_id":4395,"name":"Aaron Rosen","email":"aaronorosen@gmail.com","username":"arosen"},"change_message_id":"dbe50d93c30b583f3cf674f72b54da3f3d0905b9","unresolved":false,"context_lines":[{"line_number":85,"context_line":"class L3HARouterNetwork(model_base.BASEV2):"},{"line_number":86,"context_line":"    \"\"\"Host HA Network for a tenant."},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"    One HA Network is used per tenant, all HA Router port are created"},{"line_number":89,"context_line":"    on this type of network."},{"line_number":90,"context_line":"    \"\"\""},{"line_number":91,"context_line":""}],"source_content_type":"text/x-python","patch_set":55,"id":"baada198_89a5654a","line":88,"updated":"2014-08-06 06:08:52.000000000","message":"I think we should be able to figure this out without storing this mapping. What\u0027s your motivation for doing this?","commit_id":"8007512015565523c977631d1423be5fdd941ba2"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"aad3feda9c0d7361fd816e5f0567679e89fefa6c","unresolved":false,"context_lines":[{"line_number":85,"context_line":"class L3HARouterNetwork(model_base.BASEV2):"},{"line_number":86,"context_line":"    \"\"\"Host HA Network for a tenant."},{"line_number":87,"context_line":""},{"line_number":88,"context_line":"    One HA Network is used per tenant, all HA Router port are created"},{"line_number":89,"context_line":"    on this type of network."},{"line_number":90,"context_line":"    \"\"\""},{"line_number":91,"context_line":""}],"source_content_type":"text/x-python","patch_set":55,"id":"baada198_3b81fca0","line":88,"in_reply_to":"baada198_89a5654a","updated":"2014-08-06 06:37:37.000000000","message":"With this mapping you can implement get_ha_network in line 112 super easily. How else would you do it? You\u0027d have to mark the tenant\u0027s network with some special tag, not exactly pretty.","commit_id":"8007512015565523c977631d1423be5fdd941ba2"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"6f43111b174e319995047e9a4fe4213ea7b259b0","unresolved":false,"context_lines":[{"line_number":358,"context_line":"            ports.append(port_dict)"},{"line_number":359,"context_line":""},{"line_number":360,"context_line":"            if not host or (binding.agent and (binding.agent.host \u003d\u003d host)):"},{"line_number":361,"context_line":"                router \u003d routers_dict.get(binding.router_id)"},{"line_number":362,"context_line":"                router_ifaces \u003d router.get(constants.HA_INTERFACE_KEY, [])"},{"line_number":363,"context_line":"                router_ifaces.append(port_dict)"},{"line_number":364,"context_line":"                router[constants.HA_INTERFACE_KEY] \u003d router_ifaces"}],"source_content_type":"text/x-python","patch_set":55,"id":"baada198_2d5454c5","line":361,"updated":"2014-08-06 14:00:12.000000000","message":"Could we change the value for HA_INTERFACE_KEY from a list of dicts, to just a dict? Then, for example in populate_subnet_for ports you would pass [interface]. In the L3 HA agent the router object sent with RPC would have a single HA port and not a list of a single HA port, which makes more sense and will simplify the code a bit, see:\nhttps://review.openstack.org/#/c/70700/9/neutron/agent/l3_agent.py, line 528.\n\nWhat do you think Sylvain? Would this change simplify the code or make it more complicated, overall?","commit_id":"8007512015565523c977631d1423be5fdd941ba2"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"change_message_id":"6180e2ac41510dc136675221bf69b83741d00dd1","unresolved":false,"context_lines":[{"line_number":358,"context_line":"            ports.append(port_dict)"},{"line_number":359,"context_line":""},{"line_number":360,"context_line":"            if not host or (binding.agent and (binding.agent.host \u003d\u003d host)):"},{"line_number":361,"context_line":"                router \u003d routers_dict.get(binding.router_id)"},{"line_number":362,"context_line":"                router_ifaces \u003d router.get(constants.HA_INTERFACE_KEY, [])"},{"line_number":363,"context_line":"                router_ifaces.append(port_dict)"},{"line_number":364,"context_line":"                router[constants.HA_INTERFACE_KEY] \u003d router_ifaces"}],"source_content_type":"text/x-python","patch_set":55,"id":"baada198_a3ecf3f5","line":361,"in_reply_to":"baada198_2d5454c5","updated":"2014-08-06 14:58:52.000000000","message":"agreed, I\u0027ll do :)","commit_id":"8007512015565523c977631d1423be5fdd941ba2"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"57392ed5569b8dcb56c54f320f6a4297d0504d89","unresolved":false,"context_lines":[{"line_number":48,"context_line":"                      \u0027scheduled.\u0027)),"},{"line_number":49,"context_line":"    cfg.StrOpt(\u0027l3_ha_net_cidr\u0027,"},{"line_number":50,"context_line":"               default\u003d\u0027169.254.0.0/18\u0027,"},{"line_number":51,"context_line":"               help\u003d_(\u0027Network address used for the l3 ha admin network.\u0027)),"},{"line_number":52,"context_line":"]"},{"line_number":53,"context_line":"cfg.CONF.register_opts(L3_HA_OPTS)"},{"line_number":54,"context_line":""}],"source_content_type":"text/x-python","patch_set":57,"id":"baada198_ff1353b4","line":51,"updated":"2014-08-11 13:26:30.000000000","message":"ha \u003d\u003e HA","commit_id":"8bef433b2e52e85e3695ca4db84d33da8d808037"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"57392ed5569b8dcb56c54f320f6a4297d0504d89","unresolved":false,"context_lines":[{"line_number":182,"context_line":"        if max_agents:"},{"line_number":183,"context_line":"            if max_agents \u003e num_agents:"},{"line_number":184,"context_line":"                LOG.warn(_(\"Number of available agents lower than \""},{"line_number":185,"context_line":"                           \"max_l3_agents_per_router. L3 agents \""},{"line_number":186,"context_line":"                           \"available: %s\"), num_agents)"},{"line_number":187,"context_line":"            else:"},{"line_number":188,"context_line":"                num_agents \u003d max_agents"}],"source_content_type":"text/x-python","patch_set":57,"id":"baada198_9f4897b5","line":185,"updated":"2014-08-11 13:26:30.000000000","message":"please use log hints","commit_id":"8bef433b2e52e85e3695ca4db84d33da8d808037"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"1e87ba9af821e65fcb6247380677105eb4c4f842","unresolved":false,"context_lines":[{"line_number":27,"context_line":"from neutron.db import l3_dvr_db"},{"line_number":28,"context_line":"from neutron.db import model_base"},{"line_number":29,"context_line":"from neutron.db import models_v2"},{"line_number":30,"context_line":"from neutron.extensions import l3_ext_ha_mode as l3_ha"},{"line_number":31,"context_line":"from neutron.openstack.common import log as logging"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"VR_ID_RANGE \u003d set(range(1, 255))"}],"source_content_type":"text/x-python","patch_set":59,"id":"1abeadc6_0676bf3e","line":30,"updated":"2014-08-18 06:27:39.000000000","message":"from neutron.openstack.common.gettextutils import _LW","commit_id":"949dca6b537be509526c05b57772d0632993d8ff"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"9adc89fe1f42f04c48b1b74795146121b835ca5e","unresolved":false,"context_lines":[{"line_number":27,"context_line":"from neutron.db import l3_dvr_db"},{"line_number":28,"context_line":"from neutron.db import model_base"},{"line_number":29,"context_line":"from neutron.db import models_v2"},{"line_number":30,"context_line":"from neutron.extensions import l3_ext_ha_mode as l3_ha"},{"line_number":31,"context_line":"from neutron.openstack.common import log as logging"},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"VR_ID_RANGE \u003d set(range(1, 255))"}],"source_content_type":"text/x-python","patch_set":59,"id":"1abeadc6_cf56aa29","line":30,"in_reply_to":"1abeadc6_0676bf3e","updated":"2014-08-24 17:56:31.000000000","message":"Done","commit_id":"949dca6b537be509526c05b57772d0632993d8ff"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"c8e8c26c743e7faba5647226076a368989b0f8c1","unresolved":false,"context_lines":[{"line_number":102,"context_line":"    \"\"\"Mixin class to add the high availability mode.\"\"\""},{"line_number":103,"context_line":""},{"line_number":104,"context_line":"    extra_attributes \u003d ("},{"line_number":105,"context_line":"        l3_attrs_db.ExtraAttributesMixin.extra_attributes +"},{"line_number":106,"context_line":"        l3_dvr_db.L3_NAT_with_dvr_db_mixin.extra_attributes + ["},{"line_number":107,"context_line":"            {\u0027name\u0027: \u0027ha\u0027,"},{"line_number":108,"context_line":"             \u0027default\u0027: cfg.CONF.l3_ha},"}],"source_content_type":"text/x-python","patch_set":59,"id":"1abeadc6_abdc9813","line":105,"updated":"2014-08-19 23:49:57.000000000","message":"This doesn\u0027t inherit from ExtraAttributesMixin but the dvr_db_mixin does.  So, wouldn\u0027t we expect these to be added by that mixin and we don\u0027t need to do it here?\n\nThat makes me wonder why this list isn\u0027t built up in a method that uses calls to super to work through the class hierarchy and avoids there hard-coded references.  But, that is out of the scope of this patch.","commit_id":"949dca6b537be509526c05b57772d0632993d8ff"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"9adc89fe1f42f04c48b1b74795146121b835ca5e","unresolved":false,"context_lines":[{"line_number":102,"context_line":"    \"\"\"Mixin class to add the high availability mode.\"\"\""},{"line_number":103,"context_line":""},{"line_number":104,"context_line":"    extra_attributes \u003d ("},{"line_number":105,"context_line":"        l3_attrs_db.ExtraAttributesMixin.extra_attributes +"},{"line_number":106,"context_line":"        l3_dvr_db.L3_NAT_with_dvr_db_mixin.extra_attributes + ["},{"line_number":107,"context_line":"            {\u0027name\u0027: \u0027ha\u0027,"},{"line_number":108,"context_line":"             \u0027default\u0027: cfg.CONF.l3_ha},"}],"source_content_type":"text/x-python","patch_set":59,"id":"1abeadc6_efde06d9","line":105,"in_reply_to":"1abeadc6_abdc9813","updated":"2014-08-24 17:56:31.000000000","message":"I removed the explicit mention of l3_attrs_db.ExtraAttributesMixin.extra_attributes since as you said that should be taken care of by the DVR mixin.","commit_id":"949dca6b537be509526c05b57772d0632993d8ff"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"c8e8c26c743e7faba5647226076a368989b0f8c1","unresolved":false,"context_lines":[{"line_number":104,"context_line":"    extra_attributes \u003d ("},{"line_number":105,"context_line":"        l3_attrs_db.ExtraAttributesMixin.extra_attributes +"},{"line_number":106,"context_line":"        l3_dvr_db.L3_NAT_with_dvr_db_mixin.extra_attributes + ["},{"line_number":107,"context_line":"            {\u0027name\u0027: \u0027ha\u0027,"},{"line_number":108,"context_line":"             \u0027default\u0027: cfg.CONF.l3_ha},"},{"line_number":109,"context_line":"            {\u0027name\u0027: \u0027ha_vr_id\u0027,"},{"line_number":110,"context_line":"             \u0027default\u0027: 0}])"}],"source_content_type":"text/x-python","patch_set":59,"id":"1abeadc6_54000667","line":107,"updated":"2014-08-19 23:49:57.000000000","message":"nit:  Too many newlines.","commit_id":"949dca6b537be509526c05b57772d0632993d8ff"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"9adc89fe1f42f04c48b1b74795146121b835ca5e","unresolved":false,"context_lines":[{"line_number":104,"context_line":"    extra_attributes \u003d ("},{"line_number":105,"context_line":"        l3_attrs_db.ExtraAttributesMixin.extra_attributes +"},{"line_number":106,"context_line":"        l3_dvr_db.L3_NAT_with_dvr_db_mixin.extra_attributes + ["},{"line_number":107,"context_line":"            {\u0027name\u0027: \u0027ha\u0027,"},{"line_number":108,"context_line":"             \u0027default\u0027: cfg.CONF.l3_ha},"},{"line_number":109,"context_line":"            {\u0027name\u0027: \u0027ha_vr_id\u0027,"},{"line_number":110,"context_line":"             \u0027default\u0027: 0}])"}],"source_content_type":"text/x-python","patch_set":59,"id":"1abeadc6_0ff1826a","line":107,"in_reply_to":"1abeadc6_54000667","updated":"2014-08-24 17:56:31.000000000","message":"Done","commit_id":"949dca6b537be509526c05b57772d0632993d8ff"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"c8e8c26c743e7faba5647226076a368989b0f8c1","unresolved":false,"context_lines":[{"line_number":119,"context_line":"            query \u003d context.session.query(l3_db.Router).with_lockmode(\u0027update\u0027)"},{"line_number":120,"context_line":"            query \u003d query.filter(l3_db.Router.tenant_id \u003d\u003d router.tenant_id)"},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"            allocated_vr_ids \u003d set([r.extra_attributes.ha_vr_id"},{"line_number":123,"context_line":"                                    for r in query])"},{"line_number":124,"context_line":"            available_vr_ids \u003d VR_ID_RANGE - allocated_vr_ids"},{"line_number":125,"context_line":"            if not available_vr_ids:"}],"source_content_type":"text/x-python","patch_set":59,"id":"1abeadc6_6b55204f","line":122,"updated":"2014-08-19 23:49:57.000000000","message":"pico-nit:  The square brackets can be removed from the set initialization.","commit_id":"949dca6b537be509526c05b57772d0632993d8ff"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"9adc89fe1f42f04c48b1b74795146121b835ca5e","unresolved":false,"context_lines":[{"line_number":119,"context_line":"            query \u003d context.session.query(l3_db.Router).with_lockmode(\u0027update\u0027)"},{"line_number":120,"context_line":"            query \u003d query.filter(l3_db.Router.tenant_id \u003d\u003d router.tenant_id)"},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"            allocated_vr_ids \u003d set([r.extra_attributes.ha_vr_id"},{"line_number":123,"context_line":"                                    for r in query])"},{"line_number":124,"context_line":"            available_vr_ids \u003d VR_ID_RANGE - allocated_vr_ids"},{"line_number":125,"context_line":"            if not available_vr_ids:"}],"source_content_type":"text/x-python","patch_set":59,"id":"1abeadc6_afffae32","line":122,"in_reply_to":"1abeadc6_6b55204f","updated":"2014-08-24 17:56:31.000000000","message":"Done","commit_id":"949dca6b537be509526c05b57772d0632993d8ff"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"c8e8c26c743e7faba5647226076a368989b0f8c1","unresolved":false,"context_lines":[{"line_number":128,"context_line":""},{"line_number":129,"context_line":"    def _create_ha_subnet(self, context, ha_network):"},{"line_number":130,"context_line":"        ha_cidr \u003d cfg.CONF.l3_ha_net_cidr"},{"line_number":131,"context_line":"        net \u003d netaddr.IPNetwork(ha_cidr)"},{"line_number":132,"context_line":""},{"line_number":133,"context_line":"        if (\u0027/\u0027 not in ha_cidr or net.network !\u003d net.ip):"},{"line_number":134,"context_line":"            raise l3_ha.HANetworkCIDRNotValid(cidr\u003dha_cidr)"}],"source_content_type":"text/x-python","patch_set":59,"id":"1abeadc6_2b6fa8fe","line":131,"updated":"2014-08-19 23:49:57.000000000","message":"nit:  This could be set at the class or instance scope since it doesn\u0027t change.","commit_id":"949dca6b537be509526c05b57772d0632993d8ff"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"9adc89fe1f42f04c48b1b74795146121b835ca5e","unresolved":false,"context_lines":[{"line_number":128,"context_line":""},{"line_number":129,"context_line":"    def _create_ha_subnet(self, context, ha_network):"},{"line_number":130,"context_line":"        ha_cidr \u003d cfg.CONF.l3_ha_net_cidr"},{"line_number":131,"context_line":"        net \u003d netaddr.IPNetwork(ha_cidr)"},{"line_number":132,"context_line":""},{"line_number":133,"context_line":"        if (\u0027/\u0027 not in ha_cidr or net.network !\u003d net.ip):"},{"line_number":134,"context_line":"            raise l3_ha.HANetworkCIDRNotValid(cidr\u003dha_cidr)"}],"source_content_type":"text/x-python","patch_set":59,"id":"1abeadc6_8fb2f291","line":131,"in_reply_to":"1abeadc6_2b6fa8fe","updated":"2014-08-24 17:56:31.000000000","message":"Done","commit_id":"949dca6b537be509526c05b57772d0632993d8ff"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"c8e8c26c743e7faba5647226076a368989b0f8c1","unresolved":false,"context_lines":[{"line_number":131,"context_line":"        net \u003d netaddr.IPNetwork(ha_cidr)"},{"line_number":132,"context_line":""},{"line_number":133,"context_line":"        if (\u0027/\u0027 not in ha_cidr or net.network !\u003d net.ip):"},{"line_number":134,"context_line":"            raise l3_ha.HANetworkCIDRNotValid(cidr\u003dha_cidr)"},{"line_number":135,"context_line":""},{"line_number":136,"context_line":"        args \u003d {\u0027subnet\u0027:"},{"line_number":137,"context_line":"                {\u0027network_id\u0027: ha_network.network[\u0027id\u0027],"}],"source_content_type":"text/x-python","patch_set":59,"id":"1abeadc6_ab301802","line":134,"updated":"2014-08-19 23:49:57.000000000","message":"This seems like something to check earlier so that the deployer can deal with it as early as possible.  This kind of goes with L131\u0027s comment.","commit_id":"949dca6b537be509526c05b57772d0632993d8ff"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"9adc89fe1f42f04c48b1b74795146121b835ca5e","unresolved":false,"context_lines":[{"line_number":131,"context_line":"        net \u003d netaddr.IPNetwork(ha_cidr)"},{"line_number":132,"context_line":""},{"line_number":133,"context_line":"        if (\u0027/\u0027 not in ha_cidr or net.network !\u003d net.ip):"},{"line_number":134,"context_line":"            raise l3_ha.HANetworkCIDRNotValid(cidr\u003dha_cidr)"},{"line_number":135,"context_line":""},{"line_number":136,"context_line":"        args \u003d {\u0027subnet\u0027:"},{"line_number":137,"context_line":"                {\u0027network_id\u0027: ha_network.network[\u0027id\u0027],"}],"source_content_type":"text/x-python","patch_set":59,"id":"1abeadc6_efa36640","line":134,"in_reply_to":"1abeadc6_ab301802","updated":"2014-08-24 17:56:31.000000000","message":"Good point. Also If line 131 failed it wouldd actually throw a hard to understand exception.","commit_id":"949dca6b537be509526c05b57772d0632993d8ff"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"c8e8c26c743e7faba5647226076a368989b0f8c1","unresolved":false,"context_lines":[{"line_number":175,"context_line":"        # TODO(safchain): use oslo.config types to check the validity"},{"line_number":176,"context_line":"        # when it will be available"},{"line_number":177,"context_line":"        if min_agents \u003c 2:"},{"line_number":178,"context_line":"            raise l3_ha.HAMinimumAgentsNumberNotValid()"},{"line_number":179,"context_line":""},{"line_number":180,"context_line":"        num_agents \u003d len(self.get_l3_agents(context))"},{"line_number":181,"context_line":"        max_agents \u003d cfg.CONF.max_l3_agents_per_router"}],"source_content_type":"text/x-python","patch_set":59,"id":"1abeadc6_be3054e9","line":178,"updated":"2014-08-19 23:49:57.000000000","message":"This also seems like something that could be checked earlier because the deployer will have to deal with it.  Maybe even a fatal error at start-up since this is bad config.","commit_id":"949dca6b537be509526c05b57772d0632993d8ff"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"9adc89fe1f42f04c48b1b74795146121b835ca5e","unresolved":false,"context_lines":[{"line_number":175,"context_line":"        # TODO(safchain): use oslo.config types to check the validity"},{"line_number":176,"context_line":"        # when it will be available"},{"line_number":177,"context_line":"        if min_agents \u003c 2:"},{"line_number":178,"context_line":"            raise l3_ha.HAMinimumAgentsNumberNotValid()"},{"line_number":179,"context_line":""},{"line_number":180,"context_line":"        num_agents \u003d len(self.get_l3_agents(context))"},{"line_number":181,"context_line":"        max_agents \u003d cfg.CONF.max_l3_agents_per_router"}],"source_content_type":"text/x-python","patch_set":59,"id":"1abeadc6_6f46767c","line":178,"in_reply_to":"1abeadc6_be3054e9","updated":"2014-08-24 17:56:31.000000000","message":"I agree.","commit_id":"949dca6b537be509526c05b57772d0632993d8ff"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"1e87ba9af821e65fcb6247380677105eb4c4f842","unresolved":false,"context_lines":[{"line_number":183,"context_line":"            if max_agents \u003e num_agents:"},{"line_number":184,"context_line":"                LOG.warn(_(\"Number of available agents lower than \""},{"line_number":185,"context_line":"                           \"max_l3_agents_per_router. L3 agents \""},{"line_number":186,"context_line":"                           \"available: %s\"), num_agents)"},{"line_number":187,"context_line":"            else:"},{"line_number":188,"context_line":"                num_agents \u003d max_agents"},{"line_number":189,"context_line":""}],"source_content_type":"text/x-python","patch_set":59,"id":"1abeadc6_66a693c3","line":186,"updated":"2014-08-18 06:27:39.000000000","message":"use _LW instead of _ for log translations","commit_id":"949dca6b537be509526c05b57772d0632993d8ff"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"9adc89fe1f42f04c48b1b74795146121b835ca5e","unresolved":false,"context_lines":[{"line_number":183,"context_line":"            if max_agents \u003e num_agents:"},{"line_number":184,"context_line":"                LOG.warn(_(\"Number of available agents lower than \""},{"line_number":185,"context_line":"                           \"max_l3_agents_per_router. L3 agents \""},{"line_number":186,"context_line":"                           \"available: %s\"), num_agents)"},{"line_number":187,"context_line":"            else:"},{"line_number":188,"context_line":"                num_agents \u003d max_agents"},{"line_number":189,"context_line":""}],"source_content_type":"text/x-python","patch_set":59,"id":"1abeadc6_ef51a630","line":186,"in_reply_to":"1abeadc6_66a693c3","updated":"2014-08-24 17:56:31.000000000","message":"Done","commit_id":"949dca6b537be509526c05b57772d0632993d8ff"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"c8e8c26c743e7faba5647226076a368989b0f8c1","unresolved":false,"context_lines":[{"line_number":195,"context_line":""},{"line_number":196,"context_line":"    def add_ha_port(self, context, router_id, network_id):"},{"line_number":197,"context_line":"        admin_ctx \u003d context.elevated()"},{"line_number":198,"context_line":"        device_name \u003d \u0027HA Router VRRP port\u0027"},{"line_number":199,"context_line":""},{"line_number":200,"context_line":"        port \u003d self._core_plugin.create_port(admin_ctx, {"},{"line_number":201,"context_line":"            \u0027port\u0027:"}],"source_content_type":"text/x-python","patch_set":59,"id":"1abeadc6_ded19058","line":198,"updated":"2014-08-19 23:49:57.000000000","message":"A module level constant, maybe?","commit_id":"949dca6b537be509526c05b57772d0632993d8ff"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"9adc89fe1f42f04c48b1b74795146121b835ca5e","unresolved":false,"context_lines":[{"line_number":195,"context_line":""},{"line_number":196,"context_line":"    def add_ha_port(self, context, router_id, network_id):"},{"line_number":197,"context_line":"        admin_ctx \u003d context.elevated()"},{"line_number":198,"context_line":"        device_name \u003d \u0027HA Router VRRP port\u0027"},{"line_number":199,"context_line":""},{"line_number":200,"context_line":"        port \u003d self._core_plugin.create_port(admin_ctx, {"},{"line_number":201,"context_line":"            \u0027port\u0027:"}],"source_content_type":"text/x-python","patch_set":59,"id":"1abeadc6_13252cae","line":198,"in_reply_to":"1abeadc6_ded19058","updated":"2014-08-24 17:56:31.000000000","message":"Done","commit_id":"949dca6b537be509526c05b57772d0632993d8ff"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"c8e8c26c743e7faba5647226076a368989b0f8c1","unresolved":false,"context_lines":[{"line_number":229,"context_line":"        else:"},{"line_number":230,"context_line":"            subnet \u003d subnets[0]"},{"line_number":231,"context_line":""},{"line_number":232,"context_line":"        router_id \u003d router.id"},{"line_number":233,"context_line":"        num_agents \u003d self._get_number_of_agents(context)"},{"line_number":234,"context_line":""},{"line_number":235,"context_line":"        port_ids \u003d []"}],"source_content_type":"text/x-python","patch_set":59,"id":"1abeadc6_be1694ef","line":232,"updated":"2014-08-19 23:49:57.000000000","message":"nit:  temporary has little value.","commit_id":"949dca6b537be509526c05b57772d0632993d8ff"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"9adc89fe1f42f04c48b1b74795146121b835ca5e","unresolved":false,"context_lines":[{"line_number":229,"context_line":"        else:"},{"line_number":230,"context_line":"            subnet \u003d subnets[0]"},{"line_number":231,"context_line":""},{"line_number":232,"context_line":"        router_id \u003d router.id"},{"line_number":233,"context_line":"        num_agents \u003d self._get_number_of_agents(context)"},{"line_number":234,"context_line":""},{"line_number":235,"context_line":"        port_ids \u003d []"}],"source_content_type":"text/x-python","patch_set":59,"id":"1abeadc6_6f3d96dc","line":232,"in_reply_to":"1abeadc6_be1694ef","updated":"2014-08-24 17:56:31.000000000","message":"Done","commit_id":"949dca6b537be509526c05b57772d0632993d8ff"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"c8e8c26c743e7faba5647226076a368989b0f8c1","unresolved":false,"context_lines":[{"line_number":233,"context_line":"        num_agents \u003d self._get_number_of_agents(context)"},{"line_number":234,"context_line":""},{"line_number":235,"context_line":"        port_ids \u003d []"},{"line_number":236,"context_line":"        for index in range(num_agents):"},{"line_number":237,"context_line":"            device_name \u003d \u0027HA Router VRRP port\u0027"},{"line_number":238,"context_line":""},{"line_number":239,"context_line":"            port \u003d self._core_plugin.create_port(admin_ctx, {"}],"source_content_type":"text/x-python","patch_set":59,"id":"1abeadc6_1edf883c","line":236,"updated":"2014-08-19 23:49:57.000000000","message":"consider using \u0027_\u0027 since this variable is never read.","commit_id":"949dca6b537be509526c05b57772d0632993d8ff"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"9adc89fe1f42f04c48b1b74795146121b835ca5e","unresolved":false,"context_lines":[{"line_number":233,"context_line":"        num_agents \u003d self._get_number_of_agents(context)"},{"line_number":234,"context_line":""},{"line_number":235,"context_line":"        port_ids \u003d []"},{"line_number":236,"context_line":"        for index in range(num_agents):"},{"line_number":237,"context_line":"            device_name \u003d \u0027HA Router VRRP port\u0027"},{"line_number":238,"context_line":""},{"line_number":239,"context_line":"            port \u003d self._core_plugin.create_port(admin_ctx, {"}],"source_content_type":"text/x-python","patch_set":59,"id":"1abeadc6_ef28c698","line":236,"in_reply_to":"1abeadc6_1edf883c","updated":"2014-08-24 17:56:31.000000000","message":"I don\u0027t think we can use \u0027_\u0027 because of the translation mechanism, but I may be wrong.","commit_id":"949dca6b537be509526c05b57772d0632993d8ff"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"c8e8c26c743e7faba5647226076a368989b0f8c1","unresolved":false,"context_lines":[{"line_number":234,"context_line":""},{"line_number":235,"context_line":"        port_ids \u003d []"},{"line_number":236,"context_line":"        for index in range(num_agents):"},{"line_number":237,"context_line":"            device_name \u003d \u0027HA Router VRRP port\u0027"},{"line_number":238,"context_line":""},{"line_number":239,"context_line":"            port \u003d self._core_plugin.create_port(admin_ctx, {"},{"line_number":240,"context_line":"                \u0027port\u0027:"}],"source_content_type":"text/x-python","patch_set":59,"id":"1abeadc6_beedb4f1","line":237,"updated":"2014-08-19 23:49:57.000000000","message":"Same as L198.  Module level constant?  Or, maybe in \u0027constants\u0027","commit_id":"949dca6b537be509526c05b57772d0632993d8ff"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"9adc89fe1f42f04c48b1b74795146121b835ca5e","unresolved":false,"context_lines":[{"line_number":234,"context_line":""},{"line_number":235,"context_line":"        port_ids \u003d []"},{"line_number":236,"context_line":"        for index in range(num_agents):"},{"line_number":237,"context_line":"            device_name \u003d \u0027HA Router VRRP port\u0027"},{"line_number":238,"context_line":""},{"line_number":239,"context_line":"            port \u003d self._core_plugin.create_port(admin_ctx, {"},{"line_number":240,"context_line":"                \u0027port\u0027:"}],"source_content_type":"text/x-python","patch_set":59,"id":"1abeadc6_f318b077","line":237,"in_reply_to":"1abeadc6_beedb4f1","updated":"2014-08-24 17:56:31.000000000","message":"Done","commit_id":"949dca6b537be509526c05b57772d0632993d8ff"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"c8e8c26c743e7faba5647226076a368989b0f8c1","unresolved":false,"context_lines":[{"line_number":281,"context_line":"                                               \u0027add_ha_interfaces\u0027)"},{"line_number":282,"context_line":"        return router_db"},{"line_number":283,"context_line":""},{"line_number":284,"context_line":"    def _update_router_db(self, context, router_id, data, gw_info):"},{"line_number":285,"context_line":"        ha_updated_to \u003d None"},{"line_number":286,"context_line":"        ha \u003d data.pop(\u0027ha\u0027, None)"},{"line_number":287,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"}],"source_content_type":"text/x-python","patch_set":59,"id":"1abeadc6_61146144","line":284,"updated":"2014-08-19 23:49:57.000000000","message":"I wonder if this method could flow a bit better...\n\n    def _update_router_db(self, context, router_id, data, gw_info):\n        ha \u003d data.pop(\u0027ha\u0027, None)\n        with context.session.begin(subtransactions\u003dTrue):\n            router_db \u003d super(L3_HA_NAT_db_mixin, self)._update_router_db(\n                context, router_id, data, gw_info)\n\n            if ha is None or router_db.extra_attributes.ha \u003d\u003d ha:\n                return router_db\n\n            router_db.extra_attributes.ha \u003d ha\n            if not ha:\n                router_db.extra_attributes.ha_vr_id \u003d None\n\n        if ha:\n            self._set_vr_id(context, router_db)\n            self._create_ha_interfaces(context, router_db)\n            self._notify_ha_interfaces_updated(context, router_db.id,\n                                               \u0027add_ha_interfaces\u0027)\n        else:\n            self._delete_ha_interfaces(context, router_db)\n            self._notify_ha_interfaces_updated(context, router_db.id,\n                                               \u0027del_ha_interfaces\u0027)\n\n        return router_db\n\nTo me, this reads better by eliminating \"ha_updated_to\", returning from the method early if there is no HA change, and simplifying the conditionals.","commit_id":"949dca6b537be509526c05b57772d0632993d8ff"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"9adc89fe1f42f04c48b1b74795146121b835ca5e","unresolved":false,"context_lines":[{"line_number":281,"context_line":"                                               \u0027add_ha_interfaces\u0027)"},{"line_number":282,"context_line":"        return router_db"},{"line_number":283,"context_line":""},{"line_number":284,"context_line":"    def _update_router_db(self, context, router_id, data, gw_info):"},{"line_number":285,"context_line":"        ha_updated_to \u003d None"},{"line_number":286,"context_line":"        ha \u003d data.pop(\u0027ha\u0027, None)"},{"line_number":287,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"}],"source_content_type":"text/x-python","patch_set":59,"id":"1abeadc6_3351480f","line":284,"in_reply_to":"1abeadc6_61146144","updated":"2014-08-24 17:56:31.000000000","message":"Putting my reviewer hat on (I didn\u0027t write this code initially) I think you\u0027re right. Your approach is a bit simpler / takes me less time to get it.","commit_id":"949dca6b537be509526c05b57772d0632993d8ff"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"c8e8c26c743e7faba5647226076a368989b0f8c1","unresolved":false,"context_lines":[{"line_number":283,"context_line":""},{"line_number":284,"context_line":"    def _update_router_db(self, context, router_id, data, gw_info):"},{"line_number":285,"context_line":"        ha_updated_to \u003d None"},{"line_number":286,"context_line":"        ha \u003d data.pop(\u0027ha\u0027, None)"},{"line_number":287,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":288,"context_line":"            router_db \u003d super(L3_HA_NAT_db_mixin, self)._update_router_db("},{"line_number":289,"context_line":"                context, router_id, data, gw_info)"}],"source_content_type":"text/x-python","patch_set":59,"id":"1abeadc6_0152cd12","line":286,"updated":"2014-08-19 23:49:57.000000000","message":"Can the super method not handle \u0027ha\u0027 attribute in the data?  Just curious why it needs to be popped.  Not a big deal.","commit_id":"949dca6b537be509526c05b57772d0632993d8ff"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"9adc89fe1f42f04c48b1b74795146121b835ca5e","unresolved":false,"context_lines":[{"line_number":283,"context_line":""},{"line_number":284,"context_line":"    def _update_router_db(self, context, router_id, data, gw_info):"},{"line_number":285,"context_line":"        ha_updated_to \u003d None"},{"line_number":286,"context_line":"        ha \u003d data.pop(\u0027ha\u0027, None)"},{"line_number":287,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":288,"context_line":"            router_db \u003d super(L3_HA_NAT_db_mixin, self)._update_router_db("},{"line_number":289,"context_line":"                context, router_id, data, gw_info)"}],"source_content_type":"text/x-python","patch_set":59,"id":"1abeadc6_33d4e846","line":286,"in_reply_to":"1abeadc6_0152cd12","updated":"2014-08-24 17:56:31.000000000","message":"Changing the pop to get introduced a bunch of test failures. I guess the answer is no. I didn\u0027t want to spend any time on this to figure it out since it seems not important at this time.","commit_id":"949dca6b537be509526c05b57772d0632993d8ff"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"f1874420672010e825ab95f4a4fab3e038992f98","unresolved":false,"context_lines":[{"line_number":283,"context_line":""},{"line_number":284,"context_line":"    def _update_router_db(self, context, router_id, data, gw_info):"},{"line_number":285,"context_line":"        ha_updated_to \u003d None"},{"line_number":286,"context_line":"        ha \u003d data.pop(\u0027ha\u0027, None)"},{"line_number":287,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":288,"context_line":"            router_db \u003d super(L3_HA_NAT_db_mixin, self)._update_router_db("},{"line_number":289,"context_line":"                context, router_id, data, gw_info)"}],"source_content_type":"text/x-python","patch_set":59,"id":"1abeadc6_c2d99758","line":286,"in_reply_to":"1abeadc6_33d4e846","updated":"2014-08-27 22:14:00.000000000","message":"Fair enough.","commit_id":"949dca6b537be509526c05b57772d0632993d8ff"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"c8e8c26c743e7faba5647226076a368989b0f8c1","unresolved":false,"context_lines":[{"line_number":337,"context_line":"    def _process_sync_ha_data(self, context, routers, host):"},{"line_number":338,"context_line":"        routers_dict \u003d {}"},{"line_number":339,"context_line":"        for router in routers:"},{"line_number":340,"context_line":"            routers_dict[router[\u0027id\u0027]] \u003d router"},{"line_number":341,"context_line":""},{"line_number":342,"context_line":"        bindings \u003d self.get_ha_router_port_binding(context,"},{"line_number":343,"context_line":"                                                   routers_dict.keys(),"}],"source_content_type":"text/x-python","patch_set":59,"id":"1abeadc6_e1ea310e","line":340,"updated":"2014-08-19 23:49:57.000000000","message":"nit:  Consider a \"dict comprehension\"\n\nrouters_dict \u003d dict((router[\u0027id\u0027], router) for router in routers)","commit_id":"949dca6b537be509526c05b57772d0632993d8ff"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"9adc89fe1f42f04c48b1b74795146121b835ca5e","unresolved":false,"context_lines":[{"line_number":337,"context_line":"    def _process_sync_ha_data(self, context, routers, host):"},{"line_number":338,"context_line":"        routers_dict \u003d {}"},{"line_number":339,"context_line":"        for router in routers:"},{"line_number":340,"context_line":"            routers_dict[router[\u0027id\u0027]] \u003d router"},{"line_number":341,"context_line":""},{"line_number":342,"context_line":"        bindings \u003d self.get_ha_router_port_binding(context,"},{"line_number":343,"context_line":"                                                   routers_dict.keys(),"}],"source_content_type":"text/x-python","patch_set":59,"id":"1abeadc6_d332d4f1","line":340,"in_reply_to":"1abeadc6_e1ea310e","updated":"2014-08-24 17:56:31.000000000","message":"Done","commit_id":"949dca6b537be509526c05b57772d0632993d8ff"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"c8e8c26c743e7faba5647226076a368989b0f8c1","unresolved":false,"context_lines":[{"line_number":356,"context_line":""},{"line_number":357,"context_line":"        return routers_dict.values()"},{"line_number":358,"context_line":""},{"line_number":359,"context_line":"    def get_sync_data(self, context, host, router_ids\u003dNone, active\u003dNone):"},{"line_number":360,"context_line":"        sync_data \u003d super(L3_HA_NAT_db_mixin, self).get_sync_data(context,"},{"line_number":361,"context_line":"                                                                  router_ids,"},{"line_number":362,"context_line":"                                                                  active)"}],"source_content_type":"text/x-python","patch_set":59,"id":"1abeadc6_010acdd1","line":359,"updated":"2014-08-19 23:49:57.000000000","message":"I don\u0027t like adding this host parameter to this get_sync_data.  Should this method be named something different to avoid the appearance that it is compatible with the other?","commit_id":"949dca6b537be509526c05b57772d0632993d8ff"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"9adc89fe1f42f04c48b1b74795146121b835ca5e","unresolved":false,"context_lines":[{"line_number":356,"context_line":""},{"line_number":357,"context_line":"        return routers_dict.values()"},{"line_number":358,"context_line":""},{"line_number":359,"context_line":"    def get_sync_data(self, context, host, router_ids\u003dNone, active\u003dNone):"},{"line_number":360,"context_line":"        sync_data \u003d super(L3_HA_NAT_db_mixin, self).get_sync_data(context,"},{"line_number":361,"context_line":"                                                                  router_ids,"},{"line_number":362,"context_line":"                                                                  active)"}],"source_content_type":"text/x-python","patch_set":59,"id":"1abeadc6_0f3422fa","line":359,"in_reply_to":"1abeadc6_010acdd1","updated":"2014-08-24 17:56:31.000000000","message":"Done","commit_id":"949dca6b537be509526c05b57772d0632993d8ff"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"da51e192303ef1d2abb3501347bc6045344ba768","unresolved":false,"context_lines":[{"line_number":175,"context_line":"            return ha_network"},{"line_number":176,"context_line":""},{"line_number":177,"context_line":"    def _get_number_of_agents(self, context):"},{"line_number":178,"context_line":"        \"\"\" Return the number of agents on which the router will be scheduled."},{"line_number":179,"context_line":""},{"line_number":180,"context_line":"        Raises an exception if there is not enough agent available to honor"},{"line_number":181,"context_line":"        the min_agents config parameter."}],"source_content_type":"text/x-python","patch_set":60,"id":"1abeadc6_39ee75b5","line":178,"updated":"2014-08-25 13:27:52.000000000","message":"Nit; remove leading space.","commit_id":"91db4c9bc5f7cbb420532b384c35b2ad4cd62b7c"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"ffedd3e2b5323ee3d26b9e32db9f43b8dd3f156e","unresolved":false,"context_lines":[{"line_number":175,"context_line":"            return ha_network"},{"line_number":176,"context_line":""},{"line_number":177,"context_line":"    def _get_number_of_agents(self, context):"},{"line_number":178,"context_line":"        \"\"\" Return the number of agents on which the router will be scheduled."},{"line_number":179,"context_line":""},{"line_number":180,"context_line":"        Raises an exception if there is not enough agent available to honor"},{"line_number":181,"context_line":"        the min_agents config parameter."}],"source_content_type":"text/x-python","patch_set":60,"id":"1abeadc6_f8522e67","line":178,"in_reply_to":"1abeadc6_39ee75b5","updated":"2014-08-25 17:10:30.000000000","message":"Done","commit_id":"91db4c9bc5f7cbb420532b384c35b2ad4cd62b7c"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"da51e192303ef1d2abb3501347bc6045344ba768","unresolved":false,"context_lines":[{"line_number":177,"context_line":"    def _get_number_of_agents(self, context):"},{"line_number":178,"context_line":"        \"\"\" Return the number of agents on which the router will be scheduled."},{"line_number":179,"context_line":""},{"line_number":180,"context_line":"        Raises an exception if there is not enough agent available to honor"},{"line_number":181,"context_line":"        the min_agents config parameter."},{"line_number":182,"context_line":"        If the max_agents parameter is set to 0 all the agents will be used."},{"line_number":183,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":60,"id":"1abeadc6_9934e94b","line":180,"updated":"2014-08-25 13:27:52.000000000","message":"is -\u003e are\n\nagent -\u003e agents","commit_id":"91db4c9bc5f7cbb420532b384c35b2ad4cd62b7c"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"ffedd3e2b5323ee3d26b9e32db9f43b8dd3f156e","unresolved":false,"context_lines":[{"line_number":177,"context_line":"    def _get_number_of_agents(self, context):"},{"line_number":178,"context_line":"        \"\"\" Return the number of agents on which the router will be scheduled."},{"line_number":179,"context_line":""},{"line_number":180,"context_line":"        Raises an exception if there is not enough agent available to honor"},{"line_number":181,"context_line":"        the min_agents config parameter."},{"line_number":182,"context_line":"        If the max_agents parameter is set to 0 all the agents will be used."},{"line_number":183,"context_line":"        \"\"\""}],"source_content_type":"text/x-python","patch_set":60,"id":"1abeadc6_1850ca5d","line":180,"in_reply_to":"1abeadc6_9934e94b","updated":"2014-08-25 17:10:30.000000000","message":"Done","commit_id":"91db4c9bc5f7cbb420532b384c35b2ad4cd62b7c"},{"author":{"_account_id":7987,"name":"Ivar Lazzaro","email":"ivarlazzaro@gmail.com","username":"Ivar"},"change_message_id":"29ae22df88662dc01aaba3f40170fbd6776121cf","unresolved":false,"context_lines":[{"line_number":74,"context_line":"                          nullable\u003dFalse)"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"    l3_agent_id \u003d sa.Column(sa.String(36),"},{"line_number":77,"context_line":"                            sa.ForeignKey(\"agents.id\","},{"line_number":78,"context_line":"                                          ondelete\u003d\u0027CASCADE\u0027))"},{"line_number":79,"context_line":"    agent \u003d orm.relationship(agents_db.Agent)"},{"line_number":80,"context_line":""}],"source_content_type":"text/x-python","patch_set":70,"id":"1abeadc6_22db027d","line":77,"updated":"2014-08-28 20:33:17.000000000","message":"nit: use single quotes here","commit_id":"1fef6ff9362574429f15ab7da35a43c0aaa22721"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"224e675d43500778c521a401c53e4f286b4af2bf","unresolved":false,"context_lines":[{"line_number":74,"context_line":"                          nullable\u003dFalse)"},{"line_number":75,"context_line":""},{"line_number":76,"context_line":"    l3_agent_id \u003d sa.Column(sa.String(36),"},{"line_number":77,"context_line":"                            sa.ForeignKey(\"agents.id\","},{"line_number":78,"context_line":"                                          ondelete\u003d\u0027CASCADE\u0027))"},{"line_number":79,"context_line":"    agent \u003d orm.relationship(agents_db.Agent)"},{"line_number":80,"context_line":""}],"source_content_type":"text/x-python","patch_set":70,"id":"1abeadc6_a6446147","line":77,"in_reply_to":"1abeadc6_22db027d","updated":"2014-08-29 20:42:43.000000000","message":"Why?  While I might be a stickler for consistent use of quotes in my personal code, I don\u0027t see much value in enforcing this in an upstream code review.  Is there a policy about this you\u0027d care to point to?","commit_id":"1fef6ff9362574429f15ab7da35a43c0aaa22721"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"224e675d43500778c521a401c53e4f286b4af2bf","unresolved":false,"context_lines":[{"line_number":92,"context_line":""},{"line_number":93,"context_line":"    __tablename__ \u003d \u0027ha_router_networks\u0027"},{"line_number":94,"context_line":""},{"line_number":95,"context_line":"    tenant_id \u003d sa.Column(sa.String(255), primary_key\u003dTrue)"},{"line_number":96,"context_line":"    network_id \u003d sa.Column(sa.String(36),"},{"line_number":97,"context_line":"                           sa.ForeignKey(\u0027networks.id\u0027, ondelete\u003d\"CASCADE\"),"},{"line_number":98,"context_line":"                           nullable\u003dFalse, primary_key\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":70,"id":"1abeadc6_23aebb81","line":95,"updated":"2014-08-29 20:42:43.000000000","message":"Why should the tenant_id be allowed to be null?","commit_id":"1fef6ff9362574429f15ab7da35a43c0aaa22721"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"8cec662ede168cd5991e174084a79d98b901b669","unresolved":false,"context_lines":[{"line_number":92,"context_line":""},{"line_number":93,"context_line":"    __tablename__ \u003d \u0027ha_router_networks\u0027"},{"line_number":94,"context_line":""},{"line_number":95,"context_line":"    tenant_id \u003d sa.Column(sa.String(255), primary_key\u003dTrue)"},{"line_number":96,"context_line":"    network_id \u003d sa.Column(sa.String(36),"},{"line_number":97,"context_line":"                           sa.ForeignKey(\u0027networks.id\u0027, ondelete\u003d\"CASCADE\"),"},{"line_number":98,"context_line":"                           nullable\u003dFalse, primary_key\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":70,"id":"fa98f980_0e9e7156","line":95,"in_reply_to":"1abeadc6_23aebb81","updated":"2014-09-02 19:48:18.000000000","message":"It shouldn\u0027t.","commit_id":"1fef6ff9362574429f15ab7da35a43c0aaa22721"},{"author":{"_account_id":7987,"name":"Ivar Lazzaro","email":"ivarlazzaro@gmail.com","username":"Ivar"},"change_message_id":"29ae22df88662dc01aaba3f40170fbd6776121cf","unresolved":false,"context_lines":[{"line_number":94,"context_line":""},{"line_number":95,"context_line":"    tenant_id \u003d sa.Column(sa.String(255), primary_key\u003dTrue)"},{"line_number":96,"context_line":"    network_id \u003d sa.Column(sa.String(36),"},{"line_number":97,"context_line":"                           sa.ForeignKey(\u0027networks.id\u0027, ondelete\u003d\"CASCADE\"),"},{"line_number":98,"context_line":"                           nullable\u003dFalse, primary_key\u003dTrue)"},{"line_number":99,"context_line":"    network \u003d orm.relationship(models_v2.Network)"},{"line_number":100,"context_line":""}],"source_content_type":"text/x-python","patch_set":70,"id":"1abeadc6_c2c7ae96","line":97,"updated":"2014-08-28 20:33:17.000000000","message":"nit: single quote","commit_id":"1fef6ff9362574429f15ab7da35a43c0aaa22721"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"224e675d43500778c521a401c53e4f286b4af2bf","unresolved":false,"context_lines":[{"line_number":107,"context_line":"            {\u0027name\u0027: \u0027ha\u0027, \u0027default\u0027: cfg.CONF.l3_ha},"},{"line_number":108,"context_line":"            {\u0027name\u0027: \u0027ha_vr_id\u0027, \u0027default\u0027: 0}])"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"    def _verify_configuration(self):"},{"line_number":111,"context_line":"        self.ha_cidr \u003d cfg.CONF.l3_ha_net_cidr"},{"line_number":112,"context_line":"        try:"},{"line_number":113,"context_line":"            net \u003d netaddr.IPNetwork(self.ha_cidr)"}],"source_content_type":"text/x-python","patch_set":70,"id":"1abeadc6_83f6af8d","line":110,"updated":"2014-08-29 20:42:43.000000000","message":"Why no unit test for this method?","commit_id":"1fef6ff9362574429f15ab7da35a43c0aaa22721"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"8cec662ede168cd5991e174084a79d98b901b669","unresolved":false,"context_lines":[{"line_number":107,"context_line":"            {\u0027name\u0027: \u0027ha\u0027, \u0027default\u0027: cfg.CONF.l3_ha},"},{"line_number":108,"context_line":"            {\u0027name\u0027: \u0027ha_vr_id\u0027, \u0027default\u0027: 0}])"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"    def _verify_configuration(self):"},{"line_number":111,"context_line":"        self.ha_cidr \u003d cfg.CONF.l3_ha_net_cidr"},{"line_number":112,"context_line":"        try:"},{"line_number":113,"context_line":"            net \u003d netaddr.IPNetwork(self.ha_cidr)"}],"source_content_type":"text/x-python","patch_set":70,"id":"fa98f980_493b1338","line":110,"in_reply_to":"1abeadc6_83f6af8d","updated":"2014-09-02 19:48:18.000000000","message":"Done","commit_id":"1fef6ff9362574429f15ab7da35a43c0aaa22721"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"224e675d43500778c521a401c53e4f286b4af2bf","unresolved":false,"context_lines":[{"line_number":108,"context_line":"            {\u0027name\u0027: \u0027ha_vr_id\u0027, \u0027default\u0027: 0}])"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"    def _verify_configuration(self):"},{"line_number":111,"context_line":"        self.ha_cidr \u003d cfg.CONF.l3_ha_net_cidr"},{"line_number":112,"context_line":"        try:"},{"line_number":113,"context_line":"            net \u003d netaddr.IPNetwork(self.ha_cidr)"},{"line_number":114,"context_line":"        except netaddr.AddrFormatError:"}],"source_content_type":"text/x-python","patch_set":70,"id":"1abeadc6_b565611f","line":111,"updated":"2014-08-29 20:42:43.000000000","message":"(No action required) Yuck.  Is there any way to avoid using global conf references? They make testing unnecessarily complicated.  Another strike against mixins!\n\nIn all seriousness, I guess we\u0027re stuck with this for now, but let\u0027s think of ways to avoid this kind of abomination in the future.","commit_id":"1fef6ff9362574429f15ab7da35a43c0aaa22721"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"8cec662ede168cd5991e174084a79d98b901b669","unresolved":false,"context_lines":[{"line_number":108,"context_line":"            {\u0027name\u0027: \u0027ha_vr_id\u0027, \u0027default\u0027: 0}])"},{"line_number":109,"context_line":""},{"line_number":110,"context_line":"    def _verify_configuration(self):"},{"line_number":111,"context_line":"        self.ha_cidr \u003d cfg.CONF.l3_ha_net_cidr"},{"line_number":112,"context_line":"        try:"},{"line_number":113,"context_line":"            net \u003d netaddr.IPNetwork(self.ha_cidr)"},{"line_number":114,"context_line":"        except netaddr.AddrFormatError:"}],"source_content_type":"text/x-python","patch_set":70,"id":"fa98f980_a9c8ff22","line":111,"in_reply_to":"1abeadc6_b565611f","updated":"2014-09-02 19:48:18.000000000","message":"I don\u0027t know... I can set self.conf \u003d cfg.CONF in neutron/services/l3_router/l3_router_plugin.L3RouterPlugin.__init__, but that doesn\u0027t really help us does it.","commit_id":"1fef6ff9362574429f15ab7da35a43c0aaa22721"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"224e675d43500778c521a401c53e4f286b4af2bf","unresolved":false,"context_lines":[{"line_number":116,"context_line":"        if (\u0027/\u0027 not in self.ha_cidr or net.network !\u003d net.ip):"},{"line_number":117,"context_line":"            raise l3_ha.HANetworkCIDRNotValid(cidr\u003dself.ha_cidr)"},{"line_number":118,"context_line":""},{"line_number":119,"context_line":"        if cfg.CONF.min_l3_agents_per_router \u003c 2:"},{"line_number":120,"context_line":"            raise l3_ha.HAMinimumAgentsNumberNotValid()"},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"    def __init__(self):"}],"source_content_type":"text/x-python","patch_set":70,"id":"1abeadc6_230a3b79","line":119,"updated":"2014-08-29 20:42:43.000000000","message":"Please replace the use of a magic number with a self-documenting constant.  Ideally the same constant would be used in the message for the exception raised below.","commit_id":"1fef6ff9362574429f15ab7da35a43c0aaa22721"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"8cec662ede168cd5991e174084a79d98b901b669","unresolved":false,"context_lines":[{"line_number":116,"context_line":"        if (\u0027/\u0027 not in self.ha_cidr or net.network !\u003d net.ip):"},{"line_number":117,"context_line":"            raise l3_ha.HANetworkCIDRNotValid(cidr\u003dself.ha_cidr)"},{"line_number":118,"context_line":""},{"line_number":119,"context_line":"        if cfg.CONF.min_l3_agents_per_router \u003c 2:"},{"line_number":120,"context_line":"            raise l3_ha.HAMinimumAgentsNumberNotValid()"},{"line_number":121,"context_line":""},{"line_number":122,"context_line":"    def __init__(self):"}],"source_content_type":"text/x-python","patch_set":70,"id":"fa98f980_a919df89","line":119,"in_reply_to":"1abeadc6_230a3b79","updated":"2014-09-02 19:48:18.000000000","message":"Done","commit_id":"1fef6ff9362574429f15ab7da35a43c0aaa22721"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"224e675d43500778c521a401c53e4f286b4af2bf","unresolved":false,"context_lines":[{"line_number":131,"context_line":"    def _set_vr_id(self, context, router):"},{"line_number":132,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":133,"context_line":"            query \u003d (context.session.query("},{"line_number":134,"context_line":"                l3_attrs_db.RouterExtraAttributes).with_lockmode(\u0027update\u0027)."},{"line_number":135,"context_line":"                join(l3_db.Router)."},{"line_number":136,"context_line":"                filter(l3_attrs_db.RouterExtraAttributes.ha_vr_id !\u003d"},{"line_number":137,"context_line":"                       sql.null(),"}],"source_content_type":"text/x-python","patch_set":70,"id":"1abeadc6_23587b89","line":134,"updated":"2014-08-29 20:42:43.000000000","message":"(No action required) I keep hearing that we shouldn\u0027t be using with_lockmode (i.e. problems with galera), but I guess we\u0027re still stuck with it for these types of problems for now.","commit_id":"1fef6ff9362574429f15ab7da35a43c0aaa22721"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"8cec662ede168cd5991e174084a79d98b901b669","unresolved":false,"context_lines":[{"line_number":131,"context_line":"    def _set_vr_id(self, context, router):"},{"line_number":132,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":133,"context_line":"            query \u003d (context.session.query("},{"line_number":134,"context_line":"                l3_attrs_db.RouterExtraAttributes).with_lockmode(\u0027update\u0027)."},{"line_number":135,"context_line":"                join(l3_db.Router)."},{"line_number":136,"context_line":"                filter(l3_attrs_db.RouterExtraAttributes.ha_vr_id !\u003d"},{"line_number":137,"context_line":"                       sql.null(),"}],"source_content_type":"text/x-python","patch_set":70,"id":"fa98f980_9b4e226e","line":134,"in_reply_to":"1abeadc6_23587b89","updated":"2014-09-02 19:48:18.000000000","message":"I\u0027m not proficient with optimistic locking or whatnot, so here we are.","commit_id":"1fef6ff9362574429f15ab7da35a43c0aaa22721"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"224e675d43500778c521a401c53e4f286b4af2bf","unresolved":false,"context_lines":[{"line_number":168,"context_line":""},{"line_number":169,"context_line":"        session \u003d context.session"},{"line_number":170,"context_line":"        with session.begin(subtransactions\u003dTrue):"},{"line_number":171,"context_line":"            ha_network \u003d L3HARouterNetwork(tenant_id\u003dtenant_id,"},{"line_number":172,"context_line":"                                           network_id\u003dnetwork[\u0027id\u0027])"},{"line_number":173,"context_line":"            session.add(ha_network)"},{"line_number":174,"context_line":""}],"source_content_type":"text/x-python","patch_set":70,"id":"1abeadc6_ba1aae7a","line":171,"updated":"2014-08-29 20:42:43.000000000","message":"Is there a reason to use an implicit tenant for core_plugin.create_network (via _get_tenant_id_for_create) but an explicit tenant is used here?","commit_id":"1fef6ff9362574429f15ab7da35a43c0aaa22721"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"8cec662ede168cd5991e174084a79d98b901b669","unresolved":false,"context_lines":[{"line_number":168,"context_line":""},{"line_number":169,"context_line":"        session \u003d context.session"},{"line_number":170,"context_line":"        with session.begin(subtransactions\u003dTrue):"},{"line_number":171,"context_line":"            ha_network \u003d L3HARouterNetwork(tenant_id\u003dtenant_id,"},{"line_number":172,"context_line":"                                           network_id\u003dnetwork[\u0027id\u0027])"},{"line_number":173,"context_line":"            session.add(ha_network)"},{"line_number":174,"context_line":""}],"source_content_type":"text/x-python","patch_set":70,"id":"fa98f980_fbf72ef3","line":171,"in_reply_to":"1abeadc6_ba1aae7a","updated":"2014-09-02 19:48:18.000000000","message":"The network creates via the core_plugin is actually created with a blank tenant_id so that it may only be viewed by admins. This means that tenants won\u0027t see these HA networks in the CLI or GUI. Because of that we must have the L3HARouterNetwork additional table, so we can actually query a tenant for its HA network.","commit_id":"1fef6ff9362574429f15ab7da35a43c0aaa22721"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"224e675d43500778c521a401c53e4f286b4af2bf","unresolved":false,"context_lines":[{"line_number":174,"context_line":""},{"line_number":175,"context_line":"            return ha_network"},{"line_number":176,"context_line":""},{"line_number":177,"context_line":"    def _get_number_of_agents(self, context):"},{"line_number":178,"context_line":"        \"\"\"Return the number of agents on which the router will be scheduled."},{"line_number":179,"context_line":""},{"line_number":180,"context_line":"        Raises an exception if there are not enough agents available to honor"}],"source_content_type":"text/x-python","patch_set":70,"id":"1abeadc6_7549095f","line":177,"updated":"2014-08-29 20:42:43.000000000","message":"Consider renaming to \u0027get_schedulable_agent_count\u0027 or something that better indicates what the method is for.  get_number_of_agents is pretty ambiguous.","commit_id":"1fef6ff9362574429f15ab7da35a43c0aaa22721"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"8cec662ede168cd5991e174084a79d98b901b669","unresolved":false,"context_lines":[{"line_number":174,"context_line":""},{"line_number":175,"context_line":"            return ha_network"},{"line_number":176,"context_line":""},{"line_number":177,"context_line":"    def _get_number_of_agents(self, context):"},{"line_number":178,"context_line":"        \"\"\"Return the number of agents on which the router will be scheduled."},{"line_number":179,"context_line":""},{"line_number":180,"context_line":"        Raises an exception if there are not enough agents available to honor"}],"source_content_type":"text/x-python","patch_set":70,"id":"fa98f980_7ba97e7a","line":177,"in_reply_to":"1abeadc6_7549095f","updated":"2014-09-02 19:48:18.000000000","message":"Done","commit_id":"1fef6ff9362574429f15ab7da35a43c0aaa22721"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"224e675d43500778c521a401c53e4f286b4af2bf","unresolved":false,"context_lines":[{"line_number":179,"context_line":""},{"line_number":180,"context_line":"        Raises an exception if there are not enough agents available to honor"},{"line_number":181,"context_line":"        the min_agents config parameter. If the max_agents parameter is set to"},{"line_number":182,"context_line":"        0 all the agents will be used."},{"line_number":183,"context_line":"        \"\"\""},{"line_number":184,"context_line":""},{"line_number":185,"context_line":"        min_agents \u003d cfg.CONF.min_l3_agents_per_router"}],"source_content_type":"text/x-python","patch_set":70,"id":"1abeadc6_152295a2","line":182,"updated":"2014-08-29 20:42:43.000000000","message":"Given line 189 maybe this should be \u0027if bool(max_agents) evaluates to False\u0027?","commit_id":"1fef6ff9362574429f15ab7da35a43c0aaa22721"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"8cec662ede168cd5991e174084a79d98b901b669","unresolved":false,"context_lines":[{"line_number":179,"context_line":""},{"line_number":180,"context_line":"        Raises an exception if there are not enough agents available to honor"},{"line_number":181,"context_line":"        the min_agents config parameter. If the max_agents parameter is set to"},{"line_number":182,"context_line":"        0 all the agents will be used."},{"line_number":183,"context_line":"        \"\"\""},{"line_number":184,"context_line":""},{"line_number":185,"context_line":"        min_agents \u003d cfg.CONF.min_l3_agents_per_router"}],"source_content_type":"text/x-python","patch_set":70,"id":"fa98f980_dbb50aef","line":182,"in_reply_to":"1abeadc6_152295a2","updated":"2014-09-02 19:48:18.000000000","message":"I think from a documentation point of view we should stick to:\n\nmax_l3_agents_per_router \u003d\u003d 0 \u003d\u003d Schedule HA router on all agents.","commit_id":"1fef6ff9362574429f15ab7da35a43c0aaa22721"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"224e675d43500778c521a401c53e4f286b4af2bf","unresolved":false,"context_lines":[{"line_number":183,"context_line":"        \"\"\""},{"line_number":184,"context_line":""},{"line_number":185,"context_line":"        min_agents \u003d cfg.CONF.min_l3_agents_per_router"},{"line_number":186,"context_line":"        num_agents \u003d len(self.get_l3_agents(context))"},{"line_number":187,"context_line":"        max_agents \u003d cfg.CONF.max_l3_agents_per_router"},{"line_number":188,"context_line":"        if max_agents:"},{"line_number":189,"context_line":"            if max_agents \u003e num_agents:"}],"source_content_type":"text/x-python","patch_set":70,"id":"1abeadc6_f5f19901","line":186,"updated":"2014-08-29 20:42:43.000000000","message":"(No action required) Mixins make life difficult for the reviewer.  At least with composition I could figure out where get_l3_agents() is defined without grepping.\n\nAlso, it seems lame to have to count orm objects rather than just getting a count directly, but I guess that\u0027s out of scope here.","commit_id":"1fef6ff9362574429f15ab7da35a43c0aaa22721"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"8cec662ede168cd5991e174084a79d98b901b669","unresolved":false,"context_lines":[{"line_number":183,"context_line":"        \"\"\""},{"line_number":184,"context_line":""},{"line_number":185,"context_line":"        min_agents \u003d cfg.CONF.min_l3_agents_per_router"},{"line_number":186,"context_line":"        num_agents \u003d len(self.get_l3_agents(context))"},{"line_number":187,"context_line":"        max_agents \u003d cfg.CONF.max_l3_agents_per_router"},{"line_number":188,"context_line":"        if max_agents:"},{"line_number":189,"context_line":"            if max_agents \u003e num_agents:"}],"source_content_type":"text/x-python","patch_set":70,"id":"fa98f980_3bd7f6c0","line":186,"in_reply_to":"1abeadc6_f5f19901","updated":"2014-09-02 19:48:18.000000000","message":"I could introduce a new function that just counts the L3 agents, but, meh... No significant gain, I think? Unless I\u0027m missing something.","commit_id":"1fef6ff9362574429f15ab7da35a43c0aaa22721"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"224e675d43500778c521a401c53e4f286b4af2bf","unresolved":false,"context_lines":[{"line_number":213,"context_line":"             \u0027device_owner\u0027: constants.DEVICE_OWNER_ROUTER_HA_INTF,"},{"line_number":214,"context_line":"             \u0027name\u0027: constants.HA_PORT_NAME % tenant_id}})"},{"line_number":215,"context_line":""},{"line_number":216,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":217,"context_line":"            portbinding \u003d L3HARouterAgentPortBinding(port_id\u003dport[\u0027id\u0027],"},{"line_number":218,"context_line":"                                                     router_id\u003drouter_id)"},{"line_number":219,"context_line":"            context.session.add(portbinding)"}],"source_content_type":"text/x-python","patch_set":70,"id":"1abeadc6_10e9c3b6","line":216,"updated":"2014-08-29 20:42:43.000000000","message":"What is the outcome if the port creation on line 204 succeeds (and presumably commits) and this transaction fails?  I\u0027ve looked at the ml2 plugin\u0027s create_port method and it appears to handle port binding creation in the same transaction (and in a really hairy way) to avoid this problem.  Is this a potential bug that we\u0027re just going to ignore for now in the hopes of getting things merged?  Depending on your answer, I might like to see a bug filed pre-emptively to ensure that this issue doesn\u0027t get lost.","commit_id":"1fef6ff9362574429f15ab7da35a43c0aaa22721"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"8cec662ede168cd5991e174084a79d98b901b669","unresolved":false,"context_lines":[{"line_number":213,"context_line":"             \u0027device_owner\u0027: constants.DEVICE_OWNER_ROUTER_HA_INTF,"},{"line_number":214,"context_line":"             \u0027name\u0027: constants.HA_PORT_NAME % tenant_id}})"},{"line_number":215,"context_line":""},{"line_number":216,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":217,"context_line":"            portbinding \u003d L3HARouterAgentPortBinding(port_id\u003dport[\u0027id\u0027],"},{"line_number":218,"context_line":"                                                     router_id\u003drouter_id)"},{"line_number":219,"context_line":"            context.session.add(portbinding)"}],"source_content_type":"text/x-python","patch_set":70,"id":"fa98f980_5bfd9a39","line":216,"in_reply_to":"1abeadc6_10e9c3b6","updated":"2014-09-02 19:48:18.000000000","message":"Fixed here and in all places we risk orphaned resources.","commit_id":"1fef6ff9362574429f15ab7da35a43c0aaa22721"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"224e675d43500778c521a401c53e4f286b4af2bf","unresolved":false,"context_lines":[{"line_number":220,"context_line":""},{"line_number":221,"context_line":"        return portbinding"},{"line_number":222,"context_line":""},{"line_number":223,"context_line":"    def _create_ha_interfaces(self, context, router, tenant_id):"},{"line_number":224,"context_line":"        admin_ctx \u003d context.elevated()"},{"line_number":225,"context_line":"        ha_network \u003d self.get_ha_network(admin_ctx, router.tenant_id)"},{"line_number":226,"context_line":"        if not ha_network:"}],"source_content_type":"text/x-python","patch_set":70,"id":"1abeadc6_5884385d","line":223,"updated":"2014-08-29 20:42:43.000000000","message":"I think there are similar potential issues in this method regarding creation of related resources in separate transactions.  I get why the transactions are separate - goodness knows untangling ml2\u0027s event would be a challenge - but if something goes wrong in this method such that ports or their bindings are not created successfully, the db state could be effectively corrupted.  At the least, I would like to see better error handling.","commit_id":"1fef6ff9362574429f15ab7da35a43c0aaa22721"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"8cec662ede168cd5991e174084a79d98b901b669","unresolved":false,"context_lines":[{"line_number":220,"context_line":""},{"line_number":221,"context_line":"        return portbinding"},{"line_number":222,"context_line":""},{"line_number":223,"context_line":"    def _create_ha_interfaces(self, context, router, tenant_id):"},{"line_number":224,"context_line":"        admin_ctx \u003d context.elevated()"},{"line_number":225,"context_line":"        ha_network \u003d self.get_ha_network(admin_ctx, router.tenant_id)"},{"line_number":226,"context_line":"        if not ha_network:"}],"source_content_type":"text/x-python","patch_set":70,"id":"fa98f980_bb992621","line":223,"in_reply_to":"1abeadc6_5884385d","updated":"2014-09-02 19:48:18.000000000","message":"Done","commit_id":"1fef6ff9362574429f15ab7da35a43c0aaa22721"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"224e675d43500778c521a401c53e4f286b4af2bf","unresolved":false,"context_lines":[{"line_number":262,"context_line":"        device_filter \u003d {\u0027device_id\u0027: [router.id],"},{"line_number":263,"context_line":"                         \u0027device_owner\u0027:"},{"line_number":264,"context_line":"                         [constants.DEVICE_OWNER_ROUTER_HA_INTF]}"},{"line_number":265,"context_line":"        ports \u003d self._core_plugin.get_ports(admin_ctx, filters\u003ddevice_filter)"},{"line_number":266,"context_line":""},{"line_number":267,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":268,"context_line":"            for port in ports:"}],"source_content_type":"text/x-python","patch_set":70,"id":"1abeadc6_f8f504cb","line":265,"updated":"2014-08-29 20:42:43.000000000","message":"(No action required) The fact that it\u0027s not possible to directly delete ports identified by a filter seems pretty brain-dead.","commit_id":"1fef6ff9362574429f15ab7da35a43c0aaa22721"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"8cec662ede168cd5991e174084a79d98b901b669","unresolved":false,"context_lines":[{"line_number":262,"context_line":"        device_filter \u003d {\u0027device_id\u0027: [router.id],"},{"line_number":263,"context_line":"                         \u0027device_owner\u0027:"},{"line_number":264,"context_line":"                         [constants.DEVICE_OWNER_ROUTER_HA_INTF]}"},{"line_number":265,"context_line":"        ports \u003d self._core_plugin.get_ports(admin_ctx, filters\u003ddevice_filter)"},{"line_number":266,"context_line":""},{"line_number":267,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":268,"context_line":"            for port in ports:"}],"source_content_type":"text/x-python","patch_set":70,"id":"fa98f980_bb676624","line":265,"in_reply_to":"1abeadc6_f8f504cb","updated":"2014-09-02 19:48:18.000000000","message":"The core plugins would have to implement it... Ml2 doesn\u0027t, for example, and I can\u0027t access the DB base plugin delete port directly, because we wouldn\u0027t call mechanism drivers and the like. Note that this is exactly the case in line 269, which is actually a bug I fixed in the next patchsets.","commit_id":"1fef6ff9362574429f15ab7da35a43c0aaa22721"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"224e675d43500778c521a401c53e4f286b4af2bf","unresolved":false,"context_lines":[{"line_number":284,"context_line":"                                               \u0027add_ha_interfaces\u0027)"},{"line_number":285,"context_line":"        return router_db"},{"line_number":286,"context_line":""},{"line_number":287,"context_line":"    def _update_router_db(self, context, router_id, data, gw_info):"},{"line_number":288,"context_line":"        ha \u003d data.pop(\u0027ha\u0027, None)"},{"line_number":289,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":290,"context_line":"            router_db \u003d super(L3_HA_NAT_db_mixin, self)._update_router_db("}],"source_content_type":"text/x-python","patch_set":70,"id":"1abeadc6_58919845","line":287,"updated":"2014-08-29 20:42:43.000000000","message":"(No action required) The pervasive use of the _db suffix is giving me indigestion.","commit_id":"1fef6ff9362574429f15ab7da35a43c0aaa22721"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"8cec662ede168cd5991e174084a79d98b901b669","unresolved":false,"context_lines":[{"line_number":284,"context_line":"                                               \u0027add_ha_interfaces\u0027)"},{"line_number":285,"context_line":"        return router_db"},{"line_number":286,"context_line":""},{"line_number":287,"context_line":"    def _update_router_db(self, context, router_id, data, gw_info):"},{"line_number":288,"context_line":"        ha \u003d data.pop(\u0027ha\u0027, None)"},{"line_number":289,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":290,"context_line":"            router_db \u003d super(L3_HA_NAT_db_mixin, self)._update_router_db("}],"source_content_type":"text/x-python","patch_set":70,"id":"fa98f980_fb3f2ed4","line":287,"in_reply_to":"1abeadc6_58919845","updated":"2014-09-02 19:48:18.000000000","message":"This is overriding a method in l3_db.","commit_id":"1fef6ff9362574429f15ab7da35a43c0aaa22721"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"224e675d43500778c521a401c53e4f286b4af2bf","unresolved":false,"context_lines":[{"line_number":290,"context_line":"            router_db \u003d super(L3_HA_NAT_db_mixin, self)._update_router_db("},{"line_number":291,"context_line":"                context, router_id, data, gw_info)"},{"line_number":292,"context_line":""},{"line_number":293,"context_line":"            if ha is None or ha \u003d\u003d router_db.extra_attributes.ha:"},{"line_number":294,"context_line":"                return router_db"},{"line_number":295,"context_line":""},{"line_number":296,"context_line":"            router_db.extra_attributes.ha \u003d ha"}],"source_content_type":"text/x-python","patch_set":70,"id":"1abeadc6_587b58f4","line":293,"updated":"2014-08-29 20:42:43.000000000","message":"Consider using a self-documenting conditional here, e.g.\n\nrouter_ha_unchanged \u003d (ha is None...)\nif router_ha_unchanged:\n return","commit_id":"1fef6ff9362574429f15ab7da35a43c0aaa22721"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"9f8252a449537a697084850a356622d727fae24a","unresolved":false,"context_lines":[{"line_number":290,"context_line":"            router_db \u003d super(L3_HA_NAT_db_mixin, self)._update_router_db("},{"line_number":291,"context_line":"                context, router_id, data, gw_info)"},{"line_number":292,"context_line":""},{"line_number":293,"context_line":"            if ha is None or ha \u003d\u003d router_db.extra_attributes.ha:"},{"line_number":294,"context_line":"                return router_db"},{"line_number":295,"context_line":""},{"line_number":296,"context_line":"            router_db.extra_attributes.ha \u003d ha"}],"source_content_type":"text/x-python","patch_set":70,"id":"1abeadc6_5380dbbe","line":293,"updated":"2014-08-28 15:55:31.000000000","message":"I am slightly confused by lines 293-297, why are they needed?","commit_id":"1fef6ff9362574429f15ab7da35a43c0aaa22721"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"8cec662ede168cd5991e174084a79d98b901b669","unresolved":false,"context_lines":[{"line_number":290,"context_line":"            router_db \u003d super(L3_HA_NAT_db_mixin, self)._update_router_db("},{"line_number":291,"context_line":"                context, router_id, data, gw_info)"},{"line_number":292,"context_line":""},{"line_number":293,"context_line":"            if ha is None or ha \u003d\u003d router_db.extra_attributes.ha:"},{"line_number":294,"context_line":"                return router_db"},{"line_number":295,"context_line":""},{"line_number":296,"context_line":"            router_db.extra_attributes.ha \u003d ha"}],"source_content_type":"text/x-python","patch_set":70,"id":"fa98f980_7b2b3e94","line":293,"in_reply_to":"1abeadc6_587b58f4","updated":"2014-09-02 19:48:18.000000000","message":"Good idea.","commit_id":"1fef6ff9362574429f15ab7da35a43c0aaa22721"},{"author":{"_account_id":7987,"name":"Ivar Lazzaro","email":"ivarlazzaro@gmail.com","username":"Ivar"},"change_message_id":"29ae22df88662dc01aaba3f40170fbd6776121cf","unresolved":false,"context_lines":[{"line_number":294,"context_line":"                return router_db"},{"line_number":295,"context_line":""},{"line_number":296,"context_line":"            router_db.extra_attributes.ha \u003d ha"},{"line_number":297,"context_line":"            if not ha:"},{"line_number":298,"context_line":"                router_db.extra_attributes.ha_vr_id \u003d None"},{"line_number":299,"context_line":""},{"line_number":300,"context_line":"        if ha:"}],"source_content_type":"text/x-python","patch_set":70,"id":"1abeadc6_820696cc","line":297,"updated":"2014-08-28 20:33:17.000000000","message":"if \"ha\" is none, the method returns in the above statement, isn\u0027t this dead code?","commit_id":"1fef6ff9362574429f15ab7da35a43c0aaa22721"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"224e675d43500778c521a401c53e4f286b4af2bf","unresolved":false,"context_lines":[{"line_number":294,"context_line":"                return router_db"},{"line_number":295,"context_line":""},{"line_number":296,"context_line":"            router_db.extra_attributes.ha \u003d ha"},{"line_number":297,"context_line":"            if not ha:"},{"line_number":298,"context_line":"                router_db.extra_attributes.ha_vr_id \u003d None"},{"line_number":299,"context_line":""},{"line_number":300,"context_line":"        if ha:"}],"source_content_type":"text/x-python","patch_set":70,"id":"1abeadc6_b8e8ecb3","line":297,"in_reply_to":"1abeadc6_820696cc","updated":"2014-08-29 20:42:43.000000000","message":"\u0027ha\u0027 cannot be None by this line, but since it\u0027s a boolean it certainly can be False.","commit_id":"1fef6ff9362574429f15ab7da35a43c0aaa22721"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"9f8252a449537a697084850a356622d727fae24a","unresolved":false,"context_lines":[{"line_number":295,"context_line":""},{"line_number":296,"context_line":"            router_db.extra_attributes.ha \u003d ha"},{"line_number":297,"context_line":"            if not ha:"},{"line_number":298,"context_line":"                router_db.extra_attributes.ha_vr_id \u003d None"},{"line_number":299,"context_line":""},{"line_number":300,"context_line":"        if ha:"},{"line_number":301,"context_line":"            self._set_vr_id(context, router_db)"}],"source_content_type":"text/x-python","patch_set":70,"id":"1abeadc6_3366ff51","line":298,"updated":"2014-08-28 15:55:31.000000000","message":"this is not going to be saved, is it?","commit_id":"1fef6ff9362574429f15ab7da35a43c0aaa22721"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"8cec662ede168cd5991e174084a79d98b901b669","unresolved":false,"context_lines":[{"line_number":295,"context_line":""},{"line_number":296,"context_line":"            router_db.extra_attributes.ha \u003d ha"},{"line_number":297,"context_line":"            if not ha:"},{"line_number":298,"context_line":"                router_db.extra_attributes.ha_vr_id \u003d None"},{"line_number":299,"context_line":""},{"line_number":300,"context_line":"        if ha:"},{"line_number":301,"context_line":"            self._set_vr_id(context, router_db)"}],"source_content_type":"text/x-python","patch_set":70,"id":"fa98f980_9e75309a","line":298,"in_reply_to":"1abeadc6_3366ff51","updated":"2014-09-02 19:48:18.000000000","message":"Sure it is - This is tested in test_migration_from_ha.","commit_id":"1fef6ff9362574429f15ab7da35a43c0aaa22721"},{"author":{"_account_id":7987,"name":"Ivar Lazzaro","email":"ivarlazzaro@gmail.com","username":"Ivar"},"change_message_id":"29ae22df88662dc01aaba3f40170fbd6776121cf","unresolved":false,"context_lines":[{"line_number":302,"context_line":"            self._create_ha_interfaces(context, router_db, router_db.tenant_id)"},{"line_number":303,"context_line":"            self._notify_ha_interfaces_updated(context, router_db.id,"},{"line_number":304,"context_line":"                                               \u0027add_ha_interfaces\u0027)"},{"line_number":305,"context_line":"        else:"},{"line_number":306,"context_line":"            self._delete_ha_interfaces(context, router_db)"},{"line_number":307,"context_line":"            self._notify_ha_interfaces_updated(context, router_db.id,"},{"line_number":308,"context_line":"                                               \u0027del_ha_interfaces\u0027)"}],"source_content_type":"text/x-python","patch_set":70,"id":"1abeadc6_e2282a35","line":305,"updated":"2014-08-28 20:33:17.000000000","message":"see comment above","commit_id":"1fef6ff9362574429f15ab7da35a43c0aaa22721"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"224e675d43500778c521a401c53e4f286b4af2bf","unresolved":false,"context_lines":[{"line_number":323,"context_line":""},{"line_number":324,"context_line":"        return super(L3_HA_NAT_db_mixin, self).delete_router(context, id)"},{"line_number":325,"context_line":""},{"line_number":326,"context_line":"    def get_ha_router_port_binding(self, context, router_ids, host\u003dNone):"},{"line_number":327,"context_line":"        query \u003d context.session.query("},{"line_number":328,"context_line":"            L3HARouterAgentPortBinding).filter("},{"line_number":329,"context_line":"                L3HARouterAgentPortBinding.router_id.in_(router_ids))"}],"source_content_type":"text/x-python","patch_set":70,"id":"1abeadc6_2ee01625","line":326,"updated":"2014-08-29 20:42:43.000000000","message":"Consider changing this method to indicate that it returns a query result (also, binding vs bindings?).","commit_id":"1fef6ff9362574429f15ab7da35a43c0aaa22721"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"8cec662ede168cd5991e174084a79d98b901b669","unresolved":false,"context_lines":[{"line_number":323,"context_line":""},{"line_number":324,"context_line":"        return super(L3_HA_NAT_db_mixin, self).delete_router(context, id)"},{"line_number":325,"context_line":""},{"line_number":326,"context_line":"    def get_ha_router_port_binding(self, context, router_ids, host\u003dNone):"},{"line_number":327,"context_line":"        query \u003d context.session.query("},{"line_number":328,"context_line":"            L3HARouterAgentPortBinding).filter("},{"line_number":329,"context_line":"                L3HARouterAgentPortBinding.router_id.in_(router_ids))"}],"source_content_type":"text/x-python","patch_set":70,"id":"fa98f980_5e5668d3","line":326,"in_reply_to":"1abeadc6_2ee01625","updated":"2014-09-02 19:48:18.000000000","message":"There\u0027s no reason for this method to return a query and not a result set.","commit_id":"1fef6ff9362574429f15ab7da35a43c0aaa22721"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"224e675d43500778c521a401c53e4f286b4af2bf","unresolved":false,"context_lines":[{"line_number":329,"context_line":"                L3HARouterAgentPortBinding.router_id.in_(router_ids))"},{"line_number":330,"context_line":""},{"line_number":331,"context_line":"        if host:"},{"line_number":332,"context_line":"            query \u003d query.join(agents_db.Agent).filter("},{"line_number":333,"context_line":"                agents_db.Agent.host \u003d\u003d host)"},{"line_number":334,"context_line":""},{"line_number":335,"context_line":"        return query"}],"source_content_type":"text/x-python","patch_set":70,"id":"1abeadc6_0eefdae9","line":332,"updated":"2014-08-29 20:42:43.000000000","message":"Is sqlalchemy/mysql smart enough to apply easy filters first?  If not, consider applying this filter before the one for router ids.","commit_id":"1fef6ff9362574429f15ab7da35a43c0aaa22721"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"8cec662ede168cd5991e174084a79d98b901b669","unresolved":false,"context_lines":[{"line_number":329,"context_line":"                L3HARouterAgentPortBinding.router_id.in_(router_ids))"},{"line_number":330,"context_line":""},{"line_number":331,"context_line":"        if host:"},{"line_number":332,"context_line":"            query \u003d query.join(agents_db.Agent).filter("},{"line_number":333,"context_line":"                agents_db.Agent.host \u003d\u003d host)"},{"line_number":334,"context_line":""},{"line_number":335,"context_line":"        return query"}],"source_content_type":"text/x-python","patch_set":70,"id":"fa98f980_fe2abc2a","line":332,"in_reply_to":"1abeadc6_0eefdae9","updated":"2014-09-02 19:48:18.000000000","message":"It isn\u0027t - Done. Although with the new way, the join is on more records. I\u0027m not nearly knowledgeable enough about DBs to know which way is more efficient so I\u0027m trusting you.","commit_id":"1fef6ff9362574429f15ab7da35a43c0aaa22721"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"224e675d43500778c521a401c53e4f286b4af2bf","unresolved":false,"context_lines":[{"line_number":348,"context_line":"            router[constants.HA_ROUTER_STATE_KEY] \u003d binding.state"},{"line_number":349,"context_line":""},{"line_number":350,"context_line":"        for router in routers_dict.values():"},{"line_number":351,"context_line":"            interface \u003d router.get(constants.HA_INTERFACE_KEY)"},{"line_number":352,"context_line":"            if interface:"},{"line_number":353,"context_line":"                self._populate_subnet_for_ports(context, [interface])"},{"line_number":354,"context_line":""}],"source_content_type":"text/x-python","patch_set":70,"id":"1abeadc6_ae42660c","line":351,"updated":"2014-08-29 20:42:43.000000000","message":"(No action required) Sometimes a part of me cries when dictionaries are used instead of objects.  This is one of those times.","commit_id":"1fef6ff9362574429f15ab7da35a43c0aaa22721"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"224e675d43500778c521a401c53e4f286b4af2bf","unresolved":false,"context_lines":[{"line_number":352,"context_line":"            if interface:"},{"line_number":353,"context_line":"                self._populate_subnet_for_ports(context, [interface])"},{"line_number":354,"context_line":""},{"line_number":355,"context_line":"        return routers_dict.values()"},{"line_number":356,"context_line":""},{"line_number":357,"context_line":"    def get_ha_sync_data_for_host(self, context, host, router_ids\u003dNone,"},{"line_number":358,"context_line":"                                  active\u003dNone):"}],"source_content_type":"text/x-python","patch_set":70,"id":"1abeadc6_ae10a600","line":355,"updated":"2014-08-29 20:42:43.000000000","message":"Consider returning \u0027routers\u0027 directly.","commit_id":"1fef6ff9362574429f15ab7da35a43c0aaa22721"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"8cec662ede168cd5991e174084a79d98b901b669","unresolved":false,"context_lines":[{"line_number":352,"context_line":"            if interface:"},{"line_number":353,"context_line":"                self._populate_subnet_for_ports(context, [interface])"},{"line_number":354,"context_line":""},{"line_number":355,"context_line":"        return routers_dict.values()"},{"line_number":356,"context_line":""},{"line_number":357,"context_line":"    def get_ha_sync_data_for_host(self, context, host, router_ids\u003dNone,"},{"line_number":358,"context_line":"                                  active\u003dNone):"}],"source_content_type":"text/x-python","patch_set":70,"id":"fa98f980_5e4f48bd","line":355,"in_reply_to":"1abeadc6_ae10a600","updated":"2014-09-02 19:48:18.000000000","message":"I think it\u0027s important to be consistent with get_sync_data, which returns a list of dicts as well.","commit_id":"1fef6ff9362574429f15ab7da35a43c0aaa22721"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"224e675d43500778c521a401c53e4f286b4af2bf","unresolved":false,"context_lines":[{"line_number":362,"context_line":"        return self._process_sync_ha_data(context, sync_data, host)"},{"line_number":363,"context_line":""},{"line_number":364,"context_line":""},{"line_number":365,"context_line":"def _is_ha(router):"},{"line_number":366,"context_line":"    ha \u003d router.get(\u0027ha\u0027)"},{"line_number":367,"context_line":"    if not attributes.is_attr_set(ha):"},{"line_number":368,"context_line":"        ha \u003d cfg.CONF.l3_ha"}],"source_content_type":"text/x-python","patch_set":70,"id":"1abeadc6_8ea92a92","line":365,"updated":"2014-08-29 20:42:43.000000000","message":"(No action required) Consider moving this helper method earlier in the module so it\u0027s more visible.","commit_id":"1fef6ff9362574429f15ab7da35a43c0aaa22721"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"8cec662ede168cd5991e174084a79d98b901b669","unresolved":false,"context_lines":[{"line_number":362,"context_line":"        return self._process_sync_ha_data(context, sync_data, host)"},{"line_number":363,"context_line":""},{"line_number":364,"context_line":""},{"line_number":365,"context_line":"def _is_ha(router):"},{"line_number":366,"context_line":"    ha \u003d router.get(\u0027ha\u0027)"},{"line_number":367,"context_line":"    if not attributes.is_attr_set(ha):"},{"line_number":368,"context_line":"        ha \u003d cfg.CONF.l3_ha"}],"source_content_type":"text/x-python","patch_set":70,"id":"fa98f980_5ec5883a","line":365,"in_reply_to":"1abeadc6_8ea92a92","updated":"2014-09-02 19:48:18.000000000","message":"Turns out this function is only used once (Including the next patch as well), so I\u0027m moving this into the mixin to where it\u0027s used.","commit_id":"1fef6ff9362574429f15ab7da35a43c0aaa22721"},{"author":{"_account_id":2733,"name":"Darragh O\u0027Reilly","email":"doreilly@suse.com","username":"darragh-oreilly"},"change_message_id":"e80dfc03232f04d922ef197ba9099ddb06d7764e","unresolved":false,"context_lines":[{"line_number":154,"context_line":"                 \u0027host_routes\u0027: attributes.ATTR_NOT_SPECIFIED,"},{"line_number":155,"context_line":"                 \u0027dns_nameservers\u0027: attributes.ATTR_NOT_SPECIFIED,"},{"line_number":156,"context_line":"                 \u0027allocation_pools\u0027: attributes.ATTR_NOT_SPECIFIED,"},{"line_number":157,"context_line":"                 \u0027gateway_ip\u0027: attributes.ATTR_NOT_SPECIFIED}}"},{"line_number":158,"context_line":"        return self._core_plugin.create_subnet(context, args)"},{"line_number":159,"context_line":""},{"line_number":160,"context_line":"    def _create_ha_network(self, context, tenant_id):"}],"source_content_type":"text/x-python","patch_set":71,"id":"fa98f980_631c8114","line":157,"updated":"2014-09-02 13:50:21.000000000","message":"the subnet still seems to get the first ip as the gateway_ip, but I guess it\u0027s no harm.","commit_id":"adb70e7f88ef94982652db1fb61c18b81757fa19"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"a6787b098561c50a5a370ca9e4e79a3f3d79099a","unresolved":false,"context_lines":[{"line_number":154,"context_line":"                 \u0027host_routes\u0027: attributes.ATTR_NOT_SPECIFIED,"},{"line_number":155,"context_line":"                 \u0027dns_nameservers\u0027: attributes.ATTR_NOT_SPECIFIED,"},{"line_number":156,"context_line":"                 \u0027allocation_pools\u0027: attributes.ATTR_NOT_SPECIFIED,"},{"line_number":157,"context_line":"                 \u0027gateway_ip\u0027: attributes.ATTR_NOT_SPECIFIED}}"},{"line_number":158,"context_line":"        return self._core_plugin.create_subnet(context, args)"},{"line_number":159,"context_line":""},{"line_number":160,"context_line":"    def _create_ha_network(self, context, tenant_id):"}],"source_content_type":"text/x-python","patch_set":71,"id":"fa98f980_7130bde8","line":157,"in_reply_to":"fa98f980_631c8114","updated":"2014-09-03 07:08:04.000000000","message":"No harm, but redundant - Thank you.","commit_id":"adb70e7f88ef94982652db1fb61c18b81757fa19"},{"author":{"_account_id":2592,"name":"Mark McClain","email":"mark@mcclain.xyz","username":"markmcclain"},"change_message_id":"d3a2fe5e77c941c7b3796653768f3caffe229d6d","unresolved":false,"context_lines":[{"line_number":239,"context_line":""},{"line_number":240,"context_line":"        port_ids \u003d []"},{"line_number":241,"context_line":"        for index in range(num_agents):"},{"line_number":242,"context_line":"            port \u003d self._core_plugin.create_port(admin_ctx, {"},{"line_number":243,"context_line":"                \u0027port\u0027:"},{"line_number":244,"context_line":"                {\u0027tenant_id\u0027: \u0027\u0027,"},{"line_number":245,"context_line":"                 \u0027network_id\u0027: subnet[\u0027network_id\u0027],"}],"source_content_type":"text/x-python","patch_set":71,"id":"fa98f980_b755f51e","line":242,"updated":"2014-09-01 19:41:48.000000000","message":"What if this fails halfway through?  Seems like we\u0027re potentially leaving lots of orphans around.","commit_id":"adb70e7f88ef94982652db1fb61c18b81757fa19"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"d5b5b9af5e253ddf18e7ba9573e16377296c1cd8","unresolved":false,"context_lines":[{"line_number":239,"context_line":""},{"line_number":240,"context_line":"        port_ids \u003d []"},{"line_number":241,"context_line":"        for index in range(num_agents):"},{"line_number":242,"context_line":"            port \u003d self._core_plugin.create_port(admin_ctx, {"},{"line_number":243,"context_line":"                \u0027port\u0027:"},{"line_number":244,"context_line":"                {\u0027tenant_id\u0027: \u0027\u0027,"},{"line_number":245,"context_line":"                 \u0027network_id\u0027: subnet[\u0027network_id\u0027],"}],"source_content_type":"text/x-python","patch_set":71,"id":"fa98f980_93ce25b3","line":242,"in_reply_to":"fa98f980_b755f51e","updated":"2014-09-02 07:56:54.000000000","message":"This issue manifests in this patch and in lots of other places in the current code base. (This was also mentioned by Maru in his review). I\u0027ll fix it for this patch but we clearly need TaskFlow sooner rather than later.","commit_id":"adb70e7f88ef94982652db1fb61c18b81757fa19"},{"author":{"_account_id":2733,"name":"Darragh O\u0027Reilly","email":"doreilly@suse.com","username":"darragh-oreilly"},"change_message_id":"e80dfc03232f04d922ef197ba9099ddb06d7764e","unresolved":false,"context_lines":[{"line_number":281,"context_line":"            self._set_vr_id(context, router_db)"},{"line_number":282,"context_line":"            self._create_ha_interfaces(context, router_db, tenant_id)"},{"line_number":283,"context_line":"            self._notify_ha_interfaces_updated(context, router_db.id,"},{"line_number":284,"context_line":"                                               \u0027add_ha_interfaces\u0027)"},{"line_number":285,"context_line":"        return router_db"},{"line_number":286,"context_line":""},{"line_number":287,"context_line":"    def _update_router_db(self, context, router_id, data, gw_info):"}],"source_content_type":"text/x-python","patch_set":71,"id":"fa98f980_6391e151","line":284,"updated":"2014-09-02 13:50:21.000000000","message":"what is \u0027add_ha_interfaces\u0027 ? - I can\u0027t find it","commit_id":"adb70e7f88ef94982652db1fb61c18b81757fa19"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"a6787b098561c50a5a370ca9e4e79a3f3d79099a","unresolved":false,"context_lines":[{"line_number":281,"context_line":"            self._set_vr_id(context, router_db)"},{"line_number":282,"context_line":"            self._create_ha_interfaces(context, router_db, tenant_id)"},{"line_number":283,"context_line":"            self._notify_ha_interfaces_updated(context, router_db.id,"},{"line_number":284,"context_line":"                                               \u0027add_ha_interfaces\u0027)"},{"line_number":285,"context_line":"        return router_db"},{"line_number":286,"context_line":""},{"line_number":287,"context_line":"    def _update_router_db(self, context, router_id, data, gw_info):"}],"source_content_type":"text/x-python","patch_set":71,"id":"fa98f980_9100c102","line":284,"in_reply_to":"fa98f980_6391e151","updated":"2014-09-03 07:08:04.000000000","message":"Wow... So if you follow the call chain you\u0027ll see that the third optional to this method is unused. Removing it.","commit_id":"adb70e7f88ef94982652db1fb61c18b81757fa19"},{"author":{"_account_id":2733,"name":"Darragh O\u0027Reilly","email":"doreilly@suse.com","username":"darragh-oreilly"},"change_message_id":"e80dfc03232f04d922ef197ba9099ddb06d7764e","unresolved":false,"context_lines":[{"line_number":301,"context_line":"            self._set_vr_id(context, router_db)"},{"line_number":302,"context_line":"            self._create_ha_interfaces(context, router_db, router_db.tenant_id)"},{"line_number":303,"context_line":"            self._notify_ha_interfaces_updated(context, router_db.id,"},{"line_number":304,"context_line":"                                               \u0027add_ha_interfaces\u0027)"},{"line_number":305,"context_line":"        else:"},{"line_number":306,"context_line":"            self._delete_ha_interfaces(context, router_db)"},{"line_number":307,"context_line":"            self._notify_ha_interfaces_updated(context, router_db.id,"}],"source_content_type":"text/x-python","patch_set":71,"id":"fa98f980_c389ad27","line":304,"updated":"2014-09-02 13:50:21.000000000","message":"ditto","commit_id":"adb70e7f88ef94982652db1fb61c18b81757fa19"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"a6787b098561c50a5a370ca9e4e79a3f3d79099a","unresolved":false,"context_lines":[{"line_number":301,"context_line":"            self._set_vr_id(context, router_db)"},{"line_number":302,"context_line":"            self._create_ha_interfaces(context, router_db, router_db.tenant_id)"},{"line_number":303,"context_line":"            self._notify_ha_interfaces_updated(context, router_db.id,"},{"line_number":304,"context_line":"                                               \u0027add_ha_interfaces\u0027)"},{"line_number":305,"context_line":"        else:"},{"line_number":306,"context_line":"            self._delete_ha_interfaces(context, router_db)"},{"line_number":307,"context_line":"            self._notify_ha_interfaces_updated(context, router_db.id,"}],"source_content_type":"text/x-python","patch_set":71,"id":"fa98f980_b103050c","line":304,"in_reply_to":"fa98f980_c389ad27","updated":"2014-09-03 07:08:04.000000000","message":"Done","commit_id":"adb70e7f88ef94982652db1fb61c18b81757fa19"},{"author":{"_account_id":2733,"name":"Darragh O\u0027Reilly","email":"doreilly@suse.com","username":"darragh-oreilly"},"change_message_id":"e80dfc03232f04d922ef197ba9099ddb06d7764e","unresolved":false,"context_lines":[{"line_number":305,"context_line":"        else:"},{"line_number":306,"context_line":"            self._delete_ha_interfaces(context, router_db)"},{"line_number":307,"context_line":"            self._notify_ha_interfaces_updated(context, router_db.id,"},{"line_number":308,"context_line":"                                               \u0027del_ha_interfaces\u0027)"},{"line_number":309,"context_line":""},{"line_number":310,"context_line":"        return router_db"},{"line_number":311,"context_line":""}],"source_content_type":"text/x-python","patch_set":71,"id":"fa98f980_6378012c","line":308,"updated":"2014-09-02 13:50:21.000000000","message":"ditto for del_ha_interfaces","commit_id":"adb70e7f88ef94982652db1fb61c18b81757fa19"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"a6787b098561c50a5a370ca9e4e79a3f3d79099a","unresolved":false,"context_lines":[{"line_number":305,"context_line":"        else:"},{"line_number":306,"context_line":"            self._delete_ha_interfaces(context, router_db)"},{"line_number":307,"context_line":"            self._notify_ha_interfaces_updated(context, router_db.id,"},{"line_number":308,"context_line":"                                               \u0027del_ha_interfaces\u0027)"},{"line_number":309,"context_line":""},{"line_number":310,"context_line":"        return router_db"},{"line_number":311,"context_line":""}],"source_content_type":"text/x-python","patch_set":71,"id":"fa98f980_f10d8d38","line":308,"in_reply_to":"fa98f980_6378012c","updated":"2014-09-03 07:08:04.000000000","message":"Done","commit_id":"adb70e7f88ef94982652db1fb61c18b81757fa19"},{"author":{"_account_id":2733,"name":"Darragh O\u0027Reilly","email":"doreilly@suse.com","username":"darragh-oreilly"},"change_message_id":"e80dfc03232f04d922ef197ba9099ddb06d7764e","unresolved":false,"context_lines":[{"line_number":306,"context_line":"            self._delete_ha_interfaces(context, router_db)"},{"line_number":307,"context_line":"            self._notify_ha_interfaces_updated(context, router_db.id,"},{"line_number":308,"context_line":"                                               \u0027del_ha_interfaces\u0027)"},{"line_number":309,"context_line":""},{"line_number":310,"context_line":"        return router_db"},{"line_number":311,"context_line":""},{"line_number":312,"context_line":"    def update_router_state(self, context, router_id, state, host):"}],"source_content_type":"text/x-python","patch_set":71,"id":"fa98f980_834a45c3","line":309,"updated":"2014-09-02 13:50:21.000000000","message":"when I update a ha router to a non-ha router, the neutron ha ports get deleted ok, but the ha interfaces remain in the qrouter namespace","commit_id":"adb70e7f88ef94982652db1fb61c18b81757fa19"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"a6787b098561c50a5a370ca9e4e79a3f3d79099a","unresolved":false,"context_lines":[{"line_number":306,"context_line":"            self._delete_ha_interfaces(context, router_db)"},{"line_number":307,"context_line":"            self._notify_ha_interfaces_updated(context, router_db.id,"},{"line_number":308,"context_line":"                                               \u0027del_ha_interfaces\u0027)"},{"line_number":309,"context_line":""},{"line_number":310,"context_line":"        return router_db"},{"line_number":311,"context_line":""},{"line_number":312,"context_line":"    def update_router_state(self, context, router_id, state, host):"}],"source_content_type":"text/x-python","patch_set":71,"id":"fa98f980_71199d78","line":309,"in_reply_to":"fa98f980_834a45c3","updated":"2014-09-03 07:08:04.000000000","message":"Right - You uncovered a bug which I discussed with Sylvain today and I will report tomorrow. We implemented migration from non HA to HA and reverse only in the server side, not in the agent side.","commit_id":"adb70e7f88ef94982652db1fb61c18b81757fa19"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"500747fda54cb137cf934521a578c2be966d0d82","unresolved":false,"context_lines":[{"line_number":267,"context_line":"        except Exception:"},{"line_number":268,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":269,"context_line":"                for port_id in port_ids:"},{"line_number":270,"context_line":"                    self._core_plugin.delete_port(admin_ctx, port_id,"},{"line_number":271,"context_line":"                                                  l3_port_check\u003dFalse)"},{"line_number":272,"context_line":""},{"line_number":273,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":72,"id":"fa98f980_87e5b8dd","line":270,"updated":"2014-09-03 17:41:17.000000000","message":"Can this throw an exception, and if so, do you want to catch and ignore?","commit_id":"32ad84aaa83cd3bd3497c46967f24b75043cd3dd"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"40817f3f838c5cde9eacae0918ad3deaefa120ad","unresolved":false,"context_lines":[{"line_number":267,"context_line":"        except Exception:"},{"line_number":268,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":269,"context_line":"                for port_id in port_ids:"},{"line_number":270,"context_line":"                    self._core_plugin.delete_port(admin_ctx, port_id,"},{"line_number":271,"context_line":"                                                  l3_port_check\u003dFalse)"},{"line_number":272,"context_line":""},{"line_number":273,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":72,"id":"fa98f980_cdd281ff","line":270,"in_reply_to":"fa98f980_87e5b8dd","updated":"2014-09-03 20:05:48.000000000","message":"I looked in to it, and if delete_port throws an exception, then you see both the exception thrown during create_port, and the exception thrown during delete_port. From a debugging point of view we\u0027re good. As for catching the exception so that we attempt to delete the rest of the ports - They\u0027re all the same, I don\u0027t know how we could fail to delete the first port but succeed on the next.","commit_id":"32ad84aaa83cd3bd3497c46967f24b75043cd3dd"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"500747fda54cb137cf934521a578c2be966d0d82","unresolved":false,"context_lines":[{"line_number":271,"context_line":"                                                  l3_port_check\u003dFalse)"},{"line_number":272,"context_line":""},{"line_number":273,"context_line":"        try:"},{"line_number":274,"context_line":"            with context.session.begin(subtransactions\u003dTrue):"},{"line_number":275,"context_line":"                for port_id in port_ids:"},{"line_number":276,"context_line":"                    self._create_ha_port_binding(context, port_id, router.id)"},{"line_number":277,"context_line":"        except Exception:"}],"source_content_type":"text/x-python","patch_set":72,"id":"fa98f980_07d9c821","line":274,"updated":"2014-09-03 17:41:17.000000000","message":"Are you separating this from the create port actions, because the bindings need to be done in a transaction? Just wondering if the two can be combined.","commit_id":"32ad84aaa83cd3bd3497c46967f24b75043cd3dd"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"40817f3f838c5cde9eacae0918ad3deaefa120ad","unresolved":false,"context_lines":[{"line_number":271,"context_line":"                                                  l3_port_check\u003dFalse)"},{"line_number":272,"context_line":""},{"line_number":273,"context_line":"        try:"},{"line_number":274,"context_line":"            with context.session.begin(subtransactions\u003dTrue):"},{"line_number":275,"context_line":"                for port_id in port_ids:"},{"line_number":276,"context_line":"                    self._create_ha_port_binding(context, port_id, router.id)"},{"line_number":277,"context_line":"        except Exception:"}],"source_content_type":"text/x-python","patch_set":72,"id":"fa98f980_ad71bda9","line":274,"in_reply_to":"fa98f980_07d9c821","updated":"2014-09-03 20:05:48.000000000","message":"This way I can transactivity on the bindings. If one fails we roll back the entire thing (Then continue to manually roll back the ports). Otherwise I\u0027d have to manually rollback bindings as well and there\u0027s no real point.","commit_id":"32ad84aaa83cd3bd3497c46967f24b75043cd3dd"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"500747fda54cb137cf934521a578c2be966d0d82","unresolved":false,"context_lines":[{"line_number":277,"context_line":"        except Exception:"},{"line_number":278,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":279,"context_line":"                for port_id in port_ids:"},{"line_number":280,"context_line":"                    self._core_plugin.delete_port(admin_ctx, port_id,"},{"line_number":281,"context_line":"                                                  l3_port_check\u003dFalse)"},{"line_number":282,"context_line":""},{"line_number":283,"context_line":"    def _delete_ha_interfaces(self, context, router):"}],"source_content_type":"text/x-python","patch_set":72,"id":"fa98f980_a701dc6b","line":280,"updated":"2014-09-03 17:41:17.000000000","message":"Same question on delete raising an exception.","commit_id":"32ad84aaa83cd3bd3497c46967f24b75043cd3dd"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"500747fda54cb137cf934521a578c2be966d0d82","unresolved":false,"context_lines":[{"line_number":314,"context_line":"                self._notify_ha_interfaces_updated(context, router_db.id)"},{"line_number":315,"context_line":"            except Exception:"},{"line_number":316,"context_line":"                with excutils.save_and_reraise_exception():"},{"line_number":317,"context_line":"                    self.delete_router(context, router_db.id)"},{"line_number":318,"context_line":""},{"line_number":319,"context_line":"        return router_db"},{"line_number":320,"context_line":""}],"source_content_type":"text/x-python","patch_set":72,"id":"fa98f980_472d90fd","line":317,"updated":"2014-09-03 17:41:17.000000000","message":"same question on exception.","commit_id":"32ad84aaa83cd3bd3497c46967f24b75043cd3dd"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"3e4ba96d63399f61f4c15b2f6bba072fa392b6a8","unresolved":false,"context_lines":[{"line_number":133,"context_line":"    def _set_vr_id(self, context, router):"},{"line_number":134,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":135,"context_line":"            query \u003d (context.session.query("},{"line_number":136,"context_line":"                l3_attrs_db.RouterExtraAttributes).with_lockmode(\u0027update\u0027)."},{"line_number":137,"context_line":"                join(l3_db.Router)."},{"line_number":138,"context_line":"                filter(l3_attrs_db.RouterExtraAttributes.ha_vr_id !\u003d"},{"line_number":139,"context_line":"                       sql.null(),"}],"source_content_type":"text/x-python","patch_set":73,"id":"fa98f980_c53fb5b2","line":136,"updated":"2014-09-03 19:51:27.000000000","message":"Can we avoid using with_lockmode? with_lockmode (SELECT FOR UPDATE) is not supported by mysql gallera cluster and if its usage can be avoided it would be better.\nMore concretely, can we use similar logic as neutron/plugins/ml2/drivers/type_gre.py add_endpoint does with retries?\n\nI think we need to use a separate table or add a unique constraint for a pair of (router_id, tenant_id, ha_vr_id), so I am not sure it can.\n\nSorry if it was already discussed.","commit_id":"df909b9c08b22248295400dee3c9d17c5c0a2763"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"change_message_id":"8b12af12f8f9e44ac2788a5fc591ce2d7a3b19d1","unresolved":false,"context_lines":[{"line_number":133,"context_line":"    def _set_vr_id(self, context, router):"},{"line_number":134,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":135,"context_line":"            query \u003d (context.session.query("},{"line_number":136,"context_line":"                l3_attrs_db.RouterExtraAttributes).with_lockmode(\u0027update\u0027)."},{"line_number":137,"context_line":"                join(l3_db.Router)."},{"line_number":138,"context_line":"                filter(l3_attrs_db.RouterExtraAttributes.ha_vr_id !\u003d"},{"line_number":139,"context_line":"                       sql.null(),"}],"source_content_type":"text/x-python","patch_set":73,"id":"fa98f980_87659fb6","line":136,"in_reply_to":"fa98f980_36fa6b43","updated":"2014-09-04 09:58:12.000000000","message":"Yes the add_endpoint() method is very instructive, but I do not see any way to use the extra attributes, the unique constraint has to be for pair of (tenant_id, vr_id). So if we add a such constraint the constraint will be violated for each non ha router created (with vr_id set to null). What suggested by Akihiro, seems to be a good approach, I mean adding a new table with an unique constraint for pair of (tenant_id, vr_id) or myabe better (ha_network_id, vr_id) ?","commit_id":"df909b9c08b22248295400dee3c9d17c5c0a2763"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"bcbeb178f63c949605f0bb942c074455ed79c37c","unresolved":false,"context_lines":[{"line_number":133,"context_line":"    def _set_vr_id(self, context, router):"},{"line_number":134,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":135,"context_line":"            query \u003d (context.session.query("},{"line_number":136,"context_line":"                l3_attrs_db.RouterExtraAttributes).with_lockmode(\u0027update\u0027)."},{"line_number":137,"context_line":"                join(l3_db.Router)."},{"line_number":138,"context_line":"                filter(l3_attrs_db.RouterExtraAttributes.ha_vr_id !\u003d"},{"line_number":139,"context_line":"                       sql.null(),"}],"source_content_type":"text/x-python","patch_set":73,"id":"fa98f980_7a5cd14b","line":136,"in_reply_to":"fa98f980_584c789e","updated":"2014-09-04 12:08:45.000000000","message":"@Kevin: Exactly. Sylvain is working on this as we speak.","commit_id":"df909b9c08b22248295400dee3c9d17c5c0a2763"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"7cec5fea16bb967e4a99bfe3d43b2830067b0e5e","unresolved":false,"context_lines":[{"line_number":133,"context_line":"    def _set_vr_id(self, context, router):"},{"line_number":134,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":135,"context_line":"            query \u003d (context.session.query("},{"line_number":136,"context_line":"                l3_attrs_db.RouterExtraAttributes).with_lockmode(\u0027update\u0027)."},{"line_number":137,"context_line":"                join(l3_db.Router)."},{"line_number":138,"context_line":"                filter(l3_attrs_db.RouterExtraAttributes.ha_vr_id !\u003d"},{"line_number":139,"context_line":"                       sql.null(),"}],"source_content_type":"text/x-python","patch_set":73,"id":"fa98f980_584c789e","line":136,"in_reply_to":"fa98f980_87659fb6","updated":"2014-09-04 11:38:19.000000000","message":"+1 to ha_network_id. The real constraint is per broadcast domain since this is used for a VRRP group, right?","commit_id":"df909b9c08b22248295400dee3c9d17c5c0a2763"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"125226ef871b826004ef271378e453233ebb70ca","unresolved":false,"context_lines":[{"line_number":133,"context_line":"    def _set_vr_id(self, context, router):"},{"line_number":134,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":135,"context_line":"            query \u003d (context.session.query("},{"line_number":136,"context_line":"                l3_attrs_db.RouterExtraAttributes).with_lockmode(\u0027update\u0027)."},{"line_number":137,"context_line":"                join(l3_db.Router)."},{"line_number":138,"context_line":"                filter(l3_attrs_db.RouterExtraAttributes.ha_vr_id !\u003d"},{"line_number":139,"context_line":"                       sql.null(),"}],"source_content_type":"text/x-python","patch_set":73,"id":"fa98f980_36fa6b43","line":136,"in_reply_to":"fa98f980_c53fb5b2","updated":"2014-09-04 08:46:54.000000000","message":"We definitely want to avoid with_lockmode if possible.  In the case of the gre type driver\u0027s add_endpoint(), an existing endpoint is simply reused rather than treated as a reason to retry, but the detection of conflict via a db-level uniqueness constraint is instructive.  Is there a way to add a uniqueness constraint on ha_vr_id and tenant_id that could be violated to allow retries?  I don\u0027t know enough about how extra attributes work to be able to answer this question myself.","commit_id":"df909b9c08b22248295400dee3c9d17c5c0a2763"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"a3afeebd07d7a9d36600c3000027210b54884f29","unresolved":false,"context_lines":[{"line_number":194,"context_line":"        num_agents \u003d len(self.get_l3_agents(context))"},{"line_number":195,"context_line":"        max_agents \u003d cfg.CONF.max_l3_agents_per_router"},{"line_number":196,"context_line":"        if max_agents:"},{"line_number":197,"context_line":"            if max_agents \u003e num_agents:"},{"line_number":198,"context_line":"                LOG.warn(_LW(\"Number of available agents lower than \""},{"line_number":199,"context_line":"                             \"max_l3_agents_per_router. L3 agents \""},{"line_number":200,"context_line":"                             \"available: %s\"), num_agents)"}],"source_content_type":"text/x-python","patch_set":73,"id":"fa98f980_8c3866f0","line":197,"updated":"2014-09-04 09:42:04.000000000","message":"Is this something that needs to be warned on? Max agents sounds like a limit, being within a limit doesn\u0027t seem like a warning condition. Maybe just INFO.","commit_id":"df909b9c08b22248295400dee3c9d17c5c0a2763"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"change_message_id":"a0c32b2aee4e2790e9e9b45da51dcc0379652d80","unresolved":false,"context_lines":[{"line_number":194,"context_line":"        num_agents \u003d len(self.get_l3_agents(context))"},{"line_number":195,"context_line":"        max_agents \u003d cfg.CONF.max_l3_agents_per_router"},{"line_number":196,"context_line":"        if max_agents:"},{"line_number":197,"context_line":"            if max_agents \u003e num_agents:"},{"line_number":198,"context_line":"                LOG.warn(_LW(\"Number of available agents lower than \""},{"line_number":199,"context_line":"                             \"max_l3_agents_per_router. L3 agents \""},{"line_number":200,"context_line":"                             \"available: %s\"), num_agents)"}],"source_content_type":"text/x-python","patch_set":73,"id":"fa98f980_8eecc5bc","line":197,"in_reply_to":"fa98f980_8c3866f0","updated":"2014-09-05 01:07:16.000000000","message":"Done","commit_id":"df909b9c08b22248295400dee3c9d17c5c0a2763"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"346bbefd37f0a1a0e2f369bec77f4c9661ba591a","unresolved":false,"context_lines":[{"line_number":301,"context_line":"            ha \u003d cfg.CONF.l3_ha"},{"line_number":302,"context_line":"        return ha"},{"line_number":303,"context_line":""},{"line_number":304,"context_line":"    def _create_router_db(self, context, router, tenant_id):"},{"line_number":305,"context_line":"        router[\u0027ha\u0027] \u003d self._is_ha(router)"},{"line_number":306,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":307,"context_line":"            router_db \u003d super(L3_HA_NAT_db_mixin, self)._create_router_db("}],"source_content_type":"text/x-python","patch_set":73,"id":"fa98f980_c27155a9","line":304,"updated":"2014-09-04 10:16:35.000000000","message":"We need to validate that the router is not both HA and distributed. When we fix the integration issues we\u0027ll remove the check.","commit_id":"df909b9c08b22248295400dee3c9d17c5c0a2763"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"346bbefd37f0a1a0e2f369bec77f4c9661ba591a","unresolved":false,"context_lines":[{"line_number":318,"context_line":""},{"line_number":319,"context_line":"        return router_db"},{"line_number":320,"context_line":""},{"line_number":321,"context_line":"    def _update_router_db(self, context, router_id, data, gw_info):"},{"line_number":322,"context_line":"        ha \u003d data.pop(\u0027ha\u0027, None)"},{"line_number":323,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":324,"context_line":"            router_db \u003d super(L3_HA_NAT_db_mixin, self)._update_router_db("}],"source_content_type":"text/x-python","patch_set":73,"id":"fa98f980_a2a371fe","line":321,"updated":"2014-09-04 10:16:35.000000000","message":"Validate HA and DVR here as well.","commit_id":"df909b9c08b22248295400dee3c9d17c5c0a2763"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"3e4ba96d63399f61f4c15b2f6bba072fa392b6a8","unresolved":false,"context_lines":[{"line_number":345,"context_line":"    def update_router_state(self, context, router_id, state, host):"},{"line_number":346,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":347,"context_line":"            bindings \u003d self.get_ha_router_port_bindings(context, [router_id],"},{"line_number":348,"context_line":"                                                        host)"},{"line_number":349,"context_line":"            if bindings:"},{"line_number":350,"context_line":"                bindings[0].update({\u0027state\u0027: state})"},{"line_number":351,"context_line":""}],"source_content_type":"text/x-python","patch_set":73,"id":"fa98f980_c5497532","line":348,"updated":"2014-09-03 19:51:27.000000000","message":"The size of bindings is expected to be 1. Don\u0027t we need to check the size of bindings?","commit_id":"df909b9c08b22248295400dee3c9d17c5c0a2763"},{"author":{"_account_id":1923,"name":"Mohammad Banikazemi","email":"mbanikazemi@gmail.com","username":"mb-s"},"change_message_id":"f563df17193220ed4121af1b42b53c690e7955d4","unresolved":false,"context_lines":[{"line_number":137,"context_line":""},{"line_number":138,"context_line":"    def __init__(self):"},{"line_number":139,"context_line":"        self._verify_configuration()"},{"line_number":140,"context_line":"        super(L3_HA_NAT_db_mixin, self).__init__()"},{"line_number":141,"context_line":""},{"line_number":142,"context_line":"    def get_ha_network(self, context, tenant_id):"},{"line_number":143,"context_line":"        return (context.session.query(L3HARouterNetwork)."}],"source_content_type":"text/x-python","patch_set":74,"id":"fa98f980_030f78e2","line":140,"updated":"2014-09-08 16:17:22.000000000","message":"This doesn\u0027t seem necessary. Am I missing something?","commit_id":"df1604d8e5a09f891187b0bbc6966fd1622294ed"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"c966034e1d71bbca04b500f43e110c48fd225fbd","unresolved":false,"context_lines":[{"line_number":137,"context_line":""},{"line_number":138,"context_line":"    def __init__(self):"},{"line_number":139,"context_line":"        self._verify_configuration()"},{"line_number":140,"context_line":"        super(L3_HA_NAT_db_mixin, self).__init__()"},{"line_number":141,"context_line":""},{"line_number":142,"context_line":"    def get_ha_network(self, context, tenant_id):"},{"line_number":143,"context_line":"        return (context.session.query(L3HARouterNetwork)."}],"source_content_type":"text/x-python","patch_set":74,"id":"fa98f980_e32fd4f4","line":140,"in_reply_to":"fa98f980_030f78e2","updated":"2014-09-08 16:32:50.000000000","message":"Are you referring to the super call? It seems like none of the parent classes implement __init__ at this time, but why break the inheritance chain? I think people will be quite surprised if they implement __init__ on the DVR mixin or something and it\u0027s never called.","commit_id":"df1604d8e5a09f891187b0bbc6966fd1622294ed"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"ac7914e527bb6f09703a65e88556d1c62610b438","unresolved":false,"context_lines":[{"line_number":137,"context_line":""},{"line_number":138,"context_line":"    def __init__(self):"},{"line_number":139,"context_line":"        self._verify_configuration()"},{"line_number":140,"context_line":"        super(L3_HA_NAT_db_mixin, self).__init__()"},{"line_number":141,"context_line":""},{"line_number":142,"context_line":"    def get_ha_network(self, context, tenant_id):"},{"line_number":143,"context_line":"        return (context.session.query(L3HARouterNetwork)."}],"source_content_type":"text/x-python","patch_set":74,"id":"fa98f980_65d67ec7","line":140,"in_reply_to":"fa98f980_9f78152d","updated":"2014-09-08 22:27:06.000000000","message":"+1 to keep this as it is.","commit_id":"df1604d8e5a09f891187b0bbc6966fd1622294ed"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"change_message_id":"74b3abce1e16f9660a0c3376bd74433925d1b9ec","unresolved":false,"context_lines":[{"line_number":137,"context_line":""},{"line_number":138,"context_line":"    def __init__(self):"},{"line_number":139,"context_line":"        self._verify_configuration()"},{"line_number":140,"context_line":"        super(L3_HA_NAT_db_mixin, self).__init__()"},{"line_number":141,"context_line":""},{"line_number":142,"context_line":"    def get_ha_network(self, context, tenant_id):"},{"line_number":143,"context_line":"        return (context.session.query(L3HARouterNetwork)."}],"source_content_type":"text/x-python","patch_set":74,"id":"fa98f980_9f78152d","line":140,"in_reply_to":"fa98f980_e32fd4f4","updated":"2014-09-08 21:07:25.000000000","message":"Agree with Assaf I prefer to not break the inheritance chain, so I\u0027ll let it like that","commit_id":"df1604d8e5a09f891187b0bbc6966fd1622294ed"},{"author":{"_account_id":1923,"name":"Mohammad Banikazemi","email":"mbanikazemi@gmail.com","username":"mb-s"},"change_message_id":"cd35806bf81559dd6aaadc61493c46f97427341a","unresolved":false,"context_lines":[{"line_number":137,"context_line":""},{"line_number":138,"context_line":"    def __init__(self):"},{"line_number":139,"context_line":"        self._verify_configuration()"},{"line_number":140,"context_line":"        super(L3_HA_NAT_db_mixin, self).__init__()"},{"line_number":141,"context_line":""},{"line_number":142,"context_line":"    def get_ha_network(self, context, tenant_id):"},{"line_number":143,"context_line":"        return (context.session.query(L3HARouterNetwork)."}],"source_content_type":"text/x-python","patch_set":74,"id":"fa98f980_c76e922e","line":140,"in_reply_to":"fa98f980_e32fd4f4","updated":"2014-09-15 20:40:43.000000000","message":"yes yes, had missed what the method was!","commit_id":"df1604d8e5a09f891187b0bbc6966fd1622294ed"},{"author":{"_account_id":2733,"name":"Darragh O\u0027Reilly","email":"doreilly@suse.com","username":"darragh-oreilly"},"change_message_id":"b38e6c37073f3956f50fd57a2f83c9c3859384f7","unresolved":false,"context_lines":[{"line_number":295,"context_line":"                self._core_plugin.delete_port(admin_ctx, port[\u0027id\u0027],"},{"line_number":296,"context_line":"                                              l3_port_check\u003dFalse)"},{"line_number":297,"context_line":""},{"line_number":298,"context_line":"    def _create_ha_interfaces(self, context, router, ha_network):"},{"line_number":299,"context_line":"        admin_ctx \u003d context.elevated()"},{"line_number":300,"context_line":""},{"line_number":301,"context_line":"        num_agents \u003d self.get_number_of_agents_for_scheduling(context)"}],"source_content_type":"text/x-python","patch_set":74,"id":"fa98f980_1d21a6b4","line":298,"updated":"2014-09-08 11:21:26.000000000","message":"could this method use add_ha_port() ?","commit_id":"df1604d8e5a09f891187b0bbc6966fd1622294ed"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"c966034e1d71bbca04b500f43e110c48fd225fbd","unresolved":false,"context_lines":[{"line_number":295,"context_line":"                self._core_plugin.delete_port(admin_ctx, port[\u0027id\u0027],"},{"line_number":296,"context_line":"                                              l3_port_check\u003dFalse)"},{"line_number":297,"context_line":""},{"line_number":298,"context_line":"    def _create_ha_interfaces(self, context, router, ha_network):"},{"line_number":299,"context_line":"        admin_ctx \u003d context.elevated()"},{"line_number":300,"context_line":""},{"line_number":301,"context_line":"        num_agents \u003d self.get_number_of_agents_for_scheduling(context)"}],"source_content_type":"text/x-python","patch_set":74,"id":"fa98f980_83a9a826","line":298,"in_reply_to":"fa98f980_1d21a6b4","updated":"2014-09-08 16:32:50.000000000","message":"I *think* so. Then we could delete lines 323 to 331. Each add_ha_port creates its own binding. If any of the create ha binding creations fail, add_ha_port removes the port, re-raises, which is caught in line 317, and we delete all of the previous ports. If the creation of the port itself fails we catch it again in line 317 and delete all of the previous ports. Seems fine to me.\n\nSylvain what do you think?","commit_id":"df1604d8e5a09f891187b0bbc6966fd1622294ed"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"change_message_id":"28ad4e64eaefb168449f7a4b181730878f9b1b48","unresolved":false,"context_lines":[{"line_number":295,"context_line":"                self._core_plugin.delete_port(admin_ctx, port[\u0027id\u0027],"},{"line_number":296,"context_line":"                                              l3_port_check\u003dFalse)"},{"line_number":297,"context_line":""},{"line_number":298,"context_line":"    def _create_ha_interfaces(self, context, router, ha_network):"},{"line_number":299,"context_line":"        admin_ctx \u003d context.elevated()"},{"line_number":300,"context_line":""},{"line_number":301,"context_line":"        num_agents \u003d self.get_number_of_agents_for_scheduling(context)"}],"source_content_type":"text/x-python","patch_set":74,"id":"fa98f980_958e3f26","line":298,"in_reply_to":"fa98f980_83a9a826","updated":"2014-09-08 16:46:28.000000000","message":"Agree with you guys","commit_id":"df1604d8e5a09f891187b0bbc6966fd1622294ed"},{"author":{"_account_id":2733,"name":"Darragh O\u0027Reilly","email":"doreilly@suse.com","username":"darragh-oreilly"},"change_message_id":"b38e6c37073f3956f50fd57a2f83c9c3859384f7","unresolved":false,"context_lines":[{"line_number":332,"context_line":""},{"line_number":333,"context_line":"    def _delete_ha_interfaces(self, context, router):"},{"line_number":334,"context_line":"        admin_ctx \u003d context.elevated()"},{"line_number":335,"context_line":"        device_filter \u003d {\u0027device_id\u0027: [router.id],"},{"line_number":336,"context_line":"                         \u0027device_owner\u0027:"},{"line_number":337,"context_line":"                         [constants.DEVICE_OWNER_ROUTER_HA_INTF]}"},{"line_number":338,"context_line":"        ports \u003d self._core_plugin.get_ports(admin_ctx, filters\u003ddevice_filter)"}],"source_content_type":"text/x-python","patch_set":74,"id":"fa98f980_9511f05f","line":335,"updated":"2014-09-08 11:21:26.000000000","message":"could have passed in just the router id on L333","commit_id":"df1604d8e5a09f891187b0bbc6966fd1622294ed"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"change_message_id":"74b3abce1e16f9660a0c3376bd74433925d1b9ec","unresolved":false,"context_lines":[{"line_number":332,"context_line":""},{"line_number":333,"context_line":"    def _delete_ha_interfaces(self, context, router):"},{"line_number":334,"context_line":"        admin_ctx \u003d context.elevated()"},{"line_number":335,"context_line":"        device_filter \u003d {\u0027device_id\u0027: [router.id],"},{"line_number":336,"context_line":"                         \u0027device_owner\u0027:"},{"line_number":337,"context_line":"                         [constants.DEVICE_OWNER_ROUTER_HA_INTF]}"},{"line_number":338,"context_line":"        ports \u003d self._core_plugin.get_ports(admin_ctx, filters\u003ddevice_filter)"}],"source_content_type":"text/x-python","patch_set":74,"id":"fa98f980_dfa61d53","line":335,"in_reply_to":"fa98f980_9511f05f","updated":"2014-09-08 21:07:25.000000000","message":"Done","commit_id":"df1604d8e5a09f891187b0bbc6966fd1622294ed"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"079b81ab460acc5a7652f8eeaf44032a38112a2f","unresolved":false,"context_lines":[{"line_number":368,"context_line":"                if not ha_network:"},{"line_number":369,"context_line":"                    ha_network \u003d self._create_ha_network(context,"},{"line_number":370,"context_line":"                                                         router_db.tenant_id)"},{"line_number":371,"context_line":""},{"line_number":372,"context_line":"                self._set_vr_id(context, router_db, ha_network)"},{"line_number":373,"context_line":"                self._create_ha_interfaces(context, router_db, ha_network)"},{"line_number":374,"context_line":"                self._notify_ha_interfaces_updated(context, router_db.id)"}],"source_content_type":"text/x-python","patch_set":74,"id":"fa98f980_ef350bdc","line":371,"updated":"2014-09-08 07:14:53.000000000","message":"Now if this invocation of _create_router_db creates the HA network and one of these 3 methods fail we don\u0027t clean up the HA network.","commit_id":"df1604d8e5a09f891187b0bbc6966fd1622294ed"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"079b81ab460acc5a7652f8eeaf44032a38112a2f","unresolved":false,"context_lines":[{"line_number":426,"context_line":""},{"line_number":427,"context_line":"                bindings[0].update({\u0027state\u0027: state})"},{"line_number":428,"context_line":""},{"line_number":429,"context_line":"    def delete_router(self, context, id):"},{"line_number":430,"context_line":"        router_db \u003d self._get_router(context, id)"},{"line_number":431,"context_line":"        if router_db.extra_attributes.ha:"},{"line_number":432,"context_line":"            ha_network \u003d self.get_ha_network(context,"}],"source_content_type":"text/x-python","patch_set":74,"id":"fa98f980_f42082b2","line":429,"updated":"2014-09-08 07:14:53.000000000","message":"I just realized, we never delete HA networks do we? On a public cloud if you\u0027ve got tenants registering and creating HA routers then deleting them, you\u0027re just gonna end up with a bunch of HA networks laying around... We probably need to check here and in update router that if the last allocation on a network was deleted, delete the network as well. Maybe do it in _delete_vr_id_allocation itself.","commit_id":"df1604d8e5a09f891187b0bbc6966fd1622294ed"},{"author":{"_account_id":2733,"name":"Darragh O\u0027Reilly","email":"doreilly@suse.com","username":"darragh-oreilly"},"change_message_id":"b38e6c37073f3956f50fd57a2f83c9c3859384f7","unresolved":false,"context_lines":[{"line_number":426,"context_line":""},{"line_number":427,"context_line":"                bindings[0].update({\u0027state\u0027: state})"},{"line_number":428,"context_line":""},{"line_number":429,"context_line":"    def delete_router(self, context, id):"},{"line_number":430,"context_line":"        router_db \u003d self._get_router(context, id)"},{"line_number":431,"context_line":"        if router_db.extra_attributes.ha:"},{"line_number":432,"context_line":"            ha_network \u003d self.get_ha_network(context,"}],"source_content_type":"text/x-python","patch_set":74,"id":"fa98f980_1dfe0639","line":429,"updated":"2014-09-08 11:21:26.000000000","message":"id is a built-in, use router_id instead","commit_id":"df1604d8e5a09f891187b0bbc6966fd1622294ed"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"366daa0c0ff21a0168b205ad1b85a0ad1a0da29a","unresolved":false,"context_lines":[{"line_number":426,"context_line":""},{"line_number":427,"context_line":"                bindings[0].update({\u0027state\u0027: state})"},{"line_number":428,"context_line":""},{"line_number":429,"context_line":"    def delete_router(self, context, id):"},{"line_number":430,"context_line":"        router_db \u003d self._get_router(context, id)"},{"line_number":431,"context_line":"        if router_db.extra_attributes.ha:"},{"line_number":432,"context_line":"            ha_network \u003d self.get_ha_network(context,"}],"source_content_type":"text/x-python","patch_set":74,"id":"fa98f980_ab992221","line":429,"in_reply_to":"fa98f980_1853666d","updated":"2014-09-08 17:52:58.000000000","message":"We can\u0027t create a network per router because a lot of deployments use VLANs for segmentation.","commit_id":"df1604d8e5a09f891187b0bbc6966fd1622294ed"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"040211cda4ae8d6520ea5a688624690e8d0f8489","unresolved":false,"context_lines":[{"line_number":426,"context_line":""},{"line_number":427,"context_line":"                bindings[0].update({\u0027state\u0027: state})"},{"line_number":428,"context_line":""},{"line_number":429,"context_line":"    def delete_router(self, context, id):"},{"line_number":430,"context_line":"        router_db \u003d self._get_router(context, id)"},{"line_number":431,"context_line":"        if router_db.extra_attributes.ha:"},{"line_number":432,"context_line":"            ha_network \u003d self.get_ha_network(context,"}],"source_content_type":"text/x-python","patch_set":74,"id":"fa98f980_a8ff6ba9","line":429,"in_reply_to":"fa98f980_1dfe0639","updated":"2014-09-08 15:56:02.000000000","message":"-1 to renaming \u0027id\u0027.  Darragh\u0027s comment is correct but out of the scope of this patch since this overrides a method already defined in the code with the same signature.  Please don\u0027t make this change here in this patch.\n\nStill thinking on the locking issue...  stay tuned.","commit_id":"df1604d8e5a09f891187b0bbc6966fd1622294ed"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"c2c80717efe9e9bdd47886e2c4f51a131c80e3b2","unresolved":false,"context_lines":[{"line_number":426,"context_line":""},{"line_number":427,"context_line":"                bindings[0].update({\u0027state\u0027: state})"},{"line_number":428,"context_line":""},{"line_number":429,"context_line":"    def delete_router(self, context, id):"},{"line_number":430,"context_line":"        router_db \u003d self._get_router(context, id)"},{"line_number":431,"context_line":"        if router_db.extra_attributes.ha:"},{"line_number":432,"context_line":"            ha_network \u003d self.get_ha_network(context,"}],"source_content_type":"text/x-python","patch_set":74,"id":"fa98f980_901c8215","line":429,"in_reply_to":"fa98f980_25c1d6e4","updated":"2014-09-08 22:56:03.000000000","message":"I think the delete of the HA network can be done in a single operation.  I\u0027m no sqlalchemy expert but with SQL I would do it in a DELETE .... WHERE ...  statement.  The where statement would select the network if it no longer has any allocation.  I thought that an sqlalchemy query(...).delete() would be implemented as a single database operation that should return an integer indicating how many rows were deleted.\n\nWould there still be a race in _create_router_db?  It calls get_ha_network, create_network, and then _create_ha_network_tenant_binding.  Could a delete slip in in the middle and cause the same problem?","commit_id":"df1604d8e5a09f891187b0bbc6966fd1622294ed"},{"author":{"_account_id":2733,"name":"Darragh O\u0027Reilly","email":"doreilly@suse.com","username":"darragh-oreilly"},"change_message_id":"43c731a9b1f5953ab3d1aa16cb3c4f3a4fe580dd","unresolved":false,"context_lines":[{"line_number":426,"context_line":""},{"line_number":427,"context_line":"                bindings[0].update({\u0027state\u0027: state})"},{"line_number":428,"context_line":""},{"line_number":429,"context_line":"    def delete_router(self, context, id):"},{"line_number":430,"context_line":"        router_db \u003d self._get_router(context, id)"},{"line_number":431,"context_line":"        if router_db.extra_attributes.ha:"},{"line_number":432,"context_line":"            ha_network \u003d self.get_ha_network(context,"}],"source_content_type":"text/x-python","patch_set":74,"id":"fa98f980_1853666d","line":429,"in_reply_to":"fa98f980_a8ff6ba9","updated":"2014-09-08 17:26:53.000000000","message":"thanks Carl, I just saw the red line under id in Ecilpse and didn\u0027t think anymore. \n\n@Assaf:\n1) give each ha router its own ha network. Burns segmentation ids, but there are millions of them with vxlan.\n\n3) doesn\u0027t seem to bad - max of one per tenant - just a row in the db.","commit_id":"df1604d8e5a09f891187b0bbc6966fd1622294ed"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"ac7914e527bb6f09703a65e88556d1c62610b438","unresolved":false,"context_lines":[{"line_number":426,"context_line":""},{"line_number":427,"context_line":"                bindings[0].update({\u0027state\u0027: state})"},{"line_number":428,"context_line":""},{"line_number":429,"context_line":"    def delete_router(self, context, id):"},{"line_number":430,"context_line":"        router_db \u003d self._get_router(context, id)"},{"line_number":431,"context_line":"        if router_db.extra_attributes.ha:"},{"line_number":432,"context_line":"            ha_network \u003d self.get_ha_network(context,"}],"source_content_type":"text/x-python","patch_set":74,"id":"fa98f980_25c1d6e4","line":429,"in_reply_to":"fa98f980_ab992221","updated":"2014-09-08 22:27:06.000000000","message":"I didn\u0027t think about using a VLAN per tenant for HA networks.  That is something worth noting in the documentation.  Like Darragh, I tend to think of networks as a plentiful resource and cheap to create.\n\nDeleting networks matters when a tenant abandons the need for any HA router after having created one.  Can the HA networks be administratively deleted until deletion is worked out?","commit_id":"df1604d8e5a09f891187b0bbc6966fd1622294ed"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"change_message_id":"69ccceaedf4df2693400b9e6318da11e20c9c9c7","unresolved":false,"context_lines":[{"line_number":426,"context_line":""},{"line_number":427,"context_line":"                bindings[0].update({\u0027state\u0027: state})"},{"line_number":428,"context_line":""},{"line_number":429,"context_line":"    def delete_router(self, context, id):"},{"line_number":430,"context_line":"        router_db \u003d self._get_router(context, id)"},{"line_number":431,"context_line":"        if router_db.extra_attributes.ha:"},{"line_number":432,"context_line":"            ha_network \u003d self.get_ha_network(context,"}],"source_content_type":"text/x-python","patch_set":74,"id":"fa98f980_c8810f4f","line":429,"in_reply_to":"fa98f980_c2d2ce33","updated":"2014-09-08 15:53:05.000000000","message":"According to our discussion, yes I do not see how to solve this, I\u0027ll try to find a way, if not able I will submit another patch addressing comments. And I will try to address it after.","commit_id":"df1604d8e5a09f891187b0bbc6966fd1622294ed"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"b4330f6a394f65a026da10d2239a510b4d80244c","unresolved":false,"context_lines":[{"line_number":426,"context_line":""},{"line_number":427,"context_line":"                bindings[0].update({\u0027state\u0027: state})"},{"line_number":428,"context_line":""},{"line_number":429,"context_line":"    def delete_router(self, context, id):"},{"line_number":430,"context_line":"        router_db \u003d self._get_router(context, id)"},{"line_number":431,"context_line":"        if router_db.extra_attributes.ha:"},{"line_number":432,"context_line":"            ha_network \u003d self.get_ha_network(context,"}],"source_content_type":"text/x-python","patch_set":74,"id":"fa98f980_c2d2ce33","line":429,"in_reply_to":"fa98f980_f42082b2","updated":"2014-09-08 15:11:59.000000000","message":"I don\u0027t exactly know how to solve this, since we don\u0027t \u0027want\u0027 to use DB locking... If we delete the HA network during _delete_vr_id_allocation (Check if it\u0027s the last allocation on the network that we\u0027re deleting, if so, delete the HA network) then we\u0027ll introduce raceful behavior: If a create_router arrives, on the same network, during the deletion of a vrid allocation then we could create the router, then delete the HA network, and that new router won\u0027t work.\n\nWe can either:\n\n1) Find a solution to the race without locking (Happy to hear ideas...)\n\n2) Solve it with locking (Lock all allocations on the network in line 366 during creation of router)\n\n3) Not delete HA networks ever, which is what we\u0027re doing now","commit_id":"df1604d8e5a09f891187b0bbc6966fd1622294ed"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"5225fc766dd8ff746cf40b1bf48a60c23151dce2","unresolved":false,"context_lines":[{"line_number":115,"context_line":"    vr_id \u003d sa.Column(sa.Integer(), nullable\u003dFalse, primary_key\u003dTrue)"},{"line_number":116,"context_line":""},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"class L3_HA_NAT_db_mixin(l3_dvr_db.L3_NAT_with_dvr_db_mixin):"},{"line_number":119,"context_line":"    \"\"\"Mixin class to add high availability capability to routers.\"\"\""},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"    extra_attributes \u003d ("}],"source_content_type":"text/x-python","patch_set":75,"id":"fa98f980_cf1b99c8","line":118,"updated":"2014-09-10 09:12:28.000000000","message":"Why inheriting from DVR mixin? Sorry if was already discussed and agreed","commit_id":"3dc9417bb4da2c6a1fc685d106eb5cd660be18ef"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"e8a7183cbd6df98b546d3aee8e860c9a374b3675","unresolved":false,"context_lines":[{"line_number":115,"context_line":"    vr_id \u003d sa.Column(sa.Integer(), nullable\u003dFalse, primary_key\u003dTrue)"},{"line_number":116,"context_line":""},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"class L3_HA_NAT_db_mixin(l3_dvr_db.L3_NAT_with_dvr_db_mixin):"},{"line_number":119,"context_line":"    \"\"\"Mixin class to add high availability capability to routers.\"\"\""},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"    extra_attributes \u003d ("}],"source_content_type":"text/x-python","patch_set":75,"id":"fa98f980_1bcb231f","line":118,"in_reply_to":"fa98f980_ba777501","updated":"2014-09-10 11:23:23.000000000","message":"I see, thanks for explanation. May be useful to add this info to docstring","commit_id":"3dc9417bb4da2c6a1fc685d106eb5cd660be18ef"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"change_message_id":"7a5f970b5c87691e43ac3ae8cd5ffaf979d568e8","unresolved":false,"context_lines":[{"line_number":115,"context_line":"    vr_id \u003d sa.Column(sa.Integer(), nullable\u003dFalse, primary_key\u003dTrue)"},{"line_number":116,"context_line":""},{"line_number":117,"context_line":""},{"line_number":118,"context_line":"class L3_HA_NAT_db_mixin(l3_dvr_db.L3_NAT_with_dvr_db_mixin):"},{"line_number":119,"context_line":"    \"\"\"Mixin class to add high availability capability to routers.\"\"\""},{"line_number":120,"context_line":""},{"line_number":121,"context_line":"    extra_attributes \u003d ("}],"source_content_type":"text/x-python","patch_set":75,"id":"fa98f980_ba777501","line":118,"in_reply_to":"fa98f980_cf1b99c8","updated":"2014-09-10 09:56:08.000000000","message":"Because this is a chain of inheritance and we need to be sure that the ha mixin will be used first. see the l3_router_plugin.py file we removed the dvr mixin the be sure of the order of the calls of the methods create/delete routers.","commit_id":"3dc9417bb4da2c6a1fc685d106eb5cd660be18ef"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"23a46f41f03a86e8288ff56c85065f62e4483779","unresolved":false,"context_lines":[{"line_number":349,"context_line":"                if not ha_network:"},{"line_number":350,"context_line":"                    ha_network \u003d self._create_ha_network(context,"},{"line_number":351,"context_line":"                                                         router_db.tenant_id)"},{"line_number":352,"context_line":""},{"line_number":353,"context_line":"                self._set_vr_id(context, router_db, ha_network)"},{"line_number":354,"context_line":"                self._create_ha_interfaces(context, router_db, ha_network)"},{"line_number":355,"context_line":"                self._notify_ha_interfaces_updated(context, router_db.id)"}],"source_content_type":"text/x-python","patch_set":75,"id":"fa98f980_42d170cc","line":352,"updated":"2014-09-08 21:20:09.000000000","message":"We still don\u0027t clean up the HA network in case the next functions fail. I don\u0027t think we could introduce raceful behavior here, at least not in an interesting way? If you get two router creations:\n\nFirst one creates the network, fails creating HA interfaces (For example)\n\nThe second creation sees that the network already exists so doesn\u0027t create it\n\nThe first creation then cleans up the network... \n\nBut why would the 2nd router creation succeed at this point if the first failed?","commit_id":"3dc9417bb4da2c6a1fc685d106eb5cd660be18ef"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"change_message_id":"2cc7b4580c42588de4660b4aa605b83e055012d6","unresolved":false,"context_lines":[{"line_number":349,"context_line":"                if not ha_network:"},{"line_number":350,"context_line":"                    ha_network \u003d self._create_ha_network(context,"},{"line_number":351,"context_line":"                                                         router_db.tenant_id)"},{"line_number":352,"context_line":""},{"line_number":353,"context_line":"                self._set_vr_id(context, router_db, ha_network)"},{"line_number":354,"context_line":"                self._create_ha_interfaces(context, router_db, ha_network)"},{"line_number":355,"context_line":"                self._notify_ha_interfaces_updated(context, router_db.id)"}],"source_content_type":"text/x-python","patch_set":75,"id":"fa98f980_b6809e8c","line":352,"in_reply_to":"fa98f980_42d170cc","updated":"2014-09-09 00:32:32.000000000","message":"I didn\u0027t introduced the delete Ha network here since I think this should be addressed exactly as the same way as the delete_router IMHO, and I wanted to wait feebacks about this issue.","commit_id":"3dc9417bb4da2c6a1fc685d106eb5cd660be18ef"},{"author":{"_account_id":2888,"name":"Mathieu Rohon","email":"mathieu.rohon@gmail.com","username":"mathieu-rohon"},"change_message_id":"11623ff9a8fbbd8c88228166790a10b9ccfdba31","unresolved":false,"context_lines":[{"line_number":349,"context_line":"                if not ha_network:"},{"line_number":350,"context_line":"                    ha_network \u003d self._create_ha_network(context,"},{"line_number":351,"context_line":"                                                         router_db.tenant_id)"},{"line_number":352,"context_line":""},{"line_number":353,"context_line":"                self._set_vr_id(context, router_db, ha_network)"},{"line_number":354,"context_line":"                self._create_ha_interfaces(context, router_db, ha_network)"},{"line_number":355,"context_line":"                self._notify_ha_interfaces_updated(context, router_db.id)"}],"source_content_type":"text/x-python","patch_set":75,"id":"fa98f980_8d5a9d81","line":352,"in_reply_to":"fa98f980_b6809e8c","updated":"2014-09-09 09:36:52.000000000","message":"see comments line 410","commit_id":"3dc9417bb4da2c6a1fc685d106eb5cd660be18ef"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"45e1825a06845b7bb0c4447374787dc9b88c687a","unresolved":false,"context_lines":[{"line_number":407,"context_line":""},{"line_number":408,"context_line":"                bindings[0].update({\u0027state\u0027: state})"},{"line_number":409,"context_line":""},{"line_number":410,"context_line":"    def delete_router(self, context, id):"},{"line_number":411,"context_line":"        router_db \u003d self._get_router(context, id)"},{"line_number":412,"context_line":"        if router_db.extra_attributes.ha:"},{"line_number":413,"context_line":"            ha_network \u003d self.get_ha_network(context,"}],"source_content_type":"text/x-python","patch_set":75,"id":"fa98f980_502bfa2f","line":410,"updated":"2014-09-08 22:56:35.000000000","message":"See further comments in the thread on PS74.","commit_id":"3dc9417bb4da2c6a1fc685d106eb5cd660be18ef"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"ee73b2a8b92acf978a564a61de6ed79232e05855","unresolved":false,"context_lines":[{"line_number":407,"context_line":""},{"line_number":408,"context_line":"                bindings[0].update({\u0027state\u0027: state})"},{"line_number":409,"context_line":""},{"line_number":410,"context_line":"    def delete_router(self, context, id):"},{"line_number":411,"context_line":"        router_db \u003d self._get_router(context, id)"},{"line_number":412,"context_line":"        if router_db.extra_attributes.ha:"},{"line_number":413,"context_line":"            ha_network \u003d self.get_ha_network(context,"}],"source_content_type":"text/x-python","patch_set":75,"id":"fa98f980_19835acd","line":410,"in_reply_to":"fa98f980_11eed422","updated":"2014-09-09 04:01:50.000000000","message":"Could we file a bug report on this to follow up?","commit_id":"3dc9417bb4da2c6a1fc685d106eb5cd660be18ef"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"8bb68df06e02450f8849a300850901bdb52712af","unresolved":false,"context_lines":[{"line_number":407,"context_line":""},{"line_number":408,"context_line":"                bindings[0].update({\u0027state\u0027: state})"},{"line_number":409,"context_line":""},{"line_number":410,"context_line":"    def delete_router(self, context, id):"},{"line_number":411,"context_line":"        router_db \u003d self._get_router(context, id)"},{"line_number":412,"context_line":"        if router_db.extra_attributes.ha:"},{"line_number":413,"context_line":"            ha_network \u003d self.get_ha_network(context,"}],"source_content_type":"text/x-python","patch_set":75,"id":"fa98f980_77d9cd82","line":410,"in_reply_to":"fa98f980_19835acd","updated":"2014-09-09 05:42:31.000000000","message":"+1 for follow up","commit_id":"3dc9417bb4da2c6a1fc685d106eb5cd660be18ef"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"change_message_id":"2cc7b4580c42588de4660b4aa605b83e055012d6","unresolved":false,"context_lines":[{"line_number":407,"context_line":""},{"line_number":408,"context_line":"                bindings[0].update({\u0027state\u0027: state})"},{"line_number":409,"context_line":""},{"line_number":410,"context_line":"    def delete_router(self, context, id):"},{"line_number":411,"context_line":"        router_db \u003d self._get_router(context, id)"},{"line_number":412,"context_line":"        if router_db.extra_attributes.ha:"},{"line_number":413,"context_line":"            ha_network \u003d self.get_ha_network(context,"}],"source_content_type":"text/x-python","patch_set":75,"id":"fa98f980_d602820a","line":410,"in_reply_to":"fa98f980_502bfa2f","updated":"2014-09-09 00:32:32.000000000","message":"Not sure that we could use delete where ... since we should use a plugin method to delete the network (delete_network). In the case of the plugin ML2 RPC call could occur in the postcommit in the ml2 plugin ?","commit_id":"3dc9417bb4da2c6a1fc685d106eb5cd660be18ef"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"change_message_id":"547546037db1c11b67b3acdd0a4bc218bda89f7d","unresolved":false,"context_lines":[{"line_number":407,"context_line":""},{"line_number":408,"context_line":"                bindings[0].update({\u0027state\u0027: state})"},{"line_number":409,"context_line":""},{"line_number":410,"context_line":"    def delete_router(self, context, id):"},{"line_number":411,"context_line":"        router_db \u003d self._get_router(context, id)"},{"line_number":412,"context_line":"        if router_db.extra_attributes.ha:"},{"line_number":413,"context_line":"            ha_network \u003d self.get_ha_network(context,"}],"source_content_type":"text/x-python","patch_set":75,"id":"fa98f980_4a37bbb0","line":410,"in_reply_to":"fa98f980_77d9cd82","updated":"2014-09-09 08:40:15.000000000","message":"I filled a bug: https://bugs.launchpad.net/neutron/+bug/1367157","commit_id":"3dc9417bb4da2c6a1fc685d106eb5cd660be18ef"},{"author":{"_account_id":2888,"name":"Mathieu Rohon","email":"mathieu.rohon@gmail.com","username":"mathieu-rohon"},"change_message_id":"11623ff9a8fbbd8c88228166790a10b9ccfdba31","unresolved":false,"context_lines":[{"line_number":407,"context_line":""},{"line_number":408,"context_line":"                bindings[0].update({\u0027state\u0027: state})"},{"line_number":409,"context_line":""},{"line_number":410,"context_line":"    def delete_router(self, context, id):"},{"line_number":411,"context_line":"        router_db \u003d self._get_router(context, id)"},{"line_number":412,"context_line":"        if router_db.extra_attributes.ha:"},{"line_number":413,"context_line":"            ha_network \u003d self.get_ha_network(context,"}],"source_content_type":"text/x-python","patch_set":75,"id":"fa98f980_6de019cd","line":410,"in_reply_to":"fa98f980_d602820a","updated":"2014-09-09 09:36:52.000000000","message":"The rollback should rely on sqlachemy transaction. but ML2 method can\u0027t be called during a transaction, since postcommit could call a distant backend or trigger rpc calls, and this could potentially result in a deadlock.\nSo I think this issue is in ML2, where we can\u0027t call create/update/delete_resources while we are in transaction.\nIf there were no issue in calling ML2 resource creation/deletion during a transaction, I think that in the situation of the _create_router_db, each call to the db should be done in the same transaction : \n-add_ha_network\n-set_vr_id\n-add_ha_port\n\nthis would prevent manual rollback by calling delete_port, delete_router\n\nrelated patch having the same issue : \n\nhttps://review.openstack.org/#/c/112178/\n\nhttps://review.openstack.org/#/c/117287/","commit_id":"3dc9417bb4da2c6a1fc685d106eb5cd660be18ef"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"change_message_id":"b186701e9be10c2bc93cd7968ab60521b07433b0","unresolved":false,"context_lines":[{"line_number":407,"context_line":""},{"line_number":408,"context_line":"                bindings[0].update({\u0027state\u0027: state})"},{"line_number":409,"context_line":""},{"line_number":410,"context_line":"    def delete_router(self, context, id):"},{"line_number":411,"context_line":"        router_db \u003d self._get_router(context, id)"},{"line_number":412,"context_line":"        if router_db.extra_attributes.ha:"},{"line_number":413,"context_line":"            ha_network \u003d self.get_ha_network(context,"}],"source_content_type":"text/x-python","patch_set":75,"id":"fa98f980_11eed422","line":410,"in_reply_to":"fa98f980_d602820a","updated":"2014-09-09 00:37:22.000000000","message":"To answer to a previous comment, yes we can delete it administratively.","commit_id":"3dc9417bb4da2c6a1fc685d106eb5cd660be18ef"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"27cee290b7bb40fa750227b4d0653112062331e3","unresolved":false,"context_lines":[{"line_number":144,"context_line":"                filter(L3HARouterNetwork.tenant_id \u003d\u003d tenant_id)."},{"line_number":145,"context_line":"                first())"},{"line_number":146,"context_line":""},{"line_number":147,"context_line":"    def _get_allocated_vr_id(self, context, network_id):"},{"line_number":148,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":149,"context_line":"            query \u003d (context.session.query(L3HARouterVRIdAllocation)."},{"line_number":150,"context_line":"                     filter(L3HARouterVRIdAllocation.network_id \u003d\u003d network_id))"}],"source_content_type":"text/x-python","patch_set":77,"id":"fa98f980_11205148","line":147,"updated":"2014-09-10 22:04:05.000000000","message":"Shouldn\u0027t this be _get_allocated_vr_ids?","commit_id":"5730d87c26c1e5022497a5921bf392f8f98b4011"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"27cee290b7bb40fa750227b4d0653112062331e3","unresolved":false,"context_lines":[{"line_number":145,"context_line":"                first())"},{"line_number":146,"context_line":""},{"line_number":147,"context_line":"    def _get_allocated_vr_id(self, context, network_id):"},{"line_number":148,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":149,"context_line":"            query \u003d (context.session.query(L3HARouterVRIdAllocation)."},{"line_number":150,"context_line":"                     filter(L3HARouterVRIdAllocation.network_id \u003d\u003d network_id))"},{"line_number":151,"context_line":""}],"source_content_type":"text/x-python","patch_set":77,"id":"fa98f980_144bdf2b","line":148,"updated":"2014-09-10 22:04:05.000000000","message":"Why is a transaction required here?","commit_id":"5730d87c26c1e5022497a5921bf392f8f98b4011"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"27cee290b7bb40fa750227b4d0653112062331e3","unresolved":false,"context_lines":[{"line_number":154,"context_line":"        return allocated_vr_ids"},{"line_number":155,"context_line":""},{"line_number":156,"context_line":"    def _allocate_vr_id(self, context, network_id, router_id):"},{"line_number":157,"context_line":"        for count in range(MAX_ALLOCATION_TRIES):"},{"line_number":158,"context_line":"            try:"},{"line_number":159,"context_line":"                with context.session.begin(subtransactions\u003dTrue):"},{"line_number":160,"context_line":"                    allocated_vr_ids \u003d self._get_allocated_vr_id(context,"}],"source_content_type":"text/x-python","patch_set":77,"id":"fa98f980_d47cf774","line":157,"updated":"2014-09-10 22:04:05.000000000","message":"(No action required) Ooof - we really do need a db retry decorator.","commit_id":"5730d87c26c1e5022497a5921bf392f8f98b4011"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"27cee290b7bb40fa750227b4d0653112062331e3","unresolved":false,"context_lines":[{"line_number":190,"context_line":""},{"line_number":191,"context_line":"    def _set_vr_id(self, context, router, ha_network):"},{"line_number":192,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":193,"context_line":"            router.extra_attributes.ha_vr_id \u003d self._allocate_vr_id("},{"line_number":194,"context_line":"                context, ha_network.network_id, router.id)"},{"line_number":195,"context_line":""},{"line_number":196,"context_line":"    def _create_ha_subnet(self, context, network_id, tenant_id):"}],"source_content_type":"text/x-python","patch_set":77,"id":"fa98f980_34c5433d","line":193,"updated":"2014-09-10 22:04:05.000000000","message":"(No action required) I really dislike having to use extra attributes for vr id.  It would seem to make more sense from a db perspective to associate the router with it\u0027s vr id directly in the allocation table with a cascade deletion relationship to ensure removal on router deletion.","commit_id":"5730d87c26c1e5022497a5921bf392f8f98b4011"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"27cee290b7bb40fa750227b4d0653112062331e3","unresolved":false,"context_lines":[{"line_number":225,"context_line":"                 \u0027admin_state_up\u0027: True,"},{"line_number":226,"context_line":"                 \u0027status\u0027: constants.NET_STATUS_ACTIVE}}"},{"line_number":227,"context_line":"        network \u003d self._core_plugin.create_network(context, args)"},{"line_number":228,"context_line":"        try:"},{"line_number":229,"context_line":"            ha_network \u003d self._create_ha_network_tenant_binding(admin_ctx,"},{"line_number":230,"context_line":"                                                                tenant_id,"},{"line_number":231,"context_line":"                                                                network[\u0027id\u0027])"}],"source_content_type":"text/x-python","patch_set":77,"id":"fa98f980_b463f33f","line":228,"updated":"2014-09-10 22:04:05.000000000","message":"DRY - it looks like one try/except block would suffice for both binding and subnet creation.","commit_id":"5730d87c26c1e5022497a5921bf392f8f98b4011"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"27cee290b7bb40fa750227b4d0653112062331e3","unresolved":false,"context_lines":[{"line_number":254,"context_line":"        max_agents \u003d cfg.CONF.max_l3_agents_per_router"},{"line_number":255,"context_line":"        if max_agents:"},{"line_number":256,"context_line":"            if max_agents \u003e num_agents:"},{"line_number":257,"context_line":"                LOG.info(_LI(\"Number of available agents lower than \""},{"line_number":258,"context_line":"                             \"max_l3_agents_per_router. L3 agents \""},{"line_number":259,"context_line":"                             \"available: %s\"), num_agents)"},{"line_number":260,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":77,"id":"fa98f980_b498531c","line":257,"updated":"2014-09-10 22:04:05.000000000","message":"(No action required) Why is it desirable for this to be logged?","commit_id":"5730d87c26c1e5022497a5921bf392f8f98b4011"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"27cee290b7bb40fa750227b4d0653112062331e3","unresolved":false,"context_lines":[{"line_number":275,"context_line":"        return portbinding"},{"line_number":276,"context_line":""},{"line_number":277,"context_line":"    def add_ha_port(self, context, router_id, network_id, tenant_id):"},{"line_number":278,"context_line":"        port \u003d self._core_plugin.create_port(context, {"},{"line_number":279,"context_line":"            \u0027port\u0027:"},{"line_number":280,"context_line":"            {\u0027tenant_id\u0027: \u0027\u0027,"},{"line_number":281,"context_line":"             \u0027network_id\u0027: network_id,"}],"source_content_type":"text/x-python","patch_set":77,"id":"fa98f980_94634f19","line":278,"updated":"2014-09-10 22:04:05.000000000","message":"(No action required) As much as I disliked the usage of autodeletion + contextmanager in the unit tests, I can see how it would be useful to apply that idiom to clean up related resources on failure in methods like this one.","commit_id":"5730d87c26c1e5022497a5921bf392f8f98b4011"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"27cee290b7bb40fa750227b4d0653112062331e3","unresolved":false,"context_lines":[{"line_number":339,"context_line":"            raise l3_ha.DistributedHARouterNotSupported()"},{"line_number":340,"context_line":""},{"line_number":341,"context_line":"        with context.session.begin(subtransactions\u003dTrue):"},{"line_number":342,"context_line":"            router_db \u003d super(L3_HA_NAT_db_mixin, self)._create_router_db("},{"line_number":343,"context_line":"                context, router, tenant_id)"},{"line_number":344,"context_line":""},{"line_number":345,"context_line":"        if router[\u0027ha\u0027]:"}],"source_content_type":"text/x-python","patch_set":77,"id":"fa98f980_b434d3fb","line":342,"updated":"2014-09-10 22:04:05.000000000","message":"(No action required) Ugh, router_db reads like \u0027the router db\u0027 to me, not \u0027router record\u0027.","commit_id":"5730d87c26c1e5022497a5921bf392f8f98b4011"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"27cee290b7bb40fa750227b4d0653112062331e3","unresolved":false,"context_lines":[{"line_number":347,"context_line":"                ha_network \u003d self.get_ha_network(context,"},{"line_number":348,"context_line":"                                                 router_db.tenant_id)"},{"line_number":349,"context_line":"                if not ha_network:"},{"line_number":350,"context_line":"                    ha_network \u003d self._create_ha_network(context,"},{"line_number":351,"context_line":"                                                         router_db.tenant_id)"},{"line_number":352,"context_line":""},{"line_number":353,"context_line":"                self._set_vr_id(context, router_db, ha_network)"}],"source_content_type":"text/x-python","patch_set":77,"id":"fa98f980_ef23e4a4","line":350,"updated":"2014-09-10 22:04:05.000000000","message":"(No action required) Super confusing how methods on this class clean up after themselves on failure.  Sometimes cleanup is in the method, other times it\u0027s the responsibility of the called method. Wishful thinking that we\u0027re going to see consistency before taskflow I guess.","commit_id":"5730d87c26c1e5022497a5921bf392f8f98b4011"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"27cee290b7bb40fa750227b4d0653112062331e3","unresolved":false,"context_lines":[{"line_number":401,"context_line":"                                                        host)"},{"line_number":402,"context_line":"            if bindings:"},{"line_number":403,"context_line":"                if len(bindings) \u003e 1:"},{"line_number":404,"context_line":"                    LOG.warn(_LW(\"The router %(router_id)s is bound multiple \""},{"line_number":405,"context_line":"                                 \"times on the agent %(host)s\"),"},{"line_number":406,"context_line":"                             {\u0027router_id\u0027: router_id, \u0027host\u0027: host})"},{"line_number":407,"context_line":""}],"source_content_type":"text/x-python","patch_set":77,"id":"fa98f980_6f5d3415","line":404,"updated":"2014-09-10 22:04:05.000000000","message":"(No action required) Under what circumstances would this condition occur?  I\u0027m not sure I understand why it wouldn\u0027t be considered an error.","commit_id":"5730d87c26c1e5022497a5921bf392f8f98b4011"}],"neutron/db/l3_hamode_rpc.py":[{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"b907b6ad553c1ea8c3a63b709a90d38b726bd4d5","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright (C) 2014 eNovance SAS \u003clicensing@enovance.com\u003e"},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"# Author: Sylvain Afchain \u003csylvain.afchain@enovance.com\u003e"},{"line_number":4,"context_line":"#"}],"source_content_type":"text/x-python","patch_set":41,"id":"baada198_37f40086","line":1,"updated":"2014-07-21 18:43:50.000000000","message":"please consider moving this under:\n\nhttps://github.com/openstack/neutron/tree/master/neutron/api/rpc/handlers\n\nWhere you\u0027d put the HA-related RPC interfaces.","commit_id":"52096cac3a5a7ee9d71c07e2bf6afb8f0954632c"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"change_message_id":"ae048e1cd22928d28f794fe9ae5f9f7e43f56d57","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright (C) 2014 eNovance SAS \u003clicensing@enovance.com\u003e"},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"# Author: Sylvain Afchain \u003csylvain.afchain@enovance.com\u003e"},{"line_number":4,"context_line":"#"}],"source_content_type":"text/x-python","patch_set":41,"id":"baada198_c23673e8","line":1,"in_reply_to":"baada198_37f40086","updated":"2014-07-22 12:16:50.000000000","message":"Moved, not sure to understand implemented in l3_hamode_db","commit_id":"52096cac3a5a7ee9d71c07e2bf6afb8f0954632c"}],"neutron/db/l3_rpc_base.py":[{"author":{"_account_id":4149,"name":"Itsuro Oda","email":"oda@valinux.co.jp","username":"oda-g"},"change_message_id":"136b96e8319655cf32c779e307657c75330c03e0","unresolved":false,"context_lines":[{"line_number":85,"context_line":"            for interface in router.get(constants.INTERFACE_KEY, []):"},{"line_number":86,"context_line":"                self._ensure_host_set_on_port(context, plugin, host,"},{"line_number":87,"context_line":"                                              interface, router[\u0027id\u0027])"},{"line_number":88,"context_line":"            for interface in router.get(constants.HA_INTERFACE_KEY, []):"},{"line_number":89,"context_line":"                self._ensure_host_set_on_port(context, plugin, host,"},{"line_number":90,"context_line":"                                              interface, router[\u0027id\u0027])"},{"line_number":91,"context_line":""}],"source_content_type":"text/x-python","patch_set":56,"id":"baada198_7660620d","line":88,"updated":"2014-08-10 23:17:43.000000000","message":"router[constants.HA_INTERFACE_KEY] is not list.\n\ninterface \u003d router.get(constants.HA_INTERFACE_KEY)\n\nif interface:\n\n(note that we are trying to run HA router and found this.)","commit_id":"de8dba1f623fa57e63e33274d1121410d2457d03"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"beb5c2d96362597a4ff862db12cccba47d7a8c2e","unresolved":false,"context_lines":[{"line_number":85,"context_line":"            for interface in router.get(constants.INTERFACE_KEY, []):"},{"line_number":86,"context_line":"                self._ensure_host_set_on_port(context, plugin, host,"},{"line_number":87,"context_line":"                                              interface, router[\u0027id\u0027])"},{"line_number":88,"context_line":"            for interface in router.get(constants.HA_INTERFACE_KEY, []):"},{"line_number":89,"context_line":"                self._ensure_host_set_on_port(context, plugin, host,"},{"line_number":90,"context_line":"                                              interface, router[\u0027id\u0027])"},{"line_number":91,"context_line":""}],"source_content_type":"text/x-python","patch_set":56,"id":"baada198_dfd12f30","line":88,"in_reply_to":"baada198_7660620d","updated":"2014-08-11 13:22:09.000000000","message":"Done","commit_id":"de8dba1f623fa57e63e33274d1121410d2457d03"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"172f9fc571cefca46773ff25e7168d99e5ade5ee","unresolved":false,"context_lines":[{"line_number":85,"context_line":"            for interface in router.get(constants.INTERFACE_KEY, []):"},{"line_number":86,"context_line":"                self._ensure_host_set_on_port(context, plugin, host,"},{"line_number":87,"context_line":"                                              interface, router[\u0027id\u0027])"},{"line_number":88,"context_line":"            for interface in router.get(constants.HA_INTERFACE_KEY, []):"},{"line_number":89,"context_line":"                self._ensure_host_set_on_port(context, plugin, host,"},{"line_number":90,"context_line":"                                              interface, router[\u0027id\u0027])"},{"line_number":91,"context_line":""}],"source_content_type":"text/x-python","patch_set":56,"id":"baada198_b633cf5f","line":88,"in_reply_to":"baada198_7660620d","updated":"2014-08-11 09:07:15.000000000","message":"Thank you Itsuro, I\u0027ll fix this today. I also want to see how unit tests are passing...","commit_id":"de8dba1f623fa57e63e33274d1121410d2457d03"}],"neutron/db/migration/alembic_migrations/versions/16a27a58e093_ext_l3_ha_mode.py":[{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"4c33dd343f00a82e7c31d0c9a11d7b5e8142a290","unresolved":false,"context_lines":[{"line_number":37,"context_line":"    \u0027neutron.plugins.nec.nec_plugin.NECPluginV2\u0027,"},{"line_number":38,"context_line":"    \u0027neutron.plugins.nicira.NeutronPlugin.NvpPluginV2\u0027,"},{"line_number":39,"context_line":"    \u0027neutron.plugins.openvswitch.ovs_neutron_plugin.OVSNeutronPluginV2\u0027,"},{"line_number":40,"context_line":"    \u0027neutron.plugins.ryu.ryu_neutron_plugin.RyuNeutronPluginV2\u0027"},{"line_number":41,"context_line":"]"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"from alembic import op"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAUH%2F9wyU%3D","line":40,"updated":"2014-02-04 08:29:34.000000000","message":"+ l3 service plugin?","commit_id":"8539b1aef24959c440ea35a835e7a27723adabf0"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"change_message_id":"a0a5b3542eed40d2c4e7c6bf87a08e073afd5477","unresolved":false,"context_lines":[{"line_number":37,"context_line":"    \u0027neutron.plugins.nec.nec_plugin.NECPluginV2\u0027,"},{"line_number":38,"context_line":"    \u0027neutron.plugins.nicira.NeutronPlugin.NvpPluginV2\u0027,"},{"line_number":39,"context_line":"    \u0027neutron.plugins.openvswitch.ovs_neutron_plugin.OVSNeutronPluginV2\u0027,"},{"line_number":40,"context_line":"    \u0027neutron.plugins.ryu.ryu_neutron_plugin.RyuNeutronPluginV2\u0027"},{"line_number":41,"context_line":"]"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"from alembic import op"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAUH%2F9wE4%3D","line":40,"in_reply_to":"AAAAUH%2F9wyU%3D","updated":"2014-02-04 11:36:44.000000000","message":"Oh, sure ! thx","commit_id":"8539b1aef24959c440ea35a835e7a27723adabf0"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"4c33dd343f00a82e7c31d0c9a11d7b5e8142a290","unresolved":false,"context_lines":[{"line_number":51,"context_line":"        return"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"    op.add_column(\u0027routers\u0027, sa.Column(\u0027ha_vr_id\u0027, sa.Integer())),"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"def downgrade(active_plugins\u003dNone, options\u003dNone):"},{"line_number":57,"context_line":"    if not migration.should_run(active_plugins, migration_for_plugins):"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAUH%2F9wyM%3D","line":54,"updated":"2014-02-04 08:29:34.000000000","message":"need to create new tables as well: L3HARouterAgentPortBinding and L3HANetwork","commit_id":"8539b1aef24959c440ea35a835e7a27723adabf0"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"change_message_id":"a0a5b3542eed40d2c4e7c6bf87a08e073afd5477","unresolved":false,"context_lines":[{"line_number":51,"context_line":"        return"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"    op.add_column(\u0027routers\u0027, sa.Column(\u0027ha_vr_id\u0027, sa.Integer())),"},{"line_number":54,"context_line":""},{"line_number":55,"context_line":""},{"line_number":56,"context_line":"def downgrade(active_plugins\u003dNone, options\u003dNone):"},{"line_number":57,"context_line":"    if not migration.should_run(active_plugins, migration_for_plugins):"}],"source_content_type":"text/x-python","patch_set":13,"id":"AAAAUH%2F9wEw%3D","line":54,"in_reply_to":"AAAAUH%2F9wyM%3D","updated":"2014-02-04 11:36:44.000000000","message":"Yes will fix that, thx","commit_id":"8539b1aef24959c440ea35a835e7a27723adabf0"},{"author":{"_account_id":6598,"name":"Berezovsky Irena","email":"irenab.dev@gmail.com","username":"irenab"},"change_message_id":"17aa924f53ca1089f84fa2c5d80be4d1e9d4369d","unresolved":false,"context_lines":[{"line_number":37,"context_line":"    \u0027neutron.plugins.nec.nec_plugin.NECPluginV2\u0027,"},{"line_number":38,"context_line":"    \u0027neutron.plugins.openvswitch.ovs_neutron_plugin.OVSNeutronPluginV2\u0027,"},{"line_number":39,"context_line":"    \u0027neutron.plugins.ryu.ryu_neutron_plugin.RyuNeutronPluginV2\u0027,"},{"line_number":40,"context_line":"    \u0027neutron.services.l3_router.l3_router_plugin.L3RouterPlugin\u0027"},{"line_number":41,"context_line":"]"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"from alembic import op"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAUH%2F9pus%3D","line":40,"updated":"2014-02-05 10:37:24.000000000","message":"missing mlnx_plugin in the list","commit_id":"982ef5b3325b872383849d4fa6acf3d18c88d8ce"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"change_message_id":"170dc4830aa810ff861d35a79db7ddd753ab9492","unresolved":false,"context_lines":[{"line_number":37,"context_line":"    \u0027neutron.plugins.nec.nec_plugin.NECPluginV2\u0027,"},{"line_number":38,"context_line":"    \u0027neutron.plugins.openvswitch.ovs_neutron_plugin.OVSNeutronPluginV2\u0027,"},{"line_number":39,"context_line":"    \u0027neutron.plugins.ryu.ryu_neutron_plugin.RyuNeutronPluginV2\u0027,"},{"line_number":40,"context_line":"    \u0027neutron.services.l3_router.l3_router_plugin.L3RouterPlugin\u0027"},{"line_number":41,"context_line":"]"},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"from alembic import op"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAUH%2F9pTc%3D","line":40,"in_reply_to":"AAAAUH%2F9pus%3D","updated":"2014-02-05 11:42:23.000000000","message":"Yes, thx, I\u0027ll add it.","commit_id":"982ef5b3325b872383849d4fa6acf3d18c88d8ce"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"90b0b7f9e5fb06c0dcaecb2f8dacfe9def950e91","unresolved":false,"context_lines":[{"line_number":18,"context_line":"\"\"\"ext_l3_ha_mode"},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"Revision ID: 16a27a58e093"},{"line_number":21,"context_line":"Revises: 49f5e553f61f"},{"line_number":22,"context_line":"Create Date: 2014-02-01 10:24:12.412733"},{"line_number":23,"context_line":""},{"line_number":24,"context_line":"\"\"\""}],"source_content_type":"text/x-python","patch_set":21,"id":"AAAAUX%2F%2B4Pk%3D","line":21,"updated":"2014-02-18 14:00:34.000000000","message":"please sync with #28","commit_id":"4cff24d403df8d593ad045e8fc4048e65bb8b5f8"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"f6ace64e3204d6290b3de69adc5fb20f4f387456","unresolved":false,"context_lines":[{"line_number":60,"context_line":"                              nullable\u003dFalse),"},{"line_number":61,"context_line":"                    sa.Column(\u0027l3_agent_id\u0027, sa.String(length\u003d36),"},{"line_number":62,"context_line":"                              nullable\u003dTrue),"},{"line_number":63,"context_line":"                    sa.Column(\u0027priority\u0027, sa.Integer, default\u003d50),"},{"line_number":64,"context_line":"                    sa.PrimaryKeyConstraint(\u0027port_id\u0027),"},{"line_number":65,"context_line":"                    sa.ForeignKeyConstraint([\u0027port_id\u0027], [\u0027ports.id\u0027],"},{"line_number":66,"context_line":"                                            ondelete\u003d\u0027CASCADE\u0027),"}],"source_content_type":"text/x-python","patch_set":35,"id":"AAAAXH%2F%2FFEg%3D","line":63,"updated":"2014-04-24 10:12:01.000000000","message":"use \u0027server_default\u0027 instead. In migrations \u0027default\u0027 parameter has no effect.","commit_id":"a3fbab16d1c099ee9ff8fc5b47a2629cf0a1a0df"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"f6ace64e3204d6290b3de69adc5fb20f4f387456","unresolved":false,"context_lines":[{"line_number":74,"context_line":"                    sa.Column(\u0027id\u0027, sa.String(length\u003d36), nullable\u003dFalse),"},{"line_number":75,"context_line":"                    sa.Column(\u0027network_id\u0027, sa.String(length\u003d36),"},{"line_number":76,"context_line":"                              nullable\u003dFalse,"},{"line_number":77,"context_line":"                              unique\u003dTrue),"},{"line_number":78,"context_line":"                    sa.ForeignKeyConstraint([\u0027network_id\u0027], [\u0027networks.id\u0027],"},{"line_number":79,"context_line":"                                            ondelete\u003d\u0027CASCADE\u0027))"},{"line_number":80,"context_line":""}],"source_content_type":"text/x-python","patch_set":35,"id":"AAAAXH%2F%2FFDU%3D","line":77,"updated":"2014-04-24 10:12:01.000000000","message":"need to explicitly specify unique constraint","commit_id":"a3fbab16d1c099ee9ff8fc5b47a2629cf0a1a0df"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"507fc602ea30185b68087fc28df0b6a33e002bf5","unresolved":false,"context_lines":[{"line_number":30,"context_line":"# Change to [\u0027*\u0027] if this migration applies to all plugins"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"migration_for_plugins \u003d ["},{"line_number":33,"context_line":"    \u0027neutron.plugins.hyperv.hyperv_neutron_plugin.HyperVNeutronPlugin\u0027,"},{"line_number":34,"context_line":"    \u0027neutron.plugins.linuxbridge.lb_neutron_plugin.LinuxBridgePluginV2\u0027,"},{"line_number":35,"context_line":"    \u0027neutron.plugins.metaplugin.meta_neutron_plugin.MetaPluginV2\u0027,"},{"line_number":36,"context_line":"    \u0027neutron.plugins.ml2.plugin.Ml2Plugin\u0027,"}],"source_content_type":"text/x-python","patch_set":36,"id":"1ae5cdf2_d04d893f","line":33,"updated":"2014-06-05 21:42:54.000000000","message":"should this be * as per latest migration conventions?","commit_id":"a8ef318e37de5977cc40d3d3e6ec3808d8d66200"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"65c728919e5c2b29be409d8df13c61054ad4ba49","unresolved":false,"context_lines":[{"line_number":30,"context_line":"# Change to [\u0027*\u0027] if this migration applies to all plugins"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"migration_for_plugins \u003d ["},{"line_number":33,"context_line":"    \u0027neutron.plugins.hyperv.hyperv_neutron_plugin.HyperVNeutronPlugin\u0027,"},{"line_number":34,"context_line":"    \u0027neutron.plugins.linuxbridge.lb_neutron_plugin.LinuxBridgePluginV2\u0027,"},{"line_number":35,"context_line":"    \u0027neutron.plugins.metaplugin.meta_neutron_plugin.MetaPluginV2\u0027,"},{"line_number":36,"context_line":"    \u0027neutron.plugins.ml2.plugin.Ml2Plugin\u0027,"}],"source_content_type":"text/x-python","patch_set":36,"id":"1ae5cdf2_78464a7c","line":33,"in_reply_to":"1ae5cdf2_2e0801d9","updated":"2014-06-06 11:22:09.000000000","message":"me too...but I am following what\u0027s been said on the reviews ;)","commit_id":"a8ef318e37de5977cc40d3d3e6ec3808d8d66200"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"change_message_id":"15b0966afa02b71e815e3636eb2dc8d86bfc6fcb","unresolved":false,"context_lines":[{"line_number":30,"context_line":"# Change to [\u0027*\u0027] if this migration applies to all plugins"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"migration_for_plugins \u003d ["},{"line_number":33,"context_line":"    \u0027neutron.plugins.hyperv.hyperv_neutron_plugin.HyperVNeutronPlugin\u0027,"},{"line_number":34,"context_line":"    \u0027neutron.plugins.linuxbridge.lb_neutron_plugin.LinuxBridgePluginV2\u0027,"},{"line_number":35,"context_line":"    \u0027neutron.plugins.metaplugin.meta_neutron_plugin.MetaPluginV2\u0027,"},{"line_number":36,"context_line":"    \u0027neutron.plugins.ml2.plugin.Ml2Plugin\u0027,"}],"source_content_type":"text/x-python","patch_set":36,"id":"1ae5cdf2_2e0801d9","line":33,"in_reply_to":"1ae5cdf2_d04d893f","updated":"2014-06-06 09:40:39.000000000","message":"do you have any link about conventions ? I\u0027m still lost with this","commit_id":"a8ef318e37de5977cc40d3d3e6ec3808d8d66200"},{"author":{"_account_id":7249,"name":"Ann Taraday","email":"akamyshnikova@mirantis.com","username":"AKamyshnikova"},"change_message_id":"9229f054125e3fa1008fa7d0a7c9ece561251b9e","unresolved":false,"context_lines":[{"line_number":45,"context_line":""},{"line_number":46,"context_line":"    op.add_column(\u0027routers\u0027, sa.Column(\u0027ha\u0027, sa.Boolean(),"},{"line_number":47,"context_line":"                                       nullable\u003dFalse,"},{"line_number":48,"context_line":"                                       server_default\u003dsa.text(\u0027false\u0027)))"},{"line_number":49,"context_line":"    op.add_column(\u0027routers\u0027, sa.Column(\u0027ha_vr_id\u0027, sa.Integer()))"},{"line_number":50,"context_line":""},{"line_number":51,"context_line":"    op.create_table(\u0027ha_router_agent_port_bindings\u0027,"}],"source_content_type":"text/x-python","patch_set":39,"id":"baada198_56fe8faf","line":48,"updated":"2014-07-16 09:54:22.000000000","message":"Please use sa.sql.false() instead of sa.text(\u0027false\u0027).","commit_id":"e04dff1c37390051469829495a2632b5ef4ddbb0"},{"author":{"_account_id":7249,"name":"Ann Taraday","email":"akamyshnikova@mirantis.com","username":"AKamyshnikova"},"change_message_id":"6ea0aac209ca1fbdcbf12947aa6556ecae34310e","unresolved":false,"context_lines":[{"line_number":79,"context_line":"        name\u003d\u0027uniq_ha_router_networks0network_id\u0027,"},{"line_number":80,"context_line":"        source\u003d\u0027ha_router_networks\u0027,"},{"line_number":81,"context_line":"        local_cols\u003d[\u0027network_id\u0027]"},{"line_number":82,"context_line":"    )"},{"line_number":83,"context_line":""},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"def downgrade(active_plugins\u003dNone, options\u003dNone):"}],"source_content_type":"text/x-python","patch_set":39,"id":"baada198_4e94338c","line":82,"updated":"2014-07-16 12:01:21.000000000","message":"Adding uniqueconstraint with name like this you\u0027ll have 2 uniqueconstraints on your table which is not correct.","commit_id":"e04dff1c37390051469829495a2632b5ef4ddbb0"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"b907b6ad553c1ea8c3a63b709a90d38b726bd4d5","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# vim: tabstop\u003d4 shiftwidth\u003d4 softtabstop\u003d4"},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"# Copyright 2014 OpenStack Foundation"},{"line_number":4,"context_line":"#"}],"source_content_type":"text/x-python","patch_set":41,"id":"baada198_1727fc12","line":1,"updated":"2014-07-21 18:43:50.000000000","message":"this is no longer necessary","commit_id":"52096cac3a5a7ee9d71c07e2bf6afb8f0954632c"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"b907b6ad553c1ea8c3a63b709a90d38b726bd4d5","unresolved":false,"context_lines":[{"line_number":73,"context_line":"                    sa.Column(\u0027id\u0027, sa.String(length\u003d36), nullable\u003dFalse),"},{"line_number":74,"context_line":"                    sa.Column(\u0027network_id\u0027, sa.String(length\u003d36),"},{"line_number":75,"context_line":"                              nullable\u003dFalse,"},{"line_number":76,"context_line":"                              unique\u003dTrue),"},{"line_number":77,"context_line":"                    sa.ForeignKeyConstraint([\u0027network_id\u0027], [\u0027networks.id\u0027],"},{"line_number":78,"context_line":"                                            ondelete\u003d\u0027CASCADE\u0027))"},{"line_number":79,"context_line":""}],"source_content_type":"text/x-python","patch_set":41,"id":"baada198_b7f2d06c","line":76,"updated":"2014-07-21 18:43:50.000000000","message":"you\u0027d want (network_id, tenant_id) to be primary key.","commit_id":"52096cac3a5a7ee9d71c07e2bf6afb8f0954632c"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"change_message_id":"ae048e1cd22928d28f794fe9ae5f9f7e43f56d57","unresolved":false,"context_lines":[{"line_number":73,"context_line":"                    sa.Column(\u0027id\u0027, sa.String(length\u003d36), nullable\u003dFalse),"},{"line_number":74,"context_line":"                    sa.Column(\u0027network_id\u0027, sa.String(length\u003d36),"},{"line_number":75,"context_line":"                              nullable\u003dFalse,"},{"line_number":76,"context_line":"                              unique\u003dTrue),"},{"line_number":77,"context_line":"                    sa.ForeignKeyConstraint([\u0027network_id\u0027], [\u0027networks.id\u0027],"},{"line_number":78,"context_line":"                                            ondelete\u003d\u0027CASCADE\u0027))"},{"line_number":79,"context_line":""}],"source_content_type":"text/x-python","patch_set":41,"id":"baada198_222e4f8d","line":76,"in_reply_to":"baada198_b7f2d06c","updated":"2014-07-22 12:16:50.000000000","message":"Done","commit_id":"52096cac3a5a7ee9d71c07e2bf6afb8f0954632c"},{"author":{"_account_id":7249,"name":"Ann Taraday","email":"akamyshnikova@mirantis.com","username":"AKamyshnikova"},"change_message_id":"fe9a9fbf2baf62a55d0d29b6b0e28a715e08c3d3","unresolved":false,"context_lines":[{"line_number":58,"context_line":"                    sa.Column(\u0027l3_agent_id\u0027, sa.String(length\u003d36),"},{"line_number":59,"context_line":"                              nullable\u003dTrue),"},{"line_number":60,"context_line":"                    sa.Column(\u0027state\u0027, sa.Enum(\u0027master\u0027, \u0027standby\u0027,"},{"line_number":61,"context_line":"                                               name\u003d\u0027l3_ha_states\u0027),"},{"line_number":62,"context_line":"                              server_default\u003d\u0027standby\u0027),"},{"line_number":63,"context_line":"                    sa.PrimaryKeyConstraint(\u0027port_id\u0027),"},{"line_number":64,"context_line":"                    sa.ForeignKeyConstraint([\u0027port_id\u0027], [\u0027ports.id\u0027],"}],"source_content_type":"text/x-python","patch_set":43,"id":"baada198_04830caa","line":61,"updated":"2014-07-22 14:37:33.000000000","message":"Enums should be dropped separately after dropping table as it can cause problem with Postgres. https://review.openstack.org/53112","commit_id":"643406b2a512e0be8450ececeadb0a8266f75902"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"change_message_id":"1754a8e2e5eb162eca4762eaf6db7e959f9a80f0","unresolved":false,"context_lines":[{"line_number":58,"context_line":"                    sa.Column(\u0027l3_agent_id\u0027, sa.String(length\u003d36),"},{"line_number":59,"context_line":"                              nullable\u003dTrue),"},{"line_number":60,"context_line":"                    sa.Column(\u0027state\u0027, sa.Enum(\u0027master\u0027, \u0027standby\u0027,"},{"line_number":61,"context_line":"                                               name\u003d\u0027l3_ha_states\u0027),"},{"line_number":62,"context_line":"                              server_default\u003d\u0027standby\u0027),"},{"line_number":63,"context_line":"                    sa.PrimaryKeyConstraint(\u0027port_id\u0027),"},{"line_number":64,"context_line":"                    sa.ForeignKeyConstraint([\u0027port_id\u0027], [\u0027ports.id\u0027],"}],"source_content_type":"text/x-python","patch_set":43,"id":"baada198_e5ea8f73","line":61,"in_reply_to":"baada198_04830caa","updated":"2014-07-22 15:32:30.000000000","message":"Thx for pointing me this","commit_id":"643406b2a512e0be8450ececeadb0a8266f75902"},{"author":{"_account_id":7249,"name":"Ann Taraday","email":"akamyshnikova@mirantis.com","username":"AKamyshnikova"},"change_message_id":"fe9a9fbf2baf62a55d0d29b6b0e28a715e08c3d3","unresolved":false,"context_lines":[{"line_number":70,"context_line":"    op.create_table(\u0027ha_router_networks\u0027,"},{"line_number":71,"context_line":"                    sa.Column(\u0027tenant_id\u0027, sa.String(length\u003d255),"},{"line_number":72,"context_line":"                              nullable\u003dTrue, primary_key\u003dTrue),"},{"line_number":73,"context_line":"                    sa.Column(\u0027id\u0027, sa.String(length\u003d36), nullable\u003dFalse),"},{"line_number":74,"context_line":"                    sa.Column(\u0027network_id\u0027, sa.String(length\u003d36),"},{"line_number":75,"context_line":"                              nullable\u003dFalse,"},{"line_number":76,"context_line":"                              primary_key\u003dTrue),"}],"source_content_type":"text/x-python","patch_set":43,"id":"baada198_d1c71197","line":73,"updated":"2014-07-22 14:37:33.000000000","message":"In model there is no id column. Check this out.","commit_id":"643406b2a512e0be8450ececeadb0a8266f75902"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"change_message_id":"1754a8e2e5eb162eca4762eaf6db7e959f9a80f0","unresolved":false,"context_lines":[{"line_number":70,"context_line":"    op.create_table(\u0027ha_router_networks\u0027,"},{"line_number":71,"context_line":"                    sa.Column(\u0027tenant_id\u0027, sa.String(length\u003d255),"},{"line_number":72,"context_line":"                              nullable\u003dTrue, primary_key\u003dTrue),"},{"line_number":73,"context_line":"                    sa.Column(\u0027id\u0027, sa.String(length\u003d36), nullable\u003dFalse),"},{"line_number":74,"context_line":"                    sa.Column(\u0027network_id\u0027, sa.String(length\u003d36),"},{"line_number":75,"context_line":"                              nullable\u003dFalse,"},{"line_number":76,"context_line":"                              primary_key\u003dTrue),"}],"source_content_type":"text/x-python","patch_set":43,"id":"baada198_25fc873f","line":73,"in_reply_to":"baada198_d1c71197","updated":"2014-07-22 15:32:30.000000000","message":"Done","commit_id":"643406b2a512e0be8450ececeadb0a8266f75902"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"4f51f2c9bf6639262afa217b4d26c4846ded79ba","unresolved":false,"context_lines":[{"line_number":70,"context_line":""},{"line_number":71,"context_line":"    op.create_table(\u0027ha_router_networks\u0027,"},{"line_number":72,"context_line":"                    sa.Column(\u0027tenant_id\u0027, sa.String(length\u003d255),"},{"line_number":73,"context_line":"                              nullable\u003dTrue, primary_key\u003dTrue),"},{"line_number":74,"context_line":"                    sa.Column(\u0027network_id\u0027, sa.String(length\u003d36),"},{"line_number":75,"context_line":"                              nullable\u003dFalse,"},{"line_number":76,"context_line":"                              primary_key\u003dTrue),"}],"source_content_type":"text/x-python","patch_set":48,"id":"baada198_50c9f0aa","line":73,"updated":"2014-07-23 21:29:04.000000000","message":"not sure if this is adopted way to express the primary key constraint, in the past I have seen using sa.PrimaryKeyConstraint() directly. I\u0027ll let the DB gurus chip in.","commit_id":"6c24b0553b3b022f405fe61f0a3cf2dfbb360b0d"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"change_message_id":"01961097e35e7e5f4fbc52ac68cd0f01bdb297e3","unresolved":false,"context_lines":[{"line_number":70,"context_line":""},{"line_number":71,"context_line":"    op.create_table(\u0027ha_router_networks\u0027,"},{"line_number":72,"context_line":"                    sa.Column(\u0027tenant_id\u0027, sa.String(length\u003d255),"},{"line_number":73,"context_line":"                              nullable\u003dTrue, primary_key\u003dTrue),"},{"line_number":74,"context_line":"                    sa.Column(\u0027network_id\u0027, sa.String(length\u003d36),"},{"line_number":75,"context_line":"                              nullable\u003dFalse,"},{"line_number":76,"context_line":"                              primary_key\u003dTrue),"}],"source_content_type":"text/x-python","patch_set":48,"id":"baada198_977530fc","line":73,"in_reply_to":"baada198_50c9f0aa","updated":"2014-07-24 08:41:48.000000000","message":"Checked the table status after the upgrade, the primary keys were there, at least with mysql","commit_id":"6c24b0553b3b022f405fe61f0a3cf2dfbb360b0d"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"60d32fb8d5f70e4a34b0b0bb739c704abdb1f599","unresolved":false,"context_lines":[{"line_number":31,"context_line":""},{"line_number":32,"context_line":"migration_for_plugins \u003d ["},{"line_number":33,"context_line":"    \u0027*\u0027,"},{"line_number":34,"context_line":"]"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"from alembic import op"},{"line_number":37,"context_line":"import sqlalchemy as sa"}],"source_content_type":"text/x-python","patch_set":59,"id":"1abeadc6_4126b3b8","line":34,"updated":"2014-08-19 04:01:11.000000000","message":"Remove lines 30-34.","commit_id":"949dca6b537be509526c05b57772d0632993d8ff"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"9adc89fe1f42f04c48b1b74795146121b835ca5e","unresolved":false,"context_lines":[{"line_number":31,"context_line":""},{"line_number":32,"context_line":"migration_for_plugins \u003d ["},{"line_number":33,"context_line":"    \u0027*\u0027,"},{"line_number":34,"context_line":"]"},{"line_number":35,"context_line":""},{"line_number":36,"context_line":"from alembic import op"},{"line_number":37,"context_line":"import sqlalchemy as sa"}],"source_content_type":"text/x-python","patch_set":59,"id":"1abeadc6_3495b332","line":34,"in_reply_to":"1abeadc6_4126b3b8","updated":"2014-08-24 17:56:31.000000000","message":"Done","commit_id":"949dca6b537be509526c05b57772d0632993d8ff"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"60d32fb8d5f70e4a34b0b0bb739c704abdb1f599","unresolved":false,"context_lines":[{"line_number":36,"context_line":"from alembic import op"},{"line_number":37,"context_line":"import sqlalchemy as sa"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"from neutron.db import migration"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"l3_ha_states \u003d sa.Enum(\u0027active\u0027, \u0027standby\u0027, name\u003d\u0027l3_ha_states\u0027)"},{"line_number":42,"context_line":""}],"source_content_type":"text/x-python","patch_set":59,"id":"1abeadc6_8137ebe2","line":39,"updated":"2014-08-19 04:01:11.000000000","message":"Remove.","commit_id":"949dca6b537be509526c05b57772d0632993d8ff"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"9adc89fe1f42f04c48b1b74795146121b835ca5e","unresolved":false,"context_lines":[{"line_number":36,"context_line":"from alembic import op"},{"line_number":37,"context_line":"import sqlalchemy as sa"},{"line_number":38,"context_line":""},{"line_number":39,"context_line":"from neutron.db import migration"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"l3_ha_states \u003d sa.Enum(\u0027active\u0027, \u0027standby\u0027, name\u003d\u0027l3_ha_states\u0027)"},{"line_number":42,"context_line":""}],"source_content_type":"text/x-python","patch_set":59,"id":"1abeadc6_1492774b","line":39,"in_reply_to":"1abeadc6_8137ebe2","updated":"2014-08-24 17:56:31.000000000","message":"Done","commit_id":"949dca6b537be509526c05b57772d0632993d8ff"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"60d32fb8d5f70e4a34b0b0bb739c704abdb1f599","unresolved":false,"context_lines":[{"line_number":43,"context_line":""},{"line_number":44,"context_line":"def upgrade(active_plugins\u003dNone, options\u003dNone):"},{"line_number":45,"context_line":"    if not migration.should_run(active_plugins, migration_for_plugins):"},{"line_number":46,"context_line":"        return"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"    op.add_column(\u0027router_extra_attributes\u0027,"},{"line_number":49,"context_line":"                  sa.Column(\u0027ha\u0027, sa.Boolean(),"}],"source_content_type":"text/x-python","patch_set":59,"id":"1abeadc6_a134e7de","line":46,"updated":"2014-08-19 04:01:11.000000000","message":"Remove the above two lines.","commit_id":"949dca6b537be509526c05b57772d0632993d8ff"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"9adc89fe1f42f04c48b1b74795146121b835ca5e","unresolved":false,"context_lines":[{"line_number":43,"context_line":""},{"line_number":44,"context_line":"def upgrade(active_plugins\u003dNone, options\u003dNone):"},{"line_number":45,"context_line":"    if not migration.should_run(active_plugins, migration_for_plugins):"},{"line_number":46,"context_line":"        return"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"    op.add_column(\u0027router_extra_attributes\u0027,"},{"line_number":49,"context_line":"                  sa.Column(\u0027ha\u0027, sa.Boolean(),"}],"source_content_type":"text/x-python","patch_set":59,"id":"1abeadc6_f46fbb5d","line":46,"in_reply_to":"1abeadc6_a134e7de","updated":"2014-08-24 17:56:31.000000000","message":"Done","commit_id":"949dca6b537be509526c05b57772d0632993d8ff"},{"author":{"_account_id":6524,"name":"Henry Gessau","email":"HenryG@gessau.net","username":"gessau"},"change_message_id":"60d32fb8d5f70e4a34b0b0bb739c704abdb1f599","unresolved":false,"context_lines":[{"line_number":80,"context_line":""},{"line_number":81,"context_line":"def downgrade(active_plugins\u003dNone, options\u003dNone):"},{"line_number":82,"context_line":"    if not migration.should_run(active_plugins, migration_for_plugins):"},{"line_number":83,"context_line":"        return"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"    op.drop_table(\u0027ha_router_networks\u0027)"},{"line_number":86,"context_line":"    op.drop_table(\u0027ha_router_agent_port_bindings\u0027)"}],"source_content_type":"text/x-python","patch_set":59,"id":"1abeadc6_e14dff73","line":83,"updated":"2014-08-19 04:01:11.000000000","message":"Remove the above two lines.","commit_id":"949dca6b537be509526c05b57772d0632993d8ff"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"9adc89fe1f42f04c48b1b74795146121b835ca5e","unresolved":false,"context_lines":[{"line_number":80,"context_line":""},{"line_number":81,"context_line":"def downgrade(active_plugins\u003dNone, options\u003dNone):"},{"line_number":82,"context_line":"    if not migration.should_run(active_plugins, migration_for_plugins):"},{"line_number":83,"context_line":"        return"},{"line_number":84,"context_line":""},{"line_number":85,"context_line":"    op.drop_table(\u0027ha_router_networks\u0027)"},{"line_number":86,"context_line":"    op.drop_table(\u0027ha_router_agent_port_bindings\u0027)"}],"source_content_type":"text/x-python","patch_set":59,"id":"1abeadc6_d4747f37","line":83,"in_reply_to":"1abeadc6_e14dff73","updated":"2014-08-24 17:56:31.000000000","message":"Done","commit_id":"949dca6b537be509526c05b57772d0632993d8ff"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"14ae4ad34cd195bc111dfccef95e1d37f2064714","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# vim: tabstop\u003d4 shiftwidth\u003d4 softtabstop\u003d4"},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"# Copyright 2014 OpenStack Foundation"},{"line_number":4,"context_line":"#"}],"source_content_type":"text/x-python","patch_set":70,"id":"1abeadc6_0d6637ed","line":1,"updated":"2014-08-28 20:32:06.000000000","message":"vim is no longer needed. Please remove it.","commit_id":"1fef6ff9362574429f15ab7da35a43c0aaa22721"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"224e675d43500778c521a401c53e4f286b4af2bf","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# vim: tabstop\u003d4 shiftwidth\u003d4 softtabstop\u003d4"},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"# Copyright 2014 OpenStack Foundation"},{"line_number":4,"context_line":"#"}],"source_content_type":"text/x-python","patch_set":70,"id":"1abeadc6_8e804af8","line":1,"in_reply_to":"1abeadc6_0d6637ed","updated":"2014-08-29 20:42:43.000000000","message":"Can I quote you on that?  My vim-loving colleagues will be most displeased!","commit_id":"1fef6ff9362574429f15ab7da35a43c0aaa22721"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"8cec662ede168cd5991e174084a79d98b901b669","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# vim: tabstop\u003d4 shiftwidth\u003d4 softtabstop\u003d4"},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"# Copyright 2014 OpenStack Foundation"},{"line_number":4,"context_line":"#"}],"source_content_type":"text/x-python","patch_set":70,"id":"fa98f980_7b8a6fc0","line":1,"in_reply_to":"1abeadc6_0d6637ed","updated":"2014-09-02 19:48:18.000000000","message":"Done","commit_id":"1fef6ff9362574429f15ab7da35a43c0aaa22721"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"8cec662ede168cd5991e174084a79d98b901b669","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# vim: tabstop\u003d4 shiftwidth\u003d4 softtabstop\u003d4"},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"# Copyright 2014 OpenStack Foundation"},{"line_number":4,"context_line":"#"}],"source_content_type":"text/x-python","patch_set":70,"id":"fa98f980_3ba1c747","line":1,"in_reply_to":"1abeadc6_8e804af8","updated":"2014-09-02 19:48:18.000000000","message":"Done","commit_id":"1fef6ff9362574429f15ab7da35a43c0aaa22721"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"224e675d43500778c521a401c53e4f286b4af2bf","unresolved":false,"context_lines":[{"line_number":56,"context_line":"                                            ondelete\u003d\u0027CASCADE\u0027),"},{"line_number":57,"context_line":"                    sa.ForeignKeyConstraint([\u0027router_id\u0027], [\u0027routers.id\u0027],"},{"line_number":58,"context_line":"                                            ondelete\u003d\u0027CASCADE\u0027),"},{"line_number":59,"context_line":"                    sa.ForeignKeyConstraint([\u0027l3_agent_id\u0027], [\u0027agents.id\u0027]))"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"    op.create_table(\u0027ha_router_networks\u0027,"},{"line_number":62,"context_line":"                    sa.Column(\u0027tenant_id\u0027, sa.String(length\u003d255),"}],"source_content_type":"text/x-python","patch_set":70,"id":"1abeadc6_4371f7a6","line":59,"updated":"2014-08-29 20:42:43.000000000","message":"According to the model definition this constraint should include ondelete\u003d\u0027CASCADE\u0027","commit_id":"1fef6ff9362574429f15ab7da35a43c0aaa22721"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"8cec662ede168cd5991e174084a79d98b901b669","unresolved":false,"context_lines":[{"line_number":56,"context_line":"                                            ondelete\u003d\u0027CASCADE\u0027),"},{"line_number":57,"context_line":"                    sa.ForeignKeyConstraint([\u0027router_id\u0027], [\u0027routers.id\u0027],"},{"line_number":58,"context_line":"                                            ondelete\u003d\u0027CASCADE\u0027),"},{"line_number":59,"context_line":"                    sa.ForeignKeyConstraint([\u0027l3_agent_id\u0027], [\u0027agents.id\u0027]))"},{"line_number":60,"context_line":""},{"line_number":61,"context_line":"    op.create_table(\u0027ha_router_networks\u0027,"},{"line_number":62,"context_line":"                    sa.Column(\u0027tenant_id\u0027, sa.String(length\u003d255),"}],"source_content_type":"text/x-python","patch_set":70,"id":"fa98f980_1bf32374","line":59,"in_reply_to":"1abeadc6_4371f7a6","updated":"2014-09-02 19:48:18.000000000","message":"Done","commit_id":"1fef6ff9362574429f15ab7da35a43c0aaa22721"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"2c8f606a0049a26aac018c191c4928cb883c0704","unresolved":false,"context_lines":[{"line_number":80,"context_line":"def downgrade(active_plugins\u003dNone, options\u003dNone):"},{"line_number":81,"context_line":"    op.drop_table(\u0027ha_router_networks\u0027)"},{"line_number":82,"context_line":"    op.drop_table(\u0027ha_router_agent_port_bindings\u0027)"},{"line_number":83,"context_line":"    op.drop_table(\u0027ha_router_vrid_allocations\u0027)"},{"line_number":84,"context_line":"    l3_ha_states.drop(op.get_bind(), checkfirst\u003dFalse)"},{"line_number":85,"context_line":"    op.drop_column(\u0027router_extra_attributes\u0027, \u0027ha\u0027)"},{"line_number":86,"context_line":"    op.drop_column(\u0027router_extra_attributes\u0027, \u0027ha_vr_id\u0027)"}],"source_content_type":"text/x-python","patch_set":74,"id":"fa98f980_36b8472a","line":83,"updated":"2014-09-08 11:54:01.000000000","message":"This should be done first, so that in reverse order of upgrade.","commit_id":"df1604d8e5a09f891187b0bbc6966fd1622294ed"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"change_message_id":"74b3abce1e16f9660a0c3376bd74433925d1b9ec","unresolved":false,"context_lines":[{"line_number":80,"context_line":"def downgrade(active_plugins\u003dNone, options\u003dNone):"},{"line_number":81,"context_line":"    op.drop_table(\u0027ha_router_networks\u0027)"},{"line_number":82,"context_line":"    op.drop_table(\u0027ha_router_agent_port_bindings\u0027)"},{"line_number":83,"context_line":"    op.drop_table(\u0027ha_router_vrid_allocations\u0027)"},{"line_number":84,"context_line":"    l3_ha_states.drop(op.get_bind(), checkfirst\u003dFalse)"},{"line_number":85,"context_line":"    op.drop_column(\u0027router_extra_attributes\u0027, \u0027ha\u0027)"},{"line_number":86,"context_line":"    op.drop_column(\u0027router_extra_attributes\u0027, \u0027ha_vr_id\u0027)"}],"source_content_type":"text/x-python","patch_set":74,"id":"fa98f980_620e7436","line":83,"in_reply_to":"fa98f980_36b8472a","updated":"2014-09-08 21:07:25.000000000","message":"Done","commit_id":"df1604d8e5a09f891187b0bbc6966fd1622294ed"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"2c8f606a0049a26aac018c191c4928cb883c0704","unresolved":false,"context_lines":[{"line_number":82,"context_line":"    op.drop_table(\u0027ha_router_agent_port_bindings\u0027)"},{"line_number":83,"context_line":"    op.drop_table(\u0027ha_router_vrid_allocations\u0027)"},{"line_number":84,"context_line":"    l3_ha_states.drop(op.get_bind(), checkfirst\u003dFalse)"},{"line_number":85,"context_line":"    op.drop_column(\u0027router_extra_attributes\u0027, \u0027ha\u0027)"},{"line_number":86,"context_line":"    op.drop_column(\u0027router_extra_attributes\u0027, \u0027ha_vr_id\u0027)"}],"source_content_type":"text/x-python","patch_set":74,"id":"fa98f980_f6addfeb","line":85,"updated":"2014-09-08 11:54:01.000000000","message":"swap these next two lines to keep the same reverse ordering.","commit_id":"df1604d8e5a09f891187b0bbc6966fd1622294ed"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"change_message_id":"74b3abce1e16f9660a0c3376bd74433925d1b9ec","unresolved":false,"context_lines":[{"line_number":82,"context_line":"    op.drop_table(\u0027ha_router_agent_port_bindings\u0027)"},{"line_number":83,"context_line":"    op.drop_table(\u0027ha_router_vrid_allocations\u0027)"},{"line_number":84,"context_line":"    l3_ha_states.drop(op.get_bind(), checkfirst\u003dFalse)"},{"line_number":85,"context_line":"    op.drop_column(\u0027router_extra_attributes\u0027, \u0027ha\u0027)"},{"line_number":86,"context_line":"    op.drop_column(\u0027router_extra_attributes\u0027, \u0027ha_vr_id\u0027)"}],"source_content_type":"text/x-python","patch_set":74,"id":"fa98f980_82127856","line":85,"in_reply_to":"fa98f980_f6addfeb","updated":"2014-09-08 21:07:25.000000000","message":"Done","commit_id":"df1604d8e5a09f891187b0bbc6966fd1622294ed"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"27cee290b7bb40fa750227b4d0653112062331e3","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright 2014 OpenStack Foundation"},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"#    Licensed under the Apache License, Version 2.0 (the \"License\"); you may"},{"line_number":4,"context_line":"#    not use this file except in compliance with the License. You may obtain"}],"source_content_type":"text/x-python","patch_set":77,"id":"fa98f980_4fe79040","line":1,"updated":"2014-09-10 22:04:05.000000000","message":"(No action required) Having to manually ensure that a migration matches db changes is terrible.  I found a missing cascade relationship many revisions ago quite by accident, but I think we should be considering some kind of automated check via hacking of new migrations.","commit_id":"5730d87c26c1e5022497a5921bf392f8f98b4011"}],"neutron/extensions/l3.py":[{"author":{"_account_id":162,"name":"Bob Melander","email":"bob.melander@gmail.com","username":"bob-melander"},"change_message_id":"f838f3e2ba4f6be7e6c3dda0fc7d680aac1b728c","unresolved":false,"context_lines":[{"line_number":85,"context_line":""},{"line_number":86,"context_line":"ROUTERS \u003d \u0027routers\u0027"},{"line_number":87,"context_line":"EXTERNAL_GW_INFO \u003d \u0027external_gateway_info\u0027"},{"line_number":88,"context_line":"HA_INFO \u003d \u0027ha_info\u0027"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"RESOURCE_ATTRIBUTE_MAP \u003d {"},{"line_number":91,"context_line":"    ROUTERS: {"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAT3%2F%2Fxqg%3D","line":88,"updated":"2014-01-01 12:26:22.000000000","message":"This ought to be placed in an extension of its own rather added to l3.","commit_id":"2dceff6e8c9ef7566471c5fc02efb6e9f3e29b8b"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"change_message_id":"3fadecbef45b9be243b9ca32c1cd46d321aedd19","unresolved":false,"context_lines":[{"line_number":85,"context_line":""},{"line_number":86,"context_line":"ROUTERS \u003d \u0027routers\u0027"},{"line_number":87,"context_line":"EXTERNAL_GW_INFO \u003d \u0027external_gateway_info\u0027"},{"line_number":88,"context_line":"HA_INFO \u003d \u0027ha_info\u0027"},{"line_number":89,"context_line":""},{"line_number":90,"context_line":"RESOURCE_ATTRIBUTE_MAP \u003d {"},{"line_number":91,"context_line":"    ROUTERS: {"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUH%2F%2FsY8%3D","line":88,"in_reply_to":"AAAAT3%2F%2Fxqg%3D","updated":"2014-01-09 14:57:13.000000000","message":"Done","commit_id":"2dceff6e8c9ef7566471c5fc02efb6e9f3e29b8b"},{"author":{"_account_id":162,"name":"Bob Melander","email":"bob.melander@gmail.com","username":"bob-melander"},"change_message_id":"f838f3e2ba4f6be7e6c3dda0fc7d680aac1b728c","unresolved":false,"context_lines":[{"line_number":111,"context_line":"                           \u0027enforce_policy\u0027: True},"},{"line_number":112,"context_line":"        HA_INFO: {\u0027allow_post\u0027: False, \u0027allow_put\u0027: False,"},{"line_number":113,"context_line":"                  \u0027is_visible\u0027: True, \u0027default\u0027: None,"},{"line_number":114,"context_line":"                  \u0027enforce_policy\u0027: True},"},{"line_number":115,"context_line":"    },"},{"line_number":116,"context_line":"    \u0027floatingips\u0027: {"},{"line_number":117,"context_line":"        \u0027id\u0027: {\u0027allow_post\u0027: False, \u0027allow_put\u0027: False,"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAT3%2F%2Fxqc%3D","line":114,"updated":"2014-01-01 12:26:22.000000000","message":"This ought to be placed in an extension of its own rather added to l3.","commit_id":"2dceff6e8c9ef7566471c5fc02efb6e9f3e29b8b"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"change_message_id":"3fadecbef45b9be243b9ca32c1cd46d321aedd19","unresolved":false,"context_lines":[{"line_number":111,"context_line":"                           \u0027enforce_policy\u0027: True},"},{"line_number":112,"context_line":"        HA_INFO: {\u0027allow_post\u0027: False, \u0027allow_put\u0027: False,"},{"line_number":113,"context_line":"                  \u0027is_visible\u0027: True, \u0027default\u0027: None,"},{"line_number":114,"context_line":"                  \u0027enforce_policy\u0027: True},"},{"line_number":115,"context_line":"    },"},{"line_number":116,"context_line":"    \u0027floatingips\u0027: {"},{"line_number":117,"context_line":"        \u0027id\u0027: {\u0027allow_post\u0027: False, \u0027allow_put\u0027: False,"}],"source_content_type":"text/x-python","patch_set":2,"id":"AAAAUH%2F%2FsY4%3D","line":114,"in_reply_to":"AAAAT3%2F%2Fxqc%3D","updated":"2014-01-09 14:57:13.000000000","message":"Done","commit_id":"2dceff6e8c9ef7566471c5fc02efb6e9f3e29b8b"}],"neutron/extensions/l3_ext_ha_mode.py":[{"author":{"_account_id":2874,"name":"yong sheng gong","email":"gong.yongsheng@99cloud.net","username":"gongysh"},"change_message_id":"a4d74e15b9ec069892f704340b23e0a12e5c0bff","unresolved":false,"context_lines":[{"line_number":1,"context_line":"# Copyright (C) 2014 eNovance SAS \u003clicensing@enovance.com\u003e"},{"line_number":2,"context_line":"#"},{"line_number":3,"context_line":"# Author: Sylvain Afchain \u003csylvain.afchain@enovance.com\u003e"},{"line_number":4,"context_line":"#"}],"source_content_type":"text/x-python","patch_set":34,"id":"AAAAWn%2F%2F9Mg%3D","line":1,"updated":"2014-04-08 09:07:19.000000000","message":"why name it as l3_ext_ha_mode? do we have many ha mode? I think it is enough to name it as l3_ext_ha.py.","commit_id":"85df18755deab7e3dd4fd6a6d955757f10fe4017"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"f6ace64e3204d6290b3de69adc5fb20f4f387456","unresolved":false,"context_lines":[{"line_number":21,"context_line":"EXTENDED_ATTRIBUTES_2_0 \u003d {"},{"line_number":22,"context_line":"    \u0027routers\u0027: {HA_INFO:"},{"line_number":23,"context_line":"                {\u0027allow_post\u0027: False, \u0027allow_put\u0027: False,"},{"line_number":24,"context_line":"                 \u0027default\u0027: None, \u0027is_visible\u0027: True}}}"},{"line_number":25,"context_line":""},{"line_number":26,"context_line":""},{"line_number":27,"context_line":"class L3_ext_ha_mode(extensions.ExtensionDescriptor):"}],"source_content_type":"text/x-python","patch_set":35,"id":"AAAAXH%2F%2FDvc%3D","line":24,"updated":"2014-04-24 10:12:01.000000000","message":"nit: prefer cascading closing brackets","commit_id":"a3fbab16d1c099ee9ff8fc5b47a2629cf0a1a0df"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"f6ace64e3204d6290b3de69adc5fb20f4f387456","unresolved":false,"context_lines":[{"line_number":45,"context_line":""},{"line_number":46,"context_line":"    @classmethod"},{"line_number":47,"context_line":"    def get_updated(cls):"},{"line_number":48,"context_line":"        return \"2013-01-29T00:00:00-00:00\""},{"line_number":49,"context_line":""},{"line_number":50,"context_line":"    def get_extended_resources(self, version):"},{"line_number":51,"context_line":"        if version \u003d\u003d \"2.0\":"}],"source_content_type":"text/x-python","patch_set":35,"id":"AAAAXH%2F%2FDvI%3D","line":48,"updated":"2014-04-24 10:12:01.000000000","message":"2013?","commit_id":"a3fbab16d1c099ee9ff8fc5b47a2629cf0a1a0df"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"507fc602ea30185b68087fc28df0b6a33e002bf5","unresolved":false,"context_lines":[{"line_number":18,"context_line":"from neutron.common import constants"},{"line_number":19,"context_line":"from neutron.common import exceptions"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"HA_INFO \u003d \u0027ha_vr_id\u0027"},{"line_number":22,"context_line":"EXTENDED_ATTRIBUTES_2_0 \u003d {"},{"line_number":23,"context_line":"    \u0027routers\u0027: {HA_INFO:"},{"line_number":24,"context_line":"                {\u0027allow_post\u0027: False, \u0027allow_put\u0027: False,"}],"source_content_type":"text/x-python","patch_set":36,"id":"1ae5cdf2_900ea1e3","line":21,"updated":"2014-06-05 21:42:54.000000000","message":"Not sure if what was agreed in terms of exposing tenants or admins the ability to create \u0027HA\u0027 routers, but I am not entirely sure what this extension attribute is for. Could you elaborate?","commit_id":"a8ef318e37de5977cc40d3d3e6ec3808d8d66200"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"change_message_id":"15b0966afa02b71e815e3636eb2dc8d86bfc6fcb","unresolved":false,"context_lines":[{"line_number":18,"context_line":"from neutron.common import constants"},{"line_number":19,"context_line":"from neutron.common import exceptions"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"HA_INFO \u003d \u0027ha_vr_id\u0027"},{"line_number":22,"context_line":"EXTENDED_ATTRIBUTES_2_0 \u003d {"},{"line_number":23,"context_line":"    \u0027routers\u0027: {HA_INFO:"},{"line_number":24,"context_line":"                {\u0027allow_post\u0027: False, \u0027allow_put\u0027: False,"}],"source_content_type":"text/x-python","patch_set":36,"id":"1ae5cdf2_ae22514f","line":21,"in_reply_to":"1ae5cdf2_900ea1e3","updated":"2014-06-06 09:40:39.000000000","message":"Nothing to tenant or admin, the router are HA or not by configuration setting","commit_id":"a8ef318e37de5977cc40d3d3e6ec3808d8d66200"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"36af3f9a8a8ca690eda5a18b0f344aad7c6ac546","unresolved":false,"context_lines":[{"line_number":46,"context_line":""},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"class HAMinimumAgentsNumberNotValid(exceptions.NeutronException):"},{"line_number":49,"context_line":"    message \u003d _(\"min_l3_agents_per_router config parameter is not valid, \""},{"line_number":50,"context_line":"                \"it has to be at least more thant 2 for HA.\")"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":""}],"source_content_type":"text/x-python","patch_set":39,"id":"baada198_2d9a706e","line":49,"updated":"2014-07-10 14:25:49.000000000","message":"Drop the \u0027least\u0027, change \u0027thant\u0027 to \u0027than\u0027.","commit_id":"e04dff1c37390051469829495a2632b5ef4ddbb0"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"36af3f9a8a8ca690eda5a18b0f344aad7c6ac546","unresolved":false,"context_lines":[{"line_number":62,"context_line":"        return constants.L3_HA_MODE_EXT_ALIAS"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"    @classmethod"},{"line_number":65,"context_line":"    def get_description(cls):"},{"line_number":66,"context_line":"        return \"Add HA capability to the router.\""},{"line_number":67,"context_line":""},{"line_number":68,"context_line":"    @classmethod"}],"source_content_type":"text/x-python","patch_set":39,"id":"baada198_ad9cc05e","line":65,"updated":"2014-07-10 14:25:49.000000000","message":"Drop \u0027the\u0027, change router to plural.","commit_id":"e04dff1c37390051469829495a2632b5ef4ddbb0"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"05ad4c877b34bc8b35e1e4b5dfcb0a9ce4fdc8a0","unresolved":false,"context_lines":[{"line_number":30,"context_line":"}"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"class NoVRIDAvailable(exceptions.NeutronException):"},{"line_number":34,"context_line":"    message \u003d _(\"No more Virtual Router Identifier (VRID) available when \""},{"line_number":35,"context_line":"                \"creating the router %(router_id)s, the limit of number \""},{"line_number":36,"context_line":"                \"of HA Routers per tenant is 254.\")"}],"source_content_type":"text/x-python","patch_set":53,"id":"baada198_db420366","line":33,"updated":"2014-08-04 17:12:32.000000000","message":"I think this is the same type of exception as OverQuota or IpAddressGenerationFailure. They inherits Conflict and it means 409 error status is returned to API caller. It seems better to inherit Conflict. This error can occur triggered by user requests.","commit_id":"2e3b143ef718a007b741eb44f306e0e1652093ce"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"change_message_id":"83687ab3c48379d02cba6c59b41f4355fcb21676","unresolved":false,"context_lines":[{"line_number":30,"context_line":"}"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":""},{"line_number":33,"context_line":"class NoVRIDAvailable(exceptions.NeutronException):"},{"line_number":34,"context_line":"    message \u003d _(\"No more Virtual Router Identifier (VRID) available when \""},{"line_number":35,"context_line":"                \"creating the router %(router_id)s, the limit of number \""},{"line_number":36,"context_line":"                \"of HA Routers per tenant is 254.\")"}],"source_content_type":"text/x-python","patch_set":53,"id":"baada198_679dceba","line":33,"in_reply_to":"baada198_db420366","updated":"2014-08-05 00:08:23.000000000","message":"Done","commit_id":"2e3b143ef718a007b741eb44f306e0e1652093ce"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"3e4ba96d63399f61f4c15b2f6bba072fa392b6a8","unresolved":false,"context_lines":[{"line_number":32,"context_line":"class NoVRIDAvailable(exceptions.Conflict):"},{"line_number":33,"context_line":"    message \u003d _(\"No more Virtual Router Identifier (VRID) available when \""},{"line_number":34,"context_line":"                \"creating router %(router_id)s, the limit of number \""},{"line_number":35,"context_line":"                \"of HA Routers per tenant is 254.\")"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"class HANetworkCIDRNotValid(exceptions.NeutronException):"}],"source_content_type":"text/x-python","patch_set":73,"id":"fa98f980_73a8968d","line":35,"updated":"2014-09-03 19:51:27.000000000","message":"Use a period instead of a comma.\n\n  %(router_id)s. The limit number of ....","commit_id":"df909b9c08b22248295400dee3c9d17c5c0a2763"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"change_message_id":"a0c32b2aee4e2790e9e9b45da51dcc0379652d80","unresolved":false,"context_lines":[{"line_number":32,"context_line":"class NoVRIDAvailable(exceptions.Conflict):"},{"line_number":33,"context_line":"    message \u003d _(\"No more Virtual Router Identifier (VRID) available when \""},{"line_number":34,"context_line":"                \"creating router %(router_id)s, the limit of number \""},{"line_number":35,"context_line":"                \"of HA Routers per tenant is 254.\")"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"class HANetworkCIDRNotValid(exceptions.NeutronException):"}],"source_content_type":"text/x-python","patch_set":73,"id":"fa98f980_4f23b455","line":35,"in_reply_to":"fa98f980_73a8968d","updated":"2014-09-05 01:07:16.000000000","message":"Done","commit_id":"df909b9c08b22248295400dee3c9d17c5c0a2763"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"3e4ba96d63399f61f4c15b2f6bba072fa392b6a8","unresolved":false,"context_lines":[{"line_number":37,"context_line":""},{"line_number":38,"context_line":"class HANetworkCIDRNotValid(exceptions.NeutronException):"},{"line_number":39,"context_line":"    message \u003d _(\"The HA Network cidr specified in the configuration file \""},{"line_number":40,"context_line":"                \"isn\u0027t valid; %(cidr)s\")"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"class HANotEnoughAvailableAgents(exceptions.NeutronException):"}],"source_content_type":"text/x-python","patch_set":73,"id":"fa98f980_339a8e6e","line":40,"updated":"2014-09-03 19:51:27.000000000","message":"\"cidr\" is usually spelled as \"CIDR\" as it is abbrev.","commit_id":"df909b9c08b22248295400dee3c9d17c5c0a2763"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"change_message_id":"a0c32b2aee4e2790e9e9b45da51dcc0379652d80","unresolved":false,"context_lines":[{"line_number":37,"context_line":""},{"line_number":38,"context_line":"class HANetworkCIDRNotValid(exceptions.NeutronException):"},{"line_number":39,"context_line":"    message \u003d _(\"The HA Network cidr specified in the configuration file \""},{"line_number":40,"context_line":"                \"isn\u0027t valid; %(cidr)s\")"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"class HANotEnoughAvailableAgents(exceptions.NeutronException):"}],"source_content_type":"text/x-python","patch_set":73,"id":"fa98f980_6f1eb80d","line":40,"in_reply_to":"fa98f980_339a8e6e","updated":"2014-09-05 01:07:16.000000000","message":"Done","commit_id":"df909b9c08b22248295400dee3c9d17c5c0a2763"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"3e4ba96d63399f61f4c15b2f6bba072fa392b6a8","unresolved":false,"context_lines":[{"line_number":47,"context_line":""},{"line_number":48,"context_line":"class HAMinimumAgentsNumberNotValid(exceptions.NeutronException):"},{"line_number":49,"context_line":"    message \u003d (_(\"min_l3_agents_per_router config parameter is not valid, \""},{"line_number":50,"context_line":"                 \"it has to be equal or more than %s for HA.\") %"},{"line_number":51,"context_line":"               constants.MINIMUM_AGENTS_FOR_HA)"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":""}],"source_content_type":"text/x-python","patch_set":73,"id":"fa98f980_b3859e08","line":50,"updated":"2014-09-03 19:51:27.000000000","message":"I prefer to a period over a comma.\n\nequal or more than -\u003e equal to or more than","commit_id":"df909b9c08b22248295400dee3c9d17c5c0a2763"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"change_message_id":"a0c32b2aee4e2790e9e9b45da51dcc0379652d80","unresolved":false,"context_lines":[{"line_number":47,"context_line":""},{"line_number":48,"context_line":"class HAMinimumAgentsNumberNotValid(exceptions.NeutronException):"},{"line_number":49,"context_line":"    message \u003d (_(\"min_l3_agents_per_router config parameter is not valid, \""},{"line_number":50,"context_line":"                 \"it has to be equal or more than %s for HA.\") %"},{"line_number":51,"context_line":"               constants.MINIMUM_AGENTS_FOR_HA)"},{"line_number":52,"context_line":""},{"line_number":53,"context_line":""}],"source_content_type":"text/x-python","patch_set":73,"id":"fa98f980_af1420e9","line":50,"in_reply_to":"fa98f980_b3859e08","updated":"2014-09-05 01:07:16.000000000","message":"Done","commit_id":"df909b9c08b22248295400dee3c9d17c5c0a2763"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"2c8f606a0049a26aac018c191c4928cb883c0704","unresolved":false,"context_lines":[{"line_number":36,"context_line":""},{"line_number":37,"context_line":"class MaxVRIDAllocationTriesReached(exceptions.NeutronException):"},{"line_number":38,"context_line":"    message \u003d _(\"Failed to allocate a VRID in the network %(network_id)s \""},{"line_number":39,"context_line":"                \"for the router %(router_id)s after %(max_tries)s tries\")"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"class NoVRIDAvailable(exceptions.Conflict):"}],"source_content_type":"text/x-python","patch_set":74,"id":"fa98f980_16d98383","line":39,"updated":"2014-09-08 11:54:01.000000000","message":"nit: period at end of message.","commit_id":"df1604d8e5a09f891187b0bbc6966fd1622294ed"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"change_message_id":"74b3abce1e16f9660a0c3376bd74433925d1b9ec","unresolved":false,"context_lines":[{"line_number":36,"context_line":""},{"line_number":37,"context_line":"class MaxVRIDAllocationTriesReached(exceptions.NeutronException):"},{"line_number":38,"context_line":"    message \u003d _(\"Failed to allocate a VRID in the network %(network_id)s \""},{"line_number":39,"context_line":"                \"for the router %(router_id)s after %(max_tries)s tries\")"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"class NoVRIDAvailable(exceptions.Conflict):"}],"source_content_type":"text/x-python","patch_set":74,"id":"fa98f980_a2369ce5","line":39,"in_reply_to":"fa98f980_16d98383","updated":"2014-09-08 21:07:25.000000000","message":"Done","commit_id":"df1604d8e5a09f891187b0bbc6966fd1622294ed"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"2c8f606a0049a26aac018c191c4928cb883c0704","unresolved":false,"context_lines":[{"line_number":47,"context_line":""},{"line_number":48,"context_line":"class HANetworkCIDRNotValid(exceptions.NeutronException):"},{"line_number":49,"context_line":"    message \u003d _(\"The HA Network CIDR specified in the configuration file \""},{"line_number":50,"context_line":"                \"isn\u0027t valid; %(cidr)s\")"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"class HANotEnoughAvailableAgents(exceptions.NeutronException):"}],"source_content_type":"text/x-python","patch_set":74,"id":"fa98f980_36e68745","line":50,"updated":"2014-09-08 11:54:01.000000000","message":"ditto","commit_id":"df1604d8e5a09f891187b0bbc6966fd1622294ed"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"change_message_id":"74b3abce1e16f9660a0c3376bd74433925d1b9ec","unresolved":false,"context_lines":[{"line_number":47,"context_line":""},{"line_number":48,"context_line":"class HANetworkCIDRNotValid(exceptions.NeutronException):"},{"line_number":49,"context_line":"    message \u003d _(\"The HA Network CIDR specified in the configuration file \""},{"line_number":50,"context_line":"                \"isn\u0027t valid; %(cidr)s\")"},{"line_number":51,"context_line":""},{"line_number":52,"context_line":""},{"line_number":53,"context_line":"class HANotEnoughAvailableAgents(exceptions.NeutronException):"}],"source_content_type":"text/x-python","patch_set":74,"id":"fa98f980_c233a0f4","line":50,"in_reply_to":"fa98f980_36e68745","updated":"2014-09-08 21:07:25.000000000","message":"Done","commit_id":"df1604d8e5a09f891187b0bbc6966fd1622294ed"},{"author":{"_account_id":6659,"name":"Paul Michali","email":"pc@michali.net","username":"pcm"},"change_message_id":"2c8f606a0049a26aac018c191c4928cb883c0704","unresolved":false,"context_lines":[{"line_number":52,"context_line":""},{"line_number":53,"context_line":"class HANotEnoughAvailableAgents(exceptions.NeutronException):"},{"line_number":54,"context_line":"    message \u003d _(\"Not enough l3 agents available to ensure HA. Minimum \""},{"line_number":55,"context_line":"                \"required %(min_agents)s, available %(num_agents)s\")"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"class HAMinimumAgentsNumberNotValid(exceptions.NeutronException):"}],"source_content_type":"text/x-python","patch_set":74,"id":"fa98f980_56e30b33","line":55,"updated":"2014-09-08 11:54:01.000000000","message":"ditto","commit_id":"df1604d8e5a09f891187b0bbc6966fd1622294ed"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"change_message_id":"74b3abce1e16f9660a0c3376bd74433925d1b9ec","unresolved":false,"context_lines":[{"line_number":52,"context_line":""},{"line_number":53,"context_line":"class HANotEnoughAvailableAgents(exceptions.NeutronException):"},{"line_number":54,"context_line":"    message \u003d _(\"Not enough l3 agents available to ensure HA. Minimum \""},{"line_number":55,"context_line":"                \"required %(min_agents)s, available %(num_agents)s\")"},{"line_number":56,"context_line":""},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"class HAMinimumAgentsNumberNotValid(exceptions.NeutronException):"}],"source_content_type":"text/x-python","patch_set":74,"id":"fa98f980_e230a4ea","line":55,"in_reply_to":"fa98f980_56e30b33","updated":"2014-09-08 21:07:25.000000000","message":"Done","commit_id":"df1604d8e5a09f891187b0bbc6966fd1622294ed"}],"neutron/plugins/bigswitch/plugin.py":[{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"90b0b7f9e5fb06c0dcaecb2f8dacfe9def950e91","unresolved":false,"context_lines":[{"line_number":649,"context_line":"        return False"},{"line_number":650,"context_line":""},{"line_number":651,"context_line":""},{"line_number":652,"context_line":"class NeutronRestProxyV2(NeutronRestProxyV2Base,"},{"line_number":653,"context_line":"                         extradhcpopt_db.ExtraDhcpOptMixin,"},{"line_number":654,"context_line":"                         agentschedulers_db.DhcpAgentSchedulerDbMixin):"},{"line_number":655,"context_line":""}],"source_content_type":"text/x-python","patch_set":21,"id":"AAAAUX%2F%2B4L0%3D","line":652,"updated":"2014-02-18 14:00:34.000000000","message":"does this plugin need to have L3_HA_NAT_db_mixin in the inheritance list?","commit_id":"4cff24d403df8d593ad045e8fc4048e65bb8b5f8"}],"neutron/plugins/brocade/NeutronPlugin.py":[{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"507fc602ea30185b68087fc28df0b6a33e002bf5","unresolved":false,"context_lines":[{"line_number":85,"context_line":""},{"line_number":86,"context_line":"class BridgeRpcCallbacks(dhcp_rpc_base.DhcpRpcCallbackMixin,"},{"line_number":87,"context_line":"                         l3_rpc_base.L3RpcCallbackMixin,"},{"line_number":88,"context_line":"                         l3_hamode_rpc.L3_HA_NAT_rpc_mixin,"},{"line_number":89,"context_line":"                         sg_db_rpc.SecurityGroupServerRpcCallbackMixin):"},{"line_number":90,"context_line":"    \"\"\"Agent callback.\"\"\""},{"line_number":91,"context_line":""}],"source_content_type":"text/x-python","patch_set":36,"id":"1ae5cdf2_d022e950","line":88,"updated":"2014-06-05 21:42:54.000000000","message":"do we really want to add this extension to these Plugins? Besides, I think you forgot to add  the extension alias.","commit_id":"a8ef318e37de5977cc40d3d3e6ec3808d8d66200"}],"neutron/plugins/midonet/plugin.py":[{"author":{"_account_id":6788,"name":"Rossella Sblendido","email":"rsblendido@suse.com","username":"rossella-o"},"change_message_id":"055bfd26df603eae405b4f190b4c84139e78be44","unresolved":false,"context_lines":[{"line_number":207,"context_line":""},{"line_number":208,"context_line":"    supported_extension_aliases \u003d [\u0027external-net\u0027, \u0027router\u0027, \u0027security-group\u0027,"},{"line_number":209,"context_line":"                                   \u0027agent\u0027, \u0027dhcp_agent_scheduler\u0027, \u0027binding\u0027,"},{"line_number":210,"context_line":"                                   \u0027l3-ext-ha-mode\u0027]"},{"line_number":211,"context_line":"    __native_bulk_support \u003d False"},{"line_number":212,"context_line":""},{"line_number":213,"context_line":"    def __init__(self):"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAUH%2F9toY%3D","line":210,"updated":"2014-02-04 18:46:51.000000000","message":"Hello Sylvain, MidoNet doesn\u0027t use an l3 agent. Any reason to add this?","commit_id":"982ef5b3325b872383849d4fa6acf3d18c88d8ce"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"change_message_id":"170dc4830aa810ff861d35a79db7ddd753ab9492","unresolved":false,"context_lines":[{"line_number":207,"context_line":""},{"line_number":208,"context_line":"    supported_extension_aliases \u003d [\u0027external-net\u0027, \u0027router\u0027, \u0027security-group\u0027,"},{"line_number":209,"context_line":"                                   \u0027agent\u0027, \u0027dhcp_agent_scheduler\u0027, \u0027binding\u0027,"},{"line_number":210,"context_line":"                                   \u0027l3-ext-ha-mode\u0027]"},{"line_number":211,"context_line":"    __native_bulk_support \u003d False"},{"line_number":212,"context_line":""},{"line_number":213,"context_line":"    def __init__(self):"}],"source_content_type":"text/x-python","patch_set":14,"id":"AAAAUH%2F9pT8%3D","line":210,"in_reply_to":"AAAAUH%2F9toY%3D","updated":"2014-02-05 11:42:23.000000000","message":"Hello Rossella, I had no idea how MidoNet works, I added it since i saw the router extension was used. Thx I\u0027ll remove it.","commit_id":"982ef5b3325b872383849d4fa6acf3d18c88d8ce"}],"neutron/plugins/nicira/NeutronPlugin.py":[{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"cc159e1a3ee87a0dbc079ffe8f93881e307835e6","unresolved":false,"context_lines":[{"line_number":160,"context_line":"                                   \"external-net\","},{"line_number":161,"context_line":"                                   \"router\","},{"line_number":162,"context_line":"                                   \"security-group\","},{"line_number":163,"context_line":"                                   \"l3-ext-ha-mode\"]"},{"line_number":164,"context_line":""},{"line_number":165,"context_line":"    __native_bulk_support \u003d True"},{"line_number":166,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAUH%2F90ag%3D","line":163,"updated":"2014-02-03 16:51:52.000000000","message":"The plugin does not rely on an L3 agent. I am not sure what sense it would make to support this extension in this plugin, but I\u0027d be happy to hear your rationale. Otherwise, if this was a mechanic addition, please consider removing it, as I can see it a source of great confusion for the user.","commit_id":"5ae1676f8c58a781bfff137520c1d0146d477178"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"change_message_id":"3434131c379763e7fdc7109b93a3082cafc84fa5","unresolved":false,"context_lines":[{"line_number":160,"context_line":"                                   \"external-net\","},{"line_number":161,"context_line":"                                   \"router\","},{"line_number":162,"context_line":"                                   \"security-group\","},{"line_number":163,"context_line":"                                   \"l3-ext-ha-mode\"]"},{"line_number":164,"context_line":""},{"line_number":165,"context_line":"    __native_bulk_support \u003d True"},{"line_number":166,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"AAAAUH%2F90V4%3D","line":163,"in_reply_to":"AAAAUH%2F90ag%3D","updated":"2014-02-03 16:58:09.000000000","message":"Thanks Armando, I\u0027ll remove it in a next patch","commit_id":"5ae1676f8c58a781bfff137520c1d0146d477178"}],"neutron/plugins/openvswitch/ovs_neutron_plugin.py":[{"author":{"_account_id":2711,"name":"Zhang Hua","display_name":"Zhang Hua","email":"joshua.zhang@canonical.com","username":"zhhuabj"},"change_message_id":"dd6308e9d78b67aa3130cf589e9c7472d3a91852","unresolved":false,"context_lines":[{"line_number":277,"context_line":"    _supported_extension_aliases \u003d [\"provider\", \"external-net\", \"router\","},{"line_number":278,"context_line":"                                    \"ext-gw-mode\", \"binding\", \"quotas\","},{"line_number":279,"context_line":"                                    \"security-group\", \"agent\", \"extraroute\","},{"line_number":280,"context_line":"                                    \"l3_agent_scheduler\", \"l3-ext-ha-mode\","},{"line_number":281,"context_line":"                                    \"dhcp_agent_scheduler\","},{"line_number":282,"context_line":"                                    \"extra_dhcp_opt\","},{"line_number":283,"context_line":"                                    \"allowed-address-pairs\"]"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAUH%2F%2BcX4%3D","line":280,"updated":"2014-01-26 10:21:49.000000000","message":"Why other plugin like ryu don\u0027t make the same change ?","commit_id":"8bce8708fb9bb43fe279af0a36acc71e1d69a7fb"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"change_message_id":"d0bf16440fe9a3805eb16531aaa3c178b8deb32f","unresolved":false,"context_lines":[{"line_number":277,"context_line":"    _supported_extension_aliases \u003d [\"provider\", \"external-net\", \"router\","},{"line_number":278,"context_line":"                                    \"ext-gw-mode\", \"binding\", \"quotas\","},{"line_number":279,"context_line":"                                    \"security-group\", \"agent\", \"extraroute\","},{"line_number":280,"context_line":"                                    \"l3_agent_scheduler\", \"l3-ext-ha-mode\","},{"line_number":281,"context_line":"                                    \"dhcp_agent_scheduler\","},{"line_number":282,"context_line":"                                    \"extra_dhcp_opt\","},{"line_number":283,"context_line":"                                    \"allowed-address-pairs\"]"}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAUH%2F%2BaL8%3D","line":280,"in_reply_to":"AAAAUH%2F%2BcX4%3D","updated":"2014-01-27 08:47:46.000000000","message":"I\u0027ll do","commit_id":"8bce8708fb9bb43fe279af0a36acc71e1d69a7fb"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"507fc602ea30185b68087fc28df0b6a33e002bf5","unresolved":false,"context_lines":[{"line_number":36,"context_line":"from neutron.db import extraroute_db"},{"line_number":37,"context_line":"from neutron.db import l3_agentschedulers_db"},{"line_number":38,"context_line":"from neutron.db import l3_hamode_db"},{"line_number":39,"context_line":"from neutron.db import l3_hamode_rpc"},{"line_number":40,"context_line":"from neutron.db import l3_rpc_base"},{"line_number":41,"context_line":"from neutron.db import portbindings_db"},{"line_number":42,"context_line":"from neutron.db import quota_db  # noqa"}],"source_content_type":"text/x-python","patch_set":36,"id":"1ae5cdf2_50d6d928","line":39,"updated":"2014-06-05 21:42:54.000000000","message":"this plugin is dying..","commit_id":"a8ef318e37de5977cc40d3d3e6ec3808d8d66200"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"change_message_id":"15b0966afa02b71e815e3636eb2dc8d86bfc6fcb","unresolved":false,"context_lines":[{"line_number":36,"context_line":"from neutron.db import extraroute_db"},{"line_number":37,"context_line":"from neutron.db import l3_agentschedulers_db"},{"line_number":38,"context_line":"from neutron.db import l3_hamode_db"},{"line_number":39,"context_line":"from neutron.db import l3_hamode_rpc"},{"line_number":40,"context_line":"from neutron.db import l3_rpc_base"},{"line_number":41,"context_line":"from neutron.db import portbindings_db"},{"line_number":42,"context_line":"from neutron.db import quota_db  # noqa"}],"source_content_type":"text/x-python","patch_set":36,"id":"1ae5cdf2_aed0911f","line":39,"in_reply_to":"1ae5cdf2_50d6d928","updated":"2014-06-06 09:40:39.000000000","message":":(, yes you\u0027re right...","commit_id":"a8ef318e37de5977cc40d3d3e6ec3808d8d66200"}],"neutron/services/l3_router/l3_router_plugin.py":[{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"36af3f9a8a8ca690eda5a18b0f344aad7c6ac546","unresolved":false,"context_lines":[{"line_number":43,"context_line":""},{"line_number":44,"context_line":"class L3RouterPlugin(db_base_plugin_v2.CommonDbMixin,"},{"line_number":45,"context_line":"                     extraroute_db.ExtraRoute_db_mixin,"},{"line_number":46,"context_line":"                     l3_gwmode_db.L3_NAT_db_mixin,"},{"line_number":47,"context_line":"                     l3_hamode_db.L3_HA_NAT_db_mixin,"},{"line_number":48,"context_line":"                     l3_agentschedulers_db.L3AgentSchedulerDbMixin):"},{"line_number":49,"context_line":""}],"source_content_type":"text/x-python","patch_set":39,"id":"baada198_4da164a8","line":46,"updated":"2014-07-10 14:25:49.000000000","message":"I really don\u0027t know how we\u0027ll integrate this with DVR at this point... Both features re-implement create/delete router. We\u0027ll have to deal with this in the near future.","commit_id":"e04dff1c37390051469829495a2632b5ef4ddbb0"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"b907b6ad553c1ea8c3a63b709a90d38b726bd4d5","unresolved":false,"context_lines":[{"line_number":38,"context_line":"                                 l3_rpc_base.L3RpcCallbackMixin,"},{"line_number":39,"context_line":"                                 l3_hamode_rpc.L3_HA_NAT_rpc_mixin):"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"    RPC_API_VERSION \u003d \u00271.2\u0027"},{"line_number":42,"context_line":"    # history"},{"line_number":43,"context_line":"    #   1.2 Added methods for DVR support"},{"line_number":44,"context_line":""}],"source_content_type":"text/x-python","patch_set":41,"id":"baada198_a94d183d","line":41,"updated":"2014-07-21 18:43:50.000000000","message":"api bump + history revision?","commit_id":"52096cac3a5a7ee9d71c07e2bf6afb8f0954632c"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"change_message_id":"ae048e1cd22928d28f794fe9ae5f9f7e43f56d57","unresolved":false,"context_lines":[{"line_number":38,"context_line":"                                 l3_rpc_base.L3RpcCallbackMixin,"},{"line_number":39,"context_line":"                                 l3_hamode_rpc.L3_HA_NAT_rpc_mixin):"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"    RPC_API_VERSION \u003d \u00271.2\u0027"},{"line_number":42,"context_line":"    # history"},{"line_number":43,"context_line":"    #   1.2 Added methods for DVR support"},{"line_number":44,"context_line":""}],"source_content_type":"text/x-python","patch_set":41,"id":"baada198_e23a97c3","line":41,"in_reply_to":"baada198_a94d183d","updated":"2014-07-22 12:16:50.000000000","message":"Done","commit_id":"52096cac3a5a7ee9d71c07e2bf6afb8f0954632c"},{"author":{"_account_id":841,"name":"Akihiro Motoki","email":"amotoki@gmail.com","username":"amotoki"},"change_message_id":"3e4ba96d63399f61f4c15b2f6bba072fa392b6a8","unresolved":false,"context_lines":[{"line_number":57,"context_line":"        self.router_scheduler \u003d importutils.import_object("},{"line_number":58,"context_line":"            cfg.CONF.router_scheduler_driver)"},{"line_number":59,"context_line":"        self.start_periodic_agent_status_check()"},{"line_number":60,"context_line":"        super(L3RouterPlugin, self).__init__()"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"    def setup_rpc(self):"},{"line_number":63,"context_line":"        # RPC support"}],"source_content_type":"text/x-python","patch_set":73,"id":"fa98f980_33ec4ef3","line":60,"updated":"2014-09-03 19:51:27.000000000","message":"I think it is better to call super() first unless there is no special reason. At least super().__init__ needs to be called before setup_rpc(). setup_rpc() starts to receive RPC messages but corresponding callback method cannot be executed successfully because corresponding plugin methods are not prepared yet.","commit_id":"df909b9c08b22248295400dee3c9d17c5c0a2763"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"125226ef871b826004ef271378e453233ebb70ca","unresolved":false,"context_lines":[{"line_number":57,"context_line":"        self.router_scheduler \u003d importutils.import_object("},{"line_number":58,"context_line":"            cfg.CONF.router_scheduler_driver)"},{"line_number":59,"context_line":"        self.start_periodic_agent_status_check()"},{"line_number":60,"context_line":"        super(L3RouterPlugin, self).__init__()"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"    def setup_rpc(self):"},{"line_number":63,"context_line":"        # RPC support"}],"source_content_type":"text/x-python","patch_set":73,"id":"fa98f980_b60adb76","line":60,"in_reply_to":"fa98f980_33ec4ef3","updated":"2014-09-04 08:46:54.000000000","message":"I\u0027m not sure init is required before setup_rpc(), since parent class\u0027s init wasn\u0027t called previously at all.  Or has it been in error this whole time?","commit_id":"df909b9c08b22248295400dee3c9d17c5c0a2763"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"5225fc766dd8ff746cf40b1bf48a60c23151dce2","unresolved":false,"context_lines":[{"line_number":37,"context_line":"                     l3_gwmode_db.L3_NAT_db_mixin,"},{"line_number":38,"context_line":"                     l3_dvrscheduler_db.L3_DVRsch_db_mixin,"},{"line_number":39,"context_line":"                     l3_hamode_db.L3_HA_NAT_db_mixin,"},{"line_number":40,"context_line":"                     l3_agentschedulers_db.L3AgentSchedulerDbMixin):"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"    \"\"\"Implementation of the Neutron L3 Router Service Plugin."},{"line_number":43,"context_line":""}],"source_content_type":"text/x-python","patch_set":75,"id":"fa98f980_8f07d11c","line":40,"updated":"2014-09-10 09:12:28.000000000","message":"l3_dvrscheduler_db.L3_DVRsch_db_mixin already includes l3_agentschedulers_db.L3AgentSchedulerDbMixin. Am I missing smth?","commit_id":"3dc9417bb4da2c6a1fc685d106eb5cd660be18ef"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"5a8fe927eec52a66ae76a67a5c14cde94dec4395","unresolved":false,"context_lines":[{"line_number":37,"context_line":"                     l3_gwmode_db.L3_NAT_db_mixin,"},{"line_number":38,"context_line":"                     l3_dvrscheduler_db.L3_DVRsch_db_mixin,"},{"line_number":39,"context_line":"                     l3_hamode_db.L3_HA_NAT_db_mixin,"},{"line_number":40,"context_line":"                     l3_agentschedulers_db.L3AgentSchedulerDbMixin):"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"    \"\"\"Implementation of the Neutron L3 Router Service Plugin."},{"line_number":43,"context_line":""}],"source_content_type":"text/x-python","patch_set":75,"id":"fa98f980_dba50a05","line":40,"in_reply_to":"fa98f980_35839605","updated":"2014-09-10 19:44:34.000000000","message":"Python handles this sort of redundancy in the class hierarchy graph gracefully. That said, I\u0027m okay with this either way.","commit_id":"3dc9417bb4da2c6a1fc685d106eb5cd660be18ef"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"change_message_id":"7a5f970b5c87691e43ac3ae8cd5ffaf979d568e8","unresolved":false,"context_lines":[{"line_number":37,"context_line":"                     l3_gwmode_db.L3_NAT_db_mixin,"},{"line_number":38,"context_line":"                     l3_dvrscheduler_db.L3_DVRsch_db_mixin,"},{"line_number":39,"context_line":"                     l3_hamode_db.L3_HA_NAT_db_mixin,"},{"line_number":40,"context_line":"                     l3_agentschedulers_db.L3AgentSchedulerDbMixin):"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"    \"\"\"Implementation of the Neutron L3 Router Service Plugin."},{"line_number":43,"context_line":""}],"source_content_type":"text/x-python","patch_set":75,"id":"fa98f980_35839605","line":40,"in_reply_to":"fa98f980_8f07d11c","updated":"2014-09-10 09:56:08.000000000","message":"You\u0027re right, I will remove it","commit_id":"3dc9417bb4da2c6a1fc685d106eb5cd660be18ef"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"6d1f3913cdfbc86413782442659dae9f65d75537","unresolved":false,"context_lines":[{"line_number":24,"context_line":"from neutron.common import topics"},{"line_number":25,"context_line":"from neutron.db import common_db_mixin"},{"line_number":26,"context_line":"from neutron.db import extraroute_db"},{"line_number":27,"context_line":"from neutron.db import l3_agentschedulers_db"},{"line_number":28,"context_line":"from neutron.db import l3_dvrscheduler_db"},{"line_number":29,"context_line":"from neutron.db import l3_gwmode_db"},{"line_number":30,"context_line":"from neutron.db import l3_hamode_db"}],"source_content_type":"text/x-python","patch_set":76,"id":"fa98f980_9b77133b","line":27,"updated":"2014-09-10 11:20:07.000000000","message":"not used, please remove","commit_id":"4f033f76c3697963a42e46761a512d4695e6f983"}],"neutron/tests/unit/db/test_l3_ha_db.py":[{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"f8889da10e5858de680a39a7a8f6f1060915f38e","unresolved":false,"context_lines":[{"line_number":52,"context_line":"                          create\u003dTrue, return_value\u003d[1, 2]).start()"},{"line_number":53,"context_line":"        notif_p \u003d mock.patch.object(l3_hamode_db.L3_HA_NAT_db_mixin,"},{"line_number":54,"context_line":"                                    \u0027_notify_ha_interfaces_updated\u0027)"},{"line_number":55,"context_line":"        self.notif_m \u003d notif_p.start()"},{"line_number":56,"context_line":"        self.addCleanup(mock.patch.stopall)"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"        cfg.CONF.set_default(\u0027allow_overlapping_ips\u0027, True)"}],"source_content_type":"text/x-python","patch_set":56,"id":"baada198_d6fd9c09","line":55,"updated":"2014-08-11 12:03:23.000000000","message":"BaseTestCase already adds this cleanup.","commit_id":"de8dba1f623fa57e63e33274d1121410d2457d03"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"beb5c2d96362597a4ff862db12cccba47d7a8c2e","unresolved":false,"context_lines":[{"line_number":52,"context_line":"                          create\u003dTrue, return_value\u003d[1, 2]).start()"},{"line_number":53,"context_line":"        notif_p \u003d mock.patch.object(l3_hamode_db.L3_HA_NAT_db_mixin,"},{"line_number":54,"context_line":"                                    \u0027_notify_ha_interfaces_updated\u0027)"},{"line_number":55,"context_line":"        self.notif_m \u003d notif_p.start()"},{"line_number":56,"context_line":"        self.addCleanup(mock.patch.stopall)"},{"line_number":57,"context_line":""},{"line_number":58,"context_line":"        cfg.CONF.set_default(\u0027allow_overlapping_ips\u0027, True)"}],"source_content_type":"text/x-python","patch_set":56,"id":"baada198_64d97af3","line":55,"in_reply_to":"baada198_d6fd9c09","updated":"2014-08-11 13:22:09.000000000","message":"Done","commit_id":"de8dba1f623fa57e63e33274d1121410d2457d03"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"f8889da10e5858de680a39a7a8f6f1060915f38e","unresolved":false,"context_lines":[{"line_number":115,"context_line":""},{"line_number":116,"context_line":"        router \u003d self._update_router(router.id, ha\u003dTrue)"},{"line_number":117,"context_line":"        self.assertTrue(router.extra_attributes[\u0027ha\u0027])"},{"line_number":118,"context_line":""},{"line_number":119,"context_line":"    def test_router_create_one_ha_network_per_tenant(self):"},{"line_number":120,"context_line":"        self._create_router(tenant_id\u003d_uuid())"},{"line_number":121,"context_line":"        self._create_router(tenant_id\u003d_uuid())"}],"source_content_type":"text/x-python","patch_set":56,"id":"baada198_d35e8e78","line":118,"updated":"2014-08-11 12:03:23.000000000","message":"This test seems to be missing a body :)","commit_id":"de8dba1f623fa57e63e33274d1121410d2457d03"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"beb5c2d96362597a4ff862db12cccba47d7a8c2e","unresolved":false,"context_lines":[{"line_number":115,"context_line":""},{"line_number":116,"context_line":"        router \u003d self._update_router(router.id, ha\u003dTrue)"},{"line_number":117,"context_line":"        self.assertTrue(router.extra_attributes[\u0027ha\u0027])"},{"line_number":118,"context_line":""},{"line_number":119,"context_line":"    def test_router_create_one_ha_network_per_tenant(self):"},{"line_number":120,"context_line":"        self._create_router(tenant_id\u003d_uuid())"},{"line_number":121,"context_line":"        self._create_router(tenant_id\u003d_uuid())"}],"source_content_type":"text/x-python","patch_set":56,"id":"baada198_5f1eff0d","line":118,"in_reply_to":"baada198_d35e8e78","updated":"2014-08-11 13:22:09.000000000","message":"Done","commit_id":"de8dba1f623fa57e63e33274d1121410d2457d03"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"f8889da10e5858de680a39a7a8f6f1060915f38e","unresolved":false,"context_lines":[{"line_number":122,"context_line":""},{"line_number":123,"context_line":"    def test_l3_agent_routers_query_interface(self):"},{"line_number":124,"context_line":"        router \u003d self._create_router()"},{"line_number":125,"context_line":"        self._bind_router(router.id, self.agent[\u0027id\u0027])"},{"line_number":126,"context_line":"        routers \u003d self.plugin.get_sync_data(self.admin_ctx, self.agent[\u0027host\u0027])"},{"line_number":127,"context_line":"        self.assertEqual(1, len(routers))"},{"line_number":128,"context_line":"        router \u003d routers[0]"}],"source_content_type":"text/x-python","patch_set":56,"id":"baada198_f60620cc","line":125,"updated":"2014-08-11 12:03:23.000000000","message":"We\u0027re testing plugin.get_sync_data but not L3RpcCallbackMixin.sync_routers (Which calls plugin.get_sync_data). This means that we missed a slight regression there. I\u0027ll see about adding a test in the appropriate place.","commit_id":"de8dba1f623fa57e63e33274d1121410d2457d03"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"f8889da10e5858de680a39a7a8f6f1060915f38e","unresolved":false,"context_lines":[{"line_number":171,"context_line":"        self.assertEqual(2, len(routers))"},{"line_number":172,"context_line":"        self.assertNotEqual(routers[0][\u0027ha_vr_id\u0027],"},{"line_number":173,"context_line":"                            routers[1][\u0027ha_vr_id\u0027])"},{"line_number":174,"context_line":""},{"line_number":175,"context_line":"    def test_vr_id_two_tenants(self):"},{"line_number":176,"context_line":"        self._create_router()"},{"line_number":177,"context_line":"        self._create_router(tenant_id\u003d_uuid())"}],"source_content_type":"text/x-python","patch_set":56,"id":"baada198_13e3a6a0","line":174,"updated":"2014-08-11 12:03:23.000000000","message":"This test is asserting an implementation detail, I think it can be removed.","commit_id":"de8dba1f623fa57e63e33274d1121410d2457d03"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"beb5c2d96362597a4ff862db12cccba47d7a8c2e","unresolved":false,"context_lines":[{"line_number":171,"context_line":"        self.assertEqual(2, len(routers))"},{"line_number":172,"context_line":"        self.assertNotEqual(routers[0][\u0027ha_vr_id\u0027],"},{"line_number":173,"context_line":"                            routers[1][\u0027ha_vr_id\u0027])"},{"line_number":174,"context_line":""},{"line_number":175,"context_line":"    def test_vr_id_two_tenants(self):"},{"line_number":176,"context_line":"        self._create_router()"},{"line_number":177,"context_line":"        self._create_router(tenant_id\u003d_uuid())"}],"source_content_type":"text/x-python","patch_set":56,"id":"baada198_84d4cebb","line":174,"in_reply_to":"baada198_13e3a6a0","updated":"2014-08-11 13:22:09.000000000","message":"Done","commit_id":"de8dba1f623fa57e63e33274d1121410d2457d03"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"9f8252a449537a697084850a356622d727fae24a","unresolved":false,"context_lines":[{"line_number":29,"context_line":"_uuid \u003d uuidutils.generate_uuid"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"class FakeL3Plugin(common_db_mixin.CommonDbMixin,"},{"line_number":33,"context_line":"                   agents_db.AgentDbMixin,"},{"line_number":34,"context_line":"                   l3_hamode_db.L3_HA_NAT_db_mixin):"},{"line_number":35,"context_line":"    pass"}],"source_content_type":"text/x-python","patch_set":70,"id":"1abeadc6_b35bef52","line":32,"updated":"2014-08-28 15:55:31.000000000","message":"why couldn\u0027t we test the mixin in isolation as it was done here:\n\nhttps://github.com/openstack/neutron/blob/master/neutron/tests/unit/db/test_l3_dvr_db.py","commit_id":"1fef6ff9362574429f15ab7da35a43c0aaa22721"},{"author":{"_account_id":7987,"name":"Ivar Lazzaro","email":"ivarlazzaro@gmail.com","username":"Ivar"},"change_message_id":"29ae22df88662dc01aaba3f40170fbd6776121cf","unresolved":false,"context_lines":[{"line_number":29,"context_line":"_uuid \u003d uuidutils.generate_uuid"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"class FakeL3Plugin(common_db_mixin.CommonDbMixin,"},{"line_number":33,"context_line":"                   agents_db.AgentDbMixin,"},{"line_number":34,"context_line":"                   l3_hamode_db.L3_HA_NAT_db_mixin):"},{"line_number":35,"context_line":"    pass"}],"source_content_type":"text/x-python","patch_set":70,"id":"1abeadc6_cdf51fee","line":32,"in_reply_to":"1abeadc6_b35bef52","updated":"2014-08-28 20:33:17.000000000","message":"+1","commit_id":"1fef6ff9362574429f15ab7da35a43c0aaa22721"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"8cec662ede168cd5991e174084a79d98b901b669","unresolved":false,"context_lines":[{"line_number":29,"context_line":"_uuid \u003d uuidutils.generate_uuid"},{"line_number":30,"context_line":""},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"class FakeL3Plugin(common_db_mixin.CommonDbMixin,"},{"line_number":33,"context_line":"                   agents_db.AgentDbMixin,"},{"line_number":34,"context_line":"                   l3_hamode_db.L3_HA_NAT_db_mixin):"},{"line_number":35,"context_line":"    pass"}],"source_content_type":"text/x-python","patch_set":70,"id":"fa98f980_d467a223","line":32,"in_reply_to":"1abeadc6_b35bef52","updated":"2014-09-02 19:48:18.000000000","message":"Done, partially. Still not 100% pleased but please tell me what you think.","commit_id":"1fef6ff9362574429f15ab7da35a43c0aaa22721"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"224e675d43500778c521a401c53e4f286b4af2bf","unresolved":false,"context_lines":[{"line_number":43,"context_line":"        self.admin_ctx \u003d context.get_admin_context()"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"        mock.patch.object(manager.NeutronManager, \u0027get_plugin\u0027,"},{"line_number":46,"context_line":"                          return_value\u003ddb_v2.NeutronDbPluginV2()).start()"},{"line_number":47,"context_line":"        mock.patch.object(l3_hamode_db.L3_HA_NAT_db_mixin, \u0027get_l3_agents\u0027,"},{"line_number":48,"context_line":"                          create\u003dTrue, return_value\u003d[1, 2]).start()"},{"line_number":49,"context_line":"        notif_p \u003d mock.patch.object(l3_hamode_db.L3_HA_NAT_db_mixin,"}],"source_content_type":"text/x-python","patch_set":70,"id":"1abeadc6_917a2b75","line":46,"updated":"2014-08-29 20:42:43.000000000","message":"Please set the plugin via setup_coreplugin() rather than mocking out get_plugin.  NeutronManager\u0027s accessors return weak references to the plugins to ensure that memory leaks around mocking don\u0027t occur.\n\nsee: \nhttps://github.com/openstack/neutron/blob/master/neutron/tests/unit/test_db_plugin.py#L66\nhttps://github.com/openstack/neutron/blob/master/neutron/tests/unit/test_db_plugin.py#L93","commit_id":"1fef6ff9362574429f15ab7da35a43c0aaa22721"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"8cec662ede168cd5991e174084a79d98b901b669","unresolved":false,"context_lines":[{"line_number":43,"context_line":"        self.admin_ctx \u003d context.get_admin_context()"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"        mock.patch.object(manager.NeutronManager, \u0027get_plugin\u0027,"},{"line_number":46,"context_line":"                          return_value\u003ddb_v2.NeutronDbPluginV2()).start()"},{"line_number":47,"context_line":"        mock.patch.object(l3_hamode_db.L3_HA_NAT_db_mixin, \u0027get_l3_agents\u0027,"},{"line_number":48,"context_line":"                          create\u003dTrue, return_value\u003d[1, 2]).start()"},{"line_number":49,"context_line":"        notif_p \u003d mock.patch.object(l3_hamode_db.L3_HA_NAT_db_mixin,"}],"source_content_type":"text/x-python","patch_set":70,"id":"fa98f980_1bc163e4","line":46,"in_reply_to":"1abeadc6_917a2b75","updated":"2014-09-02 19:48:18.000000000","message":"Done","commit_id":"1fef6ff9362574429f15ab7da35a43c0aaa22721"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"9f8252a449537a697084850a356622d727fae24a","unresolved":false,"context_lines":[{"line_number":61,"context_line":"            \u0027topic\u0027: \u0027N/A\u0027"},{"line_number":62,"context_line":"        }"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"        self.plugin.create_or_update_agent(self.admin_ctx, agent_status)"},{"line_number":65,"context_line":"        self.agent \u003d self.plugin.get_agents(self.admin_ctx)[0]"},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"    def _create_router(self, ha\u003dTrue, tenant_id\u003d\u0027tenant1\u0027):"}],"source_content_type":"text/x-python","patch_set":70,"id":"1abeadc6_13190388","line":64,"updated":"2014-08-28 15:55:31.000000000","message":"why do we need to create agents if we are testing DB logic here? I think this would be best to be decoupled from this test cases.","commit_id":"1fef6ff9362574429f15ab7da35a43c0aaa22721"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"8cec662ede168cd5991e174084a79d98b901b669","unresolved":false,"context_lines":[{"line_number":61,"context_line":"            \u0027topic\u0027: \u0027N/A\u0027"},{"line_number":62,"context_line":"        }"},{"line_number":63,"context_line":""},{"line_number":64,"context_line":"        self.plugin.create_or_update_agent(self.admin_ctx, agent_status)"},{"line_number":65,"context_line":"        self.agent \u003d self.plugin.get_agents(self.admin_ctx)[0]"},{"line_number":66,"context_line":""},{"line_number":67,"context_line":"    def _create_router(self, ha\u003dTrue, tenant_id\u003d\u0027tenant1\u0027):"}],"source_content_type":"text/x-python","patch_set":70,"id":"fa98f980_14720ae5","line":64,"in_reply_to":"1abeadc6_13190388","updated":"2014-09-02 19:48:18.000000000","message":"Done","commit_id":"1fef6ff9362574429f15ab7da35a43c0aaa22721"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"224e675d43500778c521a401c53e4f286b4af2bf","unresolved":false,"context_lines":[{"line_number":113,"context_line":"        self.assertTrue(router.extra_attributes[\u0027ha\u0027])"},{"line_number":114,"context_line":"        self.assertIsNotNone(router.extra_attributes[\u0027ha_vr_id\u0027])"},{"line_number":115,"context_line":""},{"line_number":116,"context_line":"    def test_router_create_one_ha_network_per_tenant(self):"},{"line_number":117,"context_line":"        tenant1 \u003d _uuid()"},{"line_number":118,"context_line":"        tenant2 \u003d _uuid()"},{"line_number":119,"context_line":"        self._create_router(tenant_id\u003dtenant1)"}],"source_content_type":"text/x-python","patch_set":70,"id":"1abeadc6_116a9b80","line":116,"updated":"2014-08-29 20:42:43.000000000","message":"Consider a more descriptive name, e.g. test_ha_networks_not_shared_between_tenants","commit_id":"1fef6ff9362574429f15ab7da35a43c0aaa22721"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"8cec662ede168cd5991e174084a79d98b901b669","unresolved":false,"context_lines":[{"line_number":113,"context_line":"        self.assertTrue(router.extra_attributes[\u0027ha\u0027])"},{"line_number":114,"context_line":"        self.assertIsNotNone(router.extra_attributes[\u0027ha_vr_id\u0027])"},{"line_number":115,"context_line":""},{"line_number":116,"context_line":"    def test_router_create_one_ha_network_per_tenant(self):"},{"line_number":117,"context_line":"        tenant1 \u003d _uuid()"},{"line_number":118,"context_line":"        tenant2 \u003d _uuid()"},{"line_number":119,"context_line":"        self._create_router(tenant_id\u003dtenant1)"}],"source_content_type":"text/x-python","patch_set":70,"id":"fa98f980_9b08f32e","line":116,"in_reply_to":"1abeadc6_116a9b80","updated":"2014-09-02 19:48:18.000000000","message":"Done","commit_id":"1fef6ff9362574429f15ab7da35a43c0aaa22721"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"224e675d43500778c521a401c53e4f286b4af2bf","unresolved":false,"context_lines":[{"line_number":120,"context_line":"        self._create_router(tenant_id\u003dtenant2)"},{"line_number":121,"context_line":"        ha_network1 \u003d self.plugin.get_ha_network(self.admin_ctx, tenant1)"},{"line_number":122,"context_line":"        ha_network2 \u003d self.plugin.get_ha_network(self.admin_ctx, tenant2)"},{"line_number":123,"context_line":"        self.assertFalse("},{"line_number":124,"context_line":"            ha_network1[\u0027network_id\u0027] \u003d\u003d ha_network2[\u0027network_id\u0027])"},{"line_number":125,"context_line":""},{"line_number":126,"context_line":"    def test_l3_agent_routers_query_interface(self):"}],"source_content_type":"text/x-python","patch_set":70,"id":"1abeadc6_314eb738","line":123,"updated":"2014-08-29 20:42:43.000000000","message":"assertFalse -\u003e assertNotEqual","commit_id":"1fef6ff9362574429f15ab7da35a43c0aaa22721"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"8cec662ede168cd5991e174084a79d98b901b669","unresolved":false,"context_lines":[{"line_number":120,"context_line":"        self._create_router(tenant_id\u003dtenant2)"},{"line_number":121,"context_line":"        ha_network1 \u003d self.plugin.get_ha_network(self.admin_ctx, tenant1)"},{"line_number":122,"context_line":"        ha_network2 \u003d self.plugin.get_ha_network(self.admin_ctx, tenant2)"},{"line_number":123,"context_line":"        self.assertFalse("},{"line_number":124,"context_line":"            ha_network1[\u0027network_id\u0027] \u003d\u003d ha_network2[\u0027network_id\u0027])"},{"line_number":125,"context_line":""},{"line_number":126,"context_line":"    def test_l3_agent_routers_query_interface(self):"}],"source_content_type":"text/x-python","patch_set":70,"id":"fa98f980_db027b0a","line":123,"in_reply_to":"1abeadc6_314eb738","updated":"2014-09-02 19:48:18.000000000","message":"Done","commit_id":"1fef6ff9362574429f15ab7da35a43c0aaa22721"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"224e675d43500778c521a401c53e4f286b4af2bf","unresolved":false,"context_lines":[{"line_number":140,"context_line":"                         interface[\u0027device_owner\u0027])"},{"line_number":141,"context_line":"        self.assertEqual(cfg.CONF.l3_ha_net_cidr, interface[\u0027subnet\u0027][\u0027cidr\u0027])"},{"line_number":142,"context_line":""},{"line_number":143,"context_line":"    def test_migration_from_ha_op_agent(self):"},{"line_number":144,"context_line":"        router \u003d self._create_router()"},{"line_number":145,"context_line":"        self._bind_router(router.id, self.agent[\u0027id\u0027])"},{"line_number":146,"context_line":"        routers \u003d self.plugin.get_ha_sync_data_for_host("}],"source_content_type":"text/x-python","patch_set":70,"id":"1abeadc6_f1f51fcb","line":143,"updated":"2014-08-29 20:42:43.000000000","message":"-\u003e test_deployed_router_can_have_ha_disabled","commit_id":"1fef6ff9362574429f15ab7da35a43c0aaa22721"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"8cec662ede168cd5991e174084a79d98b901b669","unresolved":false,"context_lines":[{"line_number":140,"context_line":"                         interface[\u0027device_owner\u0027])"},{"line_number":141,"context_line":"        self.assertEqual(cfg.CONF.l3_ha_net_cidr, interface[\u0027subnet\u0027][\u0027cidr\u0027])"},{"line_number":142,"context_line":""},{"line_number":143,"context_line":"    def test_migration_from_ha_op_agent(self):"},{"line_number":144,"context_line":"        router \u003d self._create_router()"},{"line_number":145,"context_line":"        self._bind_router(router.id, self.agent[\u0027id\u0027])"},{"line_number":146,"context_line":"        routers \u003d self.plugin.get_ha_sync_data_for_host("}],"source_content_type":"text/x-python","patch_set":70,"id":"fa98f980_8d3516dc","line":143,"in_reply_to":"1abeadc6_f1f51fcb","updated":"2014-09-02 19:48:18.000000000","message":"Done","commit_id":"1fef6ff9362574429f15ab7da35a43c0aaa22721"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"224e675d43500778c521a401c53e4f286b4af2bf","unresolved":false,"context_lines":[{"line_number":155,"context_line":"        interface \u003d router.get(constants.HA_INTERFACE_KEY)"},{"line_number":156,"context_line":"        self.assertIsNone(interface)"},{"line_number":157,"context_line":""},{"line_number":158,"context_line":"    def test_migration_to_ha_op_agent(self):"},{"line_number":159,"context_line":"        self._create_router(ha\u003dFalse)"},{"line_number":160,"context_line":"        routers \u003d self.plugin.get_ha_sync_data_for_host(self.admin_ctx, None)"},{"line_number":161,"context_line":"        router \u003d routers[0]"}],"source_content_type":"text/x-python","patch_set":70,"id":"1abeadc6_f11c3f15","line":158,"updated":"2014-08-29 20:42:43.000000000","message":"-\u003e test_deployed_router_can_have_ha_enabled","commit_id":"1fef6ff9362574429f15ab7da35a43c0aaa22721"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"8cec662ede168cd5991e174084a79d98b901b669","unresolved":false,"context_lines":[{"line_number":155,"context_line":"        interface \u003d router.get(constants.HA_INTERFACE_KEY)"},{"line_number":156,"context_line":"        self.assertIsNone(interface)"},{"line_number":157,"context_line":""},{"line_number":158,"context_line":"    def test_migration_to_ha_op_agent(self):"},{"line_number":159,"context_line":"        self._create_router(ha\u003dFalse)"},{"line_number":160,"context_line":"        routers \u003d self.plugin.get_ha_sync_data_for_host(self.admin_ctx, None)"},{"line_number":161,"context_line":"        router \u003d routers[0]"}],"source_content_type":"text/x-python","patch_set":70,"id":"fa98f980_ad301ae9","line":158,"in_reply_to":"1abeadc6_f11c3f15","updated":"2014-09-02 19:48:18.000000000","message":"Done","commit_id":"1fef6ff9362574429f15ab7da35a43c0aaa22721"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"224e675d43500778c521a401c53e4f286b4af2bf","unresolved":false,"context_lines":[{"line_number":168,"context_line":"        interface \u003d router.get(constants.HA_INTERFACE_KEY)"},{"line_number":169,"context_line":"        self.assertIsNotNone(interface)"},{"line_number":170,"context_line":""},{"line_number":171,"context_line":"    def test_vr_id_two_routers(self):"},{"line_number":172,"context_line":"        self._create_router()"},{"line_number":173,"context_line":"        self._create_router()"},{"line_number":174,"context_line":"        routers \u003d self.plugin.get_ha_sync_data_for_host(self.admin_ctx, None)"}],"source_content_type":"text/x-python","patch_set":70,"id":"1abeadc6_f1ca7f6c","line":171,"updated":"2014-08-29 20:42:43.000000000","message":"-\u003e test_vr_id_unique_between_tenant_routers","commit_id":"1fef6ff9362574429f15ab7da35a43c0aaa22721"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"8cec662ede168cd5991e174084a79d98b901b669","unresolved":false,"context_lines":[{"line_number":168,"context_line":"        interface \u003d router.get(constants.HA_INTERFACE_KEY)"},{"line_number":169,"context_line":"        self.assertIsNotNone(interface)"},{"line_number":170,"context_line":""},{"line_number":171,"context_line":"    def test_vr_id_two_routers(self):"},{"line_number":172,"context_line":"        self._create_router()"},{"line_number":173,"context_line":"        self._create_router()"},{"line_number":174,"context_line":"        routers \u003d self.plugin.get_ha_sync_data_for_host(self.admin_ctx, None)"}],"source_content_type":"text/x-python","patch_set":70,"id":"fa98f980_cd755e99","line":171,"in_reply_to":"1abeadc6_f1ca7f6c","updated":"2014-09-02 19:48:18.000000000","message":"Done","commit_id":"1fef6ff9362574429f15ab7da35a43c0aaa22721"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"9f8252a449537a697084850a356622d727fae24a","unresolved":false,"context_lines":[{"line_number":195,"context_line":""},{"line_number":196,"context_line":"    def test_router_ha_op_migration(self):"},{"line_number":197,"context_line":"        router \u003d self._create_router(ha\u003dFalse)"},{"line_number":198,"context_line":"        self.notif_m.reset_mock()"},{"line_number":199,"context_line":"        self._update_router(router.id, ha\u003dTrue)"},{"line_number":200,"context_line":"        self.assertTrue(self.notif_m.called)"},{"line_number":201,"context_line":""}],"source_content_type":"text/x-python","patch_set":70,"id":"1abeadc6_4679fb80","line":198,"updated":"2014-08-28 15:55:31.000000000","message":"why do we reset the mock here? Is it really necessary? Perhaps _notify_ha_interfaces_updated should be stubbed out for _create_router. This makes me think that these unit tests are not well isolated from each other, but they look pretty good so far.","commit_id":"1fef6ff9362574429f15ab7da35a43c0aaa22721"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"8cec662ede168cd5991e174084a79d98b901b669","unresolved":false,"context_lines":[{"line_number":195,"context_line":""},{"line_number":196,"context_line":"    def test_router_ha_op_migration(self):"},{"line_number":197,"context_line":"        router \u003d self._create_router(ha\u003dFalse)"},{"line_number":198,"context_line":"        self.notif_m.reset_mock()"},{"line_number":199,"context_line":"        self._update_router(router.id, ha\u003dTrue)"},{"line_number":200,"context_line":"        self.assertTrue(self.notif_m.called)"},{"line_number":201,"context_line":""}],"source_content_type":"text/x-python","patch_set":70,"id":"fa98f980_edd4e248","line":198,"in_reply_to":"1abeadc6_4679fb80","updated":"2014-09-02 19:48:18.000000000","message":"I don\u0027t think this about isolation between tests.\n\nI think that resetting the mock is a better approach than mocking out _notify_ha_interfaces_updated.\n\nSide note: I\u0027m moving these tests so they\u0027re near the other update tests.","commit_id":"1fef6ff9362574429f15ab7da35a43c0aaa22721"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"9f8252a449537a697084850a356622d727fae24a","unresolved":false,"context_lines":[{"line_number":208,"context_line":"        ha0 \u003d routers[0][\u0027ha\u0027]"},{"line_number":209,"context_line":"        ha1 \u003d routers[1][\u0027ha\u0027]"},{"line_number":210,"context_line":""},{"line_number":211,"context_line":"        self.assertFalse(ha0 \u003d\u003d ha1)"},{"line_number":212,"context_line":""},{"line_number":213,"context_line":"    def test_update_state(self):"},{"line_number":214,"context_line":"        router \u003d self._create_router()"}],"source_content_type":"text/x-python","patch_set":70,"id":"1abeadc6_2664ffb7","line":211,"updated":"2014-08-28 15:55:31.000000000","message":"why not assertNotEqual?","commit_id":"1fef6ff9362574429f15ab7da35a43c0aaa22721"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"8cec662ede168cd5991e174084a79d98b901b669","unresolved":false,"context_lines":[{"line_number":208,"context_line":"        ha0 \u003d routers[0][\u0027ha\u0027]"},{"line_number":209,"context_line":"        ha1 \u003d routers[1][\u0027ha\u0027]"},{"line_number":210,"context_line":""},{"line_number":211,"context_line":"        self.assertFalse(ha0 \u003d\u003d ha1)"},{"line_number":212,"context_line":""},{"line_number":213,"context_line":"    def test_update_state(self):"},{"line_number":214,"context_line":"        router \u003d self._create_router()"}],"source_content_type":"text/x-python","patch_set":70,"id":"fa98f980_6d6472e5","line":211,"in_reply_to":"1abeadc6_2664ffb7","updated":"2014-09-02 19:48:18.000000000","message":"Done","commit_id":"1fef6ff9362574429f15ab7da35a43c0aaa22721"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"7a829d7c2d15c322363cfc6520709241fc719868","unresolved":false,"context_lines":[{"line_number":262,"context_line":""},{"line_number":263,"context_line":"        self.assertNotEqual(ha0, ha1)"},{"line_number":264,"context_line":""},{"line_number":265,"context_line":"    def test_add_ha_port_binding_fails(self):"},{"line_number":266,"context_line":"        router \u003d self._create_router()"},{"line_number":267,"context_line":"        device_filter \u003d {\u0027device_id\u0027: [router.id]}"},{"line_number":268,"context_line":"        ports_before \u003d self.core_plugin.get_ports("}],"source_content_type":"text/x-python","patch_set":72,"id":"fa98f980_471af07d","line":265,"updated":"2014-09-03 17:50:26.000000000","message":"Consider using more descriptive test names, e.g. test_add_ha_port_binding_cleans_up_ports_on_failure so that the intent of the test is clear to poor reviewers like me.","commit_id":"32ad84aaa83cd3bd3497c46967f24b75043cd3dd"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"40817f3f838c5cde9eacae0918ad3deaefa120ad","unresolved":false,"context_lines":[{"line_number":262,"context_line":""},{"line_number":263,"context_line":"        self.assertNotEqual(ha0, ha1)"},{"line_number":264,"context_line":""},{"line_number":265,"context_line":"    def test_add_ha_port_binding_fails(self):"},{"line_number":266,"context_line":"        router \u003d self._create_router()"},{"line_number":267,"context_line":"        device_filter \u003d {\u0027device_id\u0027: [router.id]}"},{"line_number":268,"context_line":"        ports_before \u003d self.core_plugin.get_ports("}],"source_content_type":"text/x-python","patch_set":72,"id":"fa98f980_129108f1","line":265,"in_reply_to":"fa98f980_471af07d","updated":"2014-09-03 20:05:48.000000000","message":"Done","commit_id":"32ad84aaa83cd3bd3497c46967f24b75043cd3dd"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"7a829d7c2d15c322363cfc6520709241fc719868","unresolved":false,"context_lines":[{"line_number":271,"context_line":""},{"line_number":272,"context_line":"        with mock.patch.object(self.plugin, \u0027_create_ha_port_binding\u0027,"},{"line_number":273,"context_line":"                               side_effect\u003dValueError()):"},{"line_number":274,"context_line":"            try:"},{"line_number":275,"context_line":"                self.plugin.add_ha_port(self.admin_ctx, router.id,"},{"line_number":276,"context_line":"                                        network.network_id, router.tenant_id)"},{"line_number":277,"context_line":"            except ValueError:"}],"source_content_type":"text/x-python","patch_set":72,"id":"fa98f980_e73da42c","line":274,"updated":"2014-09-03 17:50:26.000000000","message":"An easier way to trap the exception would be:\n\nwith self.assertRaises(ValueError):\n ...","commit_id":"32ad84aaa83cd3bd3497c46967f24b75043cd3dd"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"40817f3f838c5cde9eacae0918ad3deaefa120ad","unresolved":false,"context_lines":[{"line_number":271,"context_line":""},{"line_number":272,"context_line":"        with mock.patch.object(self.plugin, \u0027_create_ha_port_binding\u0027,"},{"line_number":273,"context_line":"                               side_effect\u003dValueError()):"},{"line_number":274,"context_line":"            try:"},{"line_number":275,"context_line":"                self.plugin.add_ha_port(self.admin_ctx, router.id,"},{"line_number":276,"context_line":"                                        network.network_id, router.tenant_id)"},{"line_number":277,"context_line":"            except ValueError:"}],"source_content_type":"text/x-python","patch_set":72,"id":"fa98f980_32a8cc76","line":274,"in_reply_to":"fa98f980_e73da42c","updated":"2014-09-03 20:05:48.000000000","message":"The assertRaises context manager was added in 2.7, so I\u0027ll use the poor\u0027s man version for now. I knew this code smelled, but it was late and my nose wasn\u0027t as perceptive.","commit_id":"32ad84aaa83cd3bd3497c46967f24b75043cd3dd"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"a3afeebd07d7a9d36600c3000027210b54884f29","unresolved":false,"context_lines":[{"line_number":270,"context_line":""},{"line_number":271,"context_line":"        with mock.patch.object(self.plugin, \u0027_create_ha_port_binding\u0027,"},{"line_number":272,"context_line":"                               side_effect\u003dValueError):"},{"line_number":273,"context_line":"            self.assertRaises(ValueError, self.plugin.add_ha_port,"},{"line_number":274,"context_line":"                              self.admin_ctx, router.id, network.network_id,"},{"line_number":275,"context_line":"                              router.tenant_id)"},{"line_number":276,"context_line":""}],"source_content_type":"text/x-python","patch_set":73,"id":"fa98f980_4c53de38","line":273,"updated":"2014-09-04 09:42:04.000000000","message":"Is there an advantage to the testtools context manager?","commit_id":"df909b9c08b22248295400dee3c9d17c5c0a2763"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"32ded2945fa75aa21b6a38330ae1d5f4fd7e98a7","unresolved":false,"context_lines":[{"line_number":270,"context_line":""},{"line_number":271,"context_line":"        with mock.patch.object(self.plugin, \u0027_create_ha_port_binding\u0027,"},{"line_number":272,"context_line":"                               side_effect\u003dValueError):"},{"line_number":273,"context_line":"            self.assertRaises(ValueError, self.plugin.add_ha_port,"},{"line_number":274,"context_line":"                              self.admin_ctx, router.id, network.network_id,"},{"line_number":275,"context_line":"                              router.tenant_id)"},{"line_number":276,"context_line":""}],"source_content_type":"text/x-python","patch_set":73,"id":"fa98f980_331b5d74","line":273,"updated":"2014-09-04 07:30:41.000000000","message":"Testtools actually supports the context-based assertion I was thinking of:\n\nwith testtools.ExpectedException(Foo):\n ...\n\n\nReference: http://testtools.readthedocs.org/en/latest/for-test-authors.html#expectedexception","commit_id":"df909b9c08b22248295400dee3c9d17c5c0a2763"},{"author":{"_account_id":2733,"name":"Darragh O\u0027Reilly","email":"doreilly@suse.com","username":"darragh-oreilly"},"change_message_id":"b38e6c37073f3956f50fd57a2f83c9c3859384f7","unresolved":false,"context_lines":[{"line_number":174,"context_line":"        router \u003d self._create_router(ha\u003dFalse)"},{"line_number":175,"context_line":"        self.assertFalse(router.extra_attributes[\u0027ha\u0027])"},{"line_number":176,"context_line":""},{"line_number":177,"context_line":"    def test_no_ha_router_create_with_ha_conf_enabled(self):"},{"line_number":178,"context_line":"        cfg.CONF.set_override(\u0027l3_ha\u0027, True)"},{"line_number":179,"context_line":""},{"line_number":180,"context_line":"        router \u003d self._create_router(ha\u003dNone)"}],"source_content_type":"text/x-python","patch_set":74,"id":"fa98f980_9b03de0c","line":177,"updated":"2014-09-08 11:21:26.000000000","message":"why the \"no\" in test_no_ha_router_create_with_ha_conf_enabled ?","commit_id":"df1604d8e5a09f891187b0bbc6966fd1622294ed"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"change_message_id":"74b3abce1e16f9660a0c3376bd74433925d1b9ec","unresolved":false,"context_lines":[{"line_number":174,"context_line":"        router \u003d self._create_router(ha\u003dFalse)"},{"line_number":175,"context_line":"        self.assertFalse(router.extra_attributes[\u0027ha\u0027])"},{"line_number":176,"context_line":""},{"line_number":177,"context_line":"    def test_no_ha_router_create_with_ha_conf_enabled(self):"},{"line_number":178,"context_line":"        cfg.CONF.set_override(\u0027l3_ha\u0027, True)"},{"line_number":179,"context_line":""},{"line_number":180,"context_line":"        router \u003d self._create_router(ha\u003dNone)"}],"source_content_type":"text/x-python","patch_set":74,"id":"fa98f980_029be8c9","line":177,"in_reply_to":"fa98f980_9b03de0c","updated":"2014-09-08 21:07:25.000000000","message":"Was to specify that  the router is created with no ha attribute specified. I will remove the \"no\" :)","commit_id":"df1604d8e5a09f891187b0bbc6966fd1622294ed"},{"author":{"_account_id":2035,"name":"Maru Newby","email":"marun@redhat.com","username":"maru"},"change_message_id":"27cee290b7bb40fa750227b4d0653112062331e3","unresolved":false,"context_lines":[{"line_number":279,"context_line":"            self.assertRaises(l3_ext_ha_mode.MaxVRIDAllocationTriesReached,"},{"line_number":280,"context_line":"                              self.plugin._allocate_vr_id, self.admin_ctx,"},{"line_number":281,"context_line":"                              network.network_id, router.id)"},{"line_number":282,"context_line":"            self.assertEqual(2, len(alloc.mock_calls))"},{"line_number":283,"context_line":""},{"line_number":284,"context_line":"    def test_vr_id_allocation_delete_router(self):"},{"line_number":285,"context_line":"        router \u003d self._create_router()"}],"source_content_type":"text/x-python","patch_set":77,"id":"fa98f980_afd63c25","line":282,"updated":"2014-09-10 22:04:05.000000000","message":"(No action required) test state, not behavior\n\nReference: http://googletesting.blogspot.hu/2013/03/testing-on-toilet-testing-state-vs.html","commit_id":"5730d87c26c1e5022497a5921bf392f8f98b4011"}],"neutron/tests/unit/test_extension_l3_ha.py":[{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"d485e7dd2535f20921d1fb280ae09904df36ba60","unresolved":false,"context_lines":[{"line_number":27,"context_line":"from neutron.db import model_base"},{"line_number":28,"context_line":"from neutron.extensions import l3"},{"line_number":29,"context_line":"from neutron.extensions import l3_ext_ha_mode"},{"line_number":30,"context_line":"from neutron.manager import NeutronManager"},{"line_number":31,"context_line":"from neutron.openstack.common import uuidutils"},{"line_number":32,"context_line":"from neutron.plugins.common import constants as service_constants"},{"line_number":33,"context_line":"from neutron.tests.unit import test_l3_plugin"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAUH%2F%2Bv98%3D","line":30,"updated":"2014-01-22 17:07:59.000000000","message":"please use module level imports","commit_id":"a531b31d28b1521c2327b8bcc293ab691fcab215"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"change_message_id":"ce6671455b6b29ffa04d1abab528197c7a606b17","unresolved":false,"context_lines":[{"line_number":27,"context_line":"from neutron.db import model_base"},{"line_number":28,"context_line":"from neutron.extensions import l3"},{"line_number":29,"context_line":"from neutron.extensions import l3_ext_ha_mode"},{"line_number":30,"context_line":"from neutron.manager import NeutronManager"},{"line_number":31,"context_line":"from neutron.openstack.common import uuidutils"},{"line_number":32,"context_line":"from neutron.plugins.common import constants as service_constants"},{"line_number":33,"context_line":"from neutron.tests.unit import test_l3_plugin"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAUH%2F%2Brds%3D","line":30,"in_reply_to":"AAAAUH%2F%2Bv98%3D","updated":"2014-01-23 09:46:52.000000000","message":"Sure, copy/paste from another test, I will correct both.","commit_id":"a531b31d28b1521c2327b8bcc293ab691fcab215"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"d485e7dd2535f20921d1fb280ae09904df36ba60","unresolved":false,"context_lines":[{"line_number":122,"context_line":"            # whether the ha network is reused"},{"line_number":123,"context_line":"            with self.router(name\u003d\u0027router2\u0027, admin_state_up\u003dTrue,"},{"line_number":124,"context_line":"                             tenant_id\u003dtenant_id1):"},{"line_number":125,"context_line":"                ctx2 \u003d context.Context(\u0027\u0027, tenant_id1)"},{"line_number":126,"context_line":"                result \u003d self._list(\u0027networks\u0027, neutron_context\u003dctx1)"},{"line_number":127,"context_line":"                networks \u003d result[\u0027networks\u0027]"},{"line_number":128,"context_line":"                self.assertEqual(1, len(networks))"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAUH%2F%2BvYM%3D","line":125,"updated":"2014-01-22 17:07:59.000000000","message":"where ctx2 is used? Should it be used on #126?","commit_id":"a531b31d28b1521c2327b8bcc293ab691fcab215"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"change_message_id":"ce6671455b6b29ffa04d1abab528197c7a606b17","unresolved":false,"context_lines":[{"line_number":122,"context_line":"            # whether the ha network is reused"},{"line_number":123,"context_line":"            with self.router(name\u003d\u0027router2\u0027, admin_state_up\u003dTrue,"},{"line_number":124,"context_line":"                             tenant_id\u003dtenant_id1):"},{"line_number":125,"context_line":"                ctx2 \u003d context.Context(\u0027\u0027, tenant_id1)"},{"line_number":126,"context_line":"                result \u003d self._list(\u0027networks\u0027, neutron_context\u003dctx1)"},{"line_number":127,"context_line":"                networks \u003d result[\u0027networks\u0027]"},{"line_number":128,"context_line":"                self.assertEqual(1, len(networks))"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAUH%2F%2Brc8%3D","line":125,"in_reply_to":"AAAAUH%2F%2BvYM%3D","updated":"2014-01-23 09:46:52.000000000","message":"Not used, this line has to be removed","commit_id":"a531b31d28b1521c2327b8bcc293ab691fcab215"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"d485e7dd2535f20921d1fb280ae09904df36ba60","unresolved":false,"context_lines":[{"line_number":205,"context_line":"            service_constants.L3_ROUTER_NAT]"},{"line_number":206,"context_line":"        oldNotify \u003d plugin.l3_rpc_notifier"},{"line_number":207,"context_line":"        try:"},{"line_number":208,"context_line":"            with mock.patch(l3_rpc_agent_api_str) as notifyApi:"},{"line_number":209,"context_line":"                plugin.l3_rpc_notifier \u003d notifyApi"},{"line_number":210,"context_line":"                with self.router():"},{"line_number":211,"context_line":"                    self.assertEqual("}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAUH%2F%2BvKI%3D","line":208,"updated":"2014-01-22 17:07:59.000000000","message":"consider \n with mock.patch.object(plugin, \u0027l3_rpc_notifier\u0027) as ...\nhence no need for try/except and oldNotify","commit_id":"a531b31d28b1521c2327b8bcc293ab691fcab215"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"change_message_id":"ce6671455b6b29ffa04d1abab528197c7a606b17","unresolved":false,"context_lines":[{"line_number":205,"context_line":"            service_constants.L3_ROUTER_NAT]"},{"line_number":206,"context_line":"        oldNotify \u003d plugin.l3_rpc_notifier"},{"line_number":207,"context_line":"        try:"},{"line_number":208,"context_line":"            with mock.patch(l3_rpc_agent_api_str) as notifyApi:"},{"line_number":209,"context_line":"                plugin.l3_rpc_notifier \u003d notifyApi"},{"line_number":210,"context_line":"                with self.router():"},{"line_number":211,"context_line":"                    self.assertEqual("}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAUH%2F%2BrcI%3D","line":208,"in_reply_to":"AAAAUH%2F%2BvKI%3D","updated":"2014-01-23 09:46:52.000000000","message":"Seems to make sense","commit_id":"a531b31d28b1521c2327b8bcc293ab691fcab215"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"d485e7dd2535f20921d1fb280ae09904df36ba60","unresolved":false,"context_lines":[{"line_number":210,"context_line":"                with self.router():"},{"line_number":211,"context_line":"                    self.assertEqual("},{"line_number":212,"context_line":"                        1, notifyApi.router_created.call_count)"},{"line_number":213,"context_line":"        except Exception:"},{"line_number":214,"context_line":"            plugin.l3_rpc_notifier \u003d oldNotify"},{"line_number":215,"context_line":"            raise"},{"line_number":216,"context_line":"        else:"}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAUH%2F%2BvJo%3D","line":213,"updated":"2014-01-22 17:07:59.000000000","message":"I think finally block suits better here. However if my above comment makes sense then finally won\u0027t be needed as well","commit_id":"a531b31d28b1521c2327b8bcc293ab691fcab215"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"d485e7dd2535f20921d1fb280ae09904df36ba60","unresolved":false,"context_lines":[{"line_number":226,"context_line":"        super(L3HABaseForIntTests, self).setUp(plugin\u003dplugin, ext_mgr\u003dext_mgr)"},{"line_number":227,"context_line":""},{"line_number":228,"context_line":"    def tearDown(self):"},{"line_number":229,"context_line":"        cfg.CONF.set_override(\u0027enable_l3_ha\u0027, False)"},{"line_number":230,"context_line":"        super(L3HABaseForIntTests, self).tearDown()"},{"line_number":231,"context_line":""},{"line_number":232,"context_line":""}],"source_content_type":"text/x-python","patch_set":7,"id":"AAAAUH%2F%2BvHY%3D","line":229,"updated":"2014-01-22 17:07:59.000000000","message":"not sure if it\u0027s needed given that one of parents classes has config reset in its tearDown(). Please correct me if I\u0027m wrong. Applies for below classes also","commit_id":"a531b31d28b1521c2327b8bcc293ab691fcab215"},{"author":{"_account_id":5572,"name":"Don Kehn","display_name":"DEKehn","email":"dekehn@gmail.com","username":"dekehn"},"change_message_id":"d9e0793046cbe4347412fae5a530464063f549a2","unresolved":false,"context_lines":[{"line_number":197,"context_line":"                                                slave_port_id])"},{"line_number":198,"context_line":""},{"line_number":199,"context_line":"    def test_router_ha_op_agent(self):"},{"line_number":200,"context_line":"        l3_rpc_agent_api_str \u003d ("},{"line_number":201,"context_line":"            \u0027neutron.api.rpc.agentnotifiers.l3_rpc_agent_api.L3AgentNotifyAPI\u0027)"},{"line_number":202,"context_line":""},{"line_number":203,"context_line":"        plugin \u003d manager.NeutronManager.get_service_plugins()["}],"source_content_type":"text/x-python","patch_set":8,"id":"AAAAUH%2F%2BNxg%3D","line":200,"updated":"2014-01-29 00:41:46.000000000","message":"never used.","commit_id":"8bce8708fb9bb43fe279af0a36acc71e1d69a7fb"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"f6ace64e3204d6290b3de69adc5fb20f4f387456","unresolved":false,"context_lines":[{"line_number":43,"context_line":"        attr_map \u003d attributes.RESOURCE_ATTRIBUTE_MAP"},{"line_number":44,"context_line":"        attr_map.update(l3.RESOURCE_ATTRIBUTE_MAP)"},{"line_number":45,"context_line":"        extended_attrs \u003d l3_ext_ha_mode.EXTENDED_ATTRIBUTES_2_0"},{"line_number":46,"context_line":"        for resource, resource_attrs in extended_attrs.iteritems():"},{"line_number":47,"context_line":"            if attr_map.get(resource, None):"},{"line_number":48,"context_line":"                attr_map[resource].update(resource_attrs)"},{"line_number":49,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":35,"id":"AAAAXH%2F%2FDtM%3D","line":46,"updated":"2014-04-24 10:12:01.000000000","message":"nit: using .items() although it\u0027s not the same for python 2.7 might be better for py3 compatibility","commit_id":"a3fbab16d1c099ee9ff8fc5b47a2629cf0a1a0df"},{"author":{"_account_id":6072,"name":"Eugene Nikanorov","email":"enikanorov@mirantis.com","username":"enikanorov"},"change_message_id":"f6ace64e3204d6290b3de69adc5fb20f4f387456","unresolved":false,"context_lines":[{"line_number":44,"context_line":"        attr_map.update(l3.RESOURCE_ATTRIBUTE_MAP)"},{"line_number":45,"context_line":"        extended_attrs \u003d l3_ext_ha_mode.EXTENDED_ATTRIBUTES_2_0"},{"line_number":46,"context_line":"        for resource, resource_attrs in extended_attrs.iteritems():"},{"line_number":47,"context_line":"            if attr_map.get(resource, None):"},{"line_number":48,"context_line":"                attr_map[resource].update(resource_attrs)"},{"line_number":49,"context_line":"            else:"},{"line_number":50,"context_line":"                attr_map[resource] \u003d resource_attrs"}],"source_content_type":"text/x-python","patch_set":35,"id":"AAAAXH%2F%2FDt0%3D","line":47,"updated":"2014-04-24 10:12:01.000000000","message":"nit: None is default parameter in get(), so is unnecessary","commit_id":"a3fbab16d1c099ee9ff8fc5b47a2629cf0a1a0df"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"36af3f9a8a8ca690eda5a18b0f344aad7c6ac546","unresolved":false,"context_lines":[{"line_number":39,"context_line":"_uuid \u003d uuidutils.generate_uuid"},{"line_number":40,"context_line":"_get_path \u003d test_api_v2._get_path"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"class L3HATestExtensionManager(object):"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"    def get_resources(self):"}],"source_content_type":"text/x-python","patch_set":39,"id":"baada198_8d837ccb","line":42,"updated":"2014-07-10 14:25:49.000000000","message":"I think the filename should be test_l3_ha_plugin and not test_extension? This seems to be in-line with the other service plugins.","commit_id":"e04dff1c37390051469829495a2632b5ef4ddbb0"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"change_message_id":"f0b53dfab9e6a6236ebc25e63677f1b2c60c3d04","unresolved":false,"context_lines":[{"line_number":39,"context_line":"_uuid \u003d uuidutils.generate_uuid"},{"line_number":40,"context_line":"_get_path \u003d test_api_v2._get_path"},{"line_number":41,"context_line":""},{"line_number":42,"context_line":""},{"line_number":43,"context_line":"class L3HATestExtensionManager(object):"},{"line_number":44,"context_line":""},{"line_number":45,"context_line":"    def get_resources(self):"}],"source_content_type":"text/x-python","patch_set":39,"id":"baada198_3cd8b9ee","line":42,"in_reply_to":"baada198_8d837ccb","updated":"2014-07-18 18:31:34.000000000","message":"It is an extension of the l3 plugin, so seems to be in-line with the other extensions ?","commit_id":"e04dff1c37390051469829495a2632b5ef4ddbb0"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"36af3f9a8a8ca690eda5a18b0f344aad7c6ac546","unresolved":false,"context_lines":[{"line_number":87,"context_line":""},{"line_number":88,"context_line":"class L3HATestCaseMixin(test_l3_plugin.L3NatTestCaseMixin):"},{"line_number":89,"context_line":"    fmt \u003d \u0027json\u0027"},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"    @contextlib.contextmanager"},{"line_number":92,"context_line":"    def ha_router(self, name\u003d\u0027router1\u0027, admin_state_up\u003dTrue,"},{"line_number":93,"context_line":"                  fmt\u003dNone, tenant_id\u003d_uuid(),"}],"source_content_type":"text/x-python","patch_set":39,"id":"baada198_c3a2a399","line":90,"updated":"2014-07-10 14:25:49.000000000","message":"We\u0027re trying to move away with context manager based resource allocation since the DB is cleaned after every test anyway, the delete API call is unnecessary. Could you re-implement create_ha_router as a regular method?\n\nAdditionally the function can be simplified by changing it to one line:\nreturn self._make_router(fmt or self.fmt, tenant_id, name,\n                         admin_state_up, external_gateway_info,\n                         set_context, ha\u003dha, arg_list\u003d(\u0027ha\u0027,),\n                         **kwargs)\n\n(All unit tests pass with this change)","commit_id":"e04dff1c37390051469829495a2632b5ef4ddbb0"},{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"change_message_id":"f0b53dfab9e6a6236ebc25e63677f1b2c60c3d04","unresolved":false,"context_lines":[{"line_number":87,"context_line":""},{"line_number":88,"context_line":"class L3HATestCaseMixin(test_l3_plugin.L3NatTestCaseMixin):"},{"line_number":89,"context_line":"    fmt \u003d \u0027json\u0027"},{"line_number":90,"context_line":""},{"line_number":91,"context_line":"    @contextlib.contextmanager"},{"line_number":92,"context_line":"    def ha_router(self, name\u003d\u0027router1\u0027, admin_state_up\u003dTrue,"},{"line_number":93,"context_line":"                  fmt\u003dNone, tenant_id\u003d_uuid(),"}],"source_content_type":"text/x-python","patch_set":39,"id":"baada198_6f86e3ba","line":90,"in_reply_to":"baada198_c3a2a399","updated":"2014-07-18 18:31:34.000000000","message":"Done","commit_id":"e04dff1c37390051469829495a2632b5ef4ddbb0"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"498f1b9cadcfed252dc3ae1e3a0383b6d51b8cd3","unresolved":false,"context_lines":[{"line_number":39,"context_line":"_get_path \u003d test_api_v2._get_path"},{"line_number":40,"context_line":""},{"line_number":41,"context_line":""},{"line_number":42,"context_line":"class L3HATestExtensionManager(object):"},{"line_number":43,"context_line":""},{"line_number":44,"context_line":"    def get_resources(self):"},{"line_number":45,"context_line":"        attr_map \u003d attributes.RESOURCE_ATTRIBUTE_MAP"}],"source_content_type":"text/x-python","patch_set":52,"id":"baada198_bd232057","line":42,"updated":"2014-07-30 16:05:38.000000000","message":"I am slightly concerned on these tests. For existing functionality I guess it\u0027s okay to tolerate the usual way of exercising the code, however for new functionality, like this one, I find it really hard to justify why we don\u0027t just test the units rather than pulling everything together (and even worse duplicating code) like it\u0027s been done here. I am sure I am not the only one who feel this way, I am sure Maru, Carl and other cores feel the same way.","commit_id":"a4ad542c6155ebae0de684cda0d2d62340ecb727"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"498f1b9cadcfed252dc3ae1e3a0383b6d51b8cd3","unresolved":false,"context_lines":[{"line_number":376,"context_line":"                                          return_value\u003d[1, 2, 3])"},{"line_number":377,"context_line":"        self.get_l3_agents_p.start()"},{"line_number":378,"context_line":""},{"line_number":379,"context_line":"    def tearDown(self):"},{"line_number":380,"context_line":"        self.notify_ha_p.stop()"},{"line_number":381,"context_line":"        self.get_l3_agents_p.stop()"},{"line_number":382,"context_line":"        self.restore_backup_attribute_map()"}],"source_content_type":"text/x-python","patch_set":52,"id":"baada198_aa31180c","line":379,"updated":"2014-07-30 16:05:38.000000000","message":"we should use addCleanup instead, here and everywhere else.","commit_id":"a4ad542c6155ebae0de684cda0d2d62340ecb727"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"5cd2bf9c2a7c0388f60bde57ee4fb48a91644423","unresolved":false,"context_lines":[{"line_number":412,"context_line":"                                          return_value\u003d[1, 2, 3])"},{"line_number":413,"context_line":"        self.get_l3_agents_p.start()"},{"line_number":414,"context_line":""},{"line_number":415,"context_line":"    def tearDown(self):"},{"line_number":416,"context_line":"        self.notify_ha_p.stop()"},{"line_number":417,"context_line":"        self.get_l3_agents_p.stop()"},{"line_number":418,"context_line":"        self.restore_backup_attribute_map()"}],"source_content_type":"text/x-python","patch_set":52,"id":"baada198_5dd3e400","line":415,"updated":"2014-07-30 16:09:07.000000000","message":"ditto","commit_id":"a4ad542c6155ebae0de684cda0d2d62340ecb727"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"5cd2bf9c2a7c0388f60bde57ee4fb48a91644423","unresolved":false,"context_lines":[{"line_number":451,"context_line":"                                          return_value\u003d[1, 2, 3])"},{"line_number":452,"context_line":"        self.get_l3_agents_p.start()"},{"line_number":453,"context_line":""},{"line_number":454,"context_line":"    def tearDown(self):"},{"line_number":455,"context_line":"        self.get_l3_agents_p.stop()"},{"line_number":456,"context_line":"        self.restore_backup_attribute_map()"},{"line_number":457,"context_line":"        super(L3HAAgentDbSepTestCase, self).tearDown()"}],"source_content_type":"text/x-python","patch_set":52,"id":"baada198_3dd8f01d","line":454,"updated":"2014-07-30 16:09:07.000000000","message":"ditto","commit_id":"a4ad542c6155ebae0de684cda0d2d62340ecb727"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"5cd2bf9c2a7c0388f60bde57ee4fb48a91644423","unresolved":false,"context_lines":[{"line_number":484,"context_line":"                                          return_value\u003d[1, 2, 3])"},{"line_number":485,"context_line":"        self.get_l3_agents_p.start()"},{"line_number":486,"context_line":""},{"line_number":487,"context_line":"    def tearDown(self):"},{"line_number":488,"context_line":"        self.get_l3_agents_p.stop()"},{"line_number":489,"context_line":"        self.restore_backup_attribute_map()"},{"line_number":490,"context_line":"        super(L3HAAgentDbIntTestCase, self).tearDown()"}],"source_content_type":"text/x-python","patch_set":52,"id":"baada198_1dc96c51","line":487,"updated":"2014-07-30 16:09:07.000000000","message":"ditto","commit_id":"a4ad542c6155ebae0de684cda0d2d62340ecb727"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"5cd2bf9c2a7c0388f60bde57ee4fb48a91644423","unresolved":false,"context_lines":[{"line_number":503,"context_line":""},{"line_number":504,"context_line":""},{"line_number":505,"context_line":"class L3HADBIntTestCaseXML(L3HADBIntTestCase):"},{"line_number":506,"context_line":"    fmt \u003d \u0027xml\u0027"},{"line_number":507,"context_line":""},{"line_number":508,"context_line":""},{"line_number":509,"context_line":"class L3HADBSepTestCaseXML(L3HADBSepTestCase):"}],"source_content_type":"text/x-python","patch_set":52,"id":"baada198_fdcd985f","line":506,"updated":"2014-07-30 16:09:07.000000000","message":"Have we ever cared about xml? I think Tempest is also moving away from testing it. That\u0027s not a pan-project direction to follow...but I hate to run these tests twice, it makes the whole thing last twice no good reason.","commit_id":"a4ad542c6155ebae0de684cda0d2d62340ecb727"}],"neutron/tests/unit/test_l3_plugin.py":[{"author":{"_account_id":7141,"name":"Sylvain Afchain","email":"safchain@redhat.com","username":"sylvainA"},"change_message_id":"9d1a3d6c53e18223ed73c83e7a8b8172ca38f19e","unresolved":false,"context_lines":[{"line_number":1934,"context_line":""},{"line_number":1935,"context_line":"class L3BaseForSepTests(test_db_plugin.NeutronDbPluginV2TestCase):"},{"line_number":1936,"context_line":""},{"line_number":1937,"context_line":"    def setUp(self, plugin\u003dNone, ext_mgr\u003dNone, service_plugins\u003dNone):"},{"line_number":1938,"context_line":"        # the plugin without L3 support"},{"line_number":1939,"context_line":"        if not plugin:"},{"line_number":1940,"context_line":"            plugin \u003d \u0027neutron.tests.unit.test_l3_plugin.TestNoL3NatPlugin\u0027"}],"source_content_type":"text/x-python","patch_set":53,"id":"baada198_3fdfd239","line":1937,"updated":"2014-07-31 19:15:37.000000000","message":"unrelated change, will revert it","commit_id":"2e3b143ef718a007b741eb44f306e0e1652093ce"}]}
