)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"63cf1bc19d5712fed39fbf2e64200a830c56d827","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     venkata anil \u003canilvenkata@redhat.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2016-05-31 13:40:12 +0000"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"multiple port bindings for HA ports"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"We create multiple port bindings for HA router ports in DB."},{"line_number":10,"context_line":"In this change, we make current DVR port binding implementation"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"9abb7d3a_600b0e8f","line":7,"updated":"2016-05-31 14:19:53.000000000","message":"I think that the commit message explains the \u0027what\u0027 but not the \u0027why\u0027.","commit_id":"d79e0c2067596b7de1a6821c04af7a2347563516"},{"author":{"_account_id":10267,"name":"venkata anil","email":"anilvenkata@redhat.com","username":"anil"},"change_message_id":"3a6dd1fecb68dec795eac0a2c81ff2522a03a830","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     venkata anil \u003canilvenkata@redhat.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2016-05-31 13:40:12 +0000"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"multiple port bindings for HA ports"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"We create multiple port bindings for HA router ports in DB."},{"line_number":10,"context_line":"In this change, we make current DVR port binding implementation"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"9abb7d3a_2b06c21f","line":7,"in_reply_to":"9abb7d3a_600b0e8f","updated":"2016-06-01 16:02:15.000000000","message":"I will update.","commit_id":"d79e0c2067596b7de1a6821c04af7a2347563516"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"63cf1bc19d5712fed39fbf2e64200a830c56d827","unresolved":false,"context_lines":[{"line_number":18,"context_line":"2) When agent binds distributed port, an entry with agent will be"},{"line_number":19,"context_line":"   added to table \u0027ml2_dvr_port_bindings\u0027."},{"line_number":20,"context_line":"In this change, we are using table \u0027ml2_dvr_port_bindings\u0027 to store"},{"line_number":21,"context_line":"HA router ports also. We need to rename this table to"},{"line_number":22,"context_line":"\u0027ml2_distributed_port_bindings\u0027, so that all distributed ports"},{"line_number":23,"context_line":"(DVR, HA ..) can use this table."},{"line_number":24,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"9abb7d3a_00d4c2e9","line":21,"updated":"2016-05-31 14:19:53.000000000","message":"I\u0027m not sure we\u0027re OK with renaming tables at this point. Please talk to Ihar about this.","commit_id":"d79e0c2067596b7de1a6821c04af7a2347563516"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"7ef78ce4fe296969ae6c451955528fe91e24df2d","unresolved":false,"context_lines":[{"line_number":18,"context_line":"2) When agent binds distributed port, an entry with agent will be"},{"line_number":19,"context_line":"   added to table \u0027ml2_dvr_port_bindings\u0027."},{"line_number":20,"context_line":"In this change, we are using table \u0027ml2_dvr_port_bindings\u0027 to store"},{"line_number":21,"context_line":"HA router ports also. We need to rename this table to"},{"line_number":22,"context_line":"\u0027ml2_distributed_port_bindings\u0027, so that all distributed ports"},{"line_number":23,"context_line":"(DVR, HA ..) can use this table."},{"line_number":24,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"9abb7d3a_9af5ba58","line":21,"in_reply_to":"9abb7d3a_00d4c2e9","updated":"2016-05-31 14:56:07.000000000","message":"For now, we allow that. In the future, we may forbid it (or better: we will enforce a rolling approach to rename them). So rush with your change. ;)","commit_id":"d79e0c2067596b7de1a6821c04af7a2347563516"},{"author":{"_account_id":10267,"name":"venkata anil","email":"anilvenkata@redhat.com","username":"anil"},"change_message_id":"3a6dd1fecb68dec795eac0a2c81ff2522a03a830","unresolved":false,"context_lines":[{"line_number":18,"context_line":"2) When agent binds distributed port, an entry with agent will be"},{"line_number":19,"context_line":"   added to table \u0027ml2_dvr_port_bindings\u0027."},{"line_number":20,"context_line":"In this change, we are using table \u0027ml2_dvr_port_bindings\u0027 to store"},{"line_number":21,"context_line":"HA router ports also. We need to rename this table to"},{"line_number":22,"context_line":"\u0027ml2_distributed_port_bindings\u0027, so that all distributed ports"},{"line_number":23,"context_line":"(DVR, HA ..) can use this table."},{"line_number":24,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"9abb7d3a_c6f72dd1","line":21,"in_reply_to":"9abb7d3a_9af5ba58","updated":"2016-06-01 16:02:15.000000000","message":"proposed https://review.openstack.org/#/c/323993/ for renaming table.","commit_id":"d79e0c2067596b7de1a6821c04af7a2347563516"},{"author":{"_account_id":8873,"name":"Assaf Muller","email":"amuller@redhat.com","username":"amuller"},"change_message_id":"63cf1bc19d5712fed39fbf2e64200a830c56d827","unresolved":false,"context_lines":[{"line_number":27,"context_line":"It will also simplify l2pop/db.py for HA ports("},{"line_number":28,"context_line":"DEVICE_OWNER_HA_REPLICATED_INT and DEVICE_OWNER_ROUTER_SNAT)"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"Also reverting https://review.openstack.org/#/c/141114/"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"Change-Id: Id5441ae8a759886f88effe0ac98a770626b3e6ee"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"9abb7d3a_40f1aa94","line":30,"updated":"2016-05-31 14:19:53.000000000","message":"Missing a Closes-Bug tag. It\u0027s not clear if the patch aims to solve an issue or is just a refactor. If it\u0027s both, perhaps it should be split.","commit_id":"d79e0c2067596b7de1a6821c04af7a2347563516"},{"author":{"_account_id":10267,"name":"venkata anil","email":"anilvenkata@redhat.com","username":"anil"},"change_message_id":"3a6dd1fecb68dec795eac0a2c81ff2522a03a830","unresolved":false,"context_lines":[{"line_number":27,"context_line":"It will also simplify l2pop/db.py for HA ports("},{"line_number":28,"context_line":"DEVICE_OWNER_HA_REPLICATED_INT and DEVICE_OWNER_ROUTER_SNAT)"},{"line_number":29,"context_line":""},{"line_number":30,"context_line":"Also reverting https://review.openstack.org/#/c/141114/"},{"line_number":31,"context_line":""},{"line_number":32,"context_line":"Change-Id: Id5441ae8a759886f88effe0ac98a770626b3e6ee"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"9abb7d3a_4664ddb7","line":30,"in_reply_to":"9abb7d3a_40f1aa94","updated":"2016-06-01 16:02:15.000000000","message":"Added Partial-Bug: #1522980\nAlso updated the bug description.\nI will split this change into separate refactoring changes and bug fixing changes.","commit_id":"d79e0c2067596b7de1a6821c04af7a2347563516"},{"author":{"_account_id":7448,"name":"Carl Baldwin","email":"carl@ecbaldwin.net","username":"carl-baldwin"},"change_message_id":"922f30f4fca682169f8ce0e94214c5e64aaf4541","unresolved":false,"context_lines":[{"line_number":20,"context_line":"time."},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"To fix this, we follow DVR approach of multiple port binding,"},{"line_number":23,"context_line":"as HA ports are distributed ports like DVR."},{"line_number":24,"context_line":"1) It allows multiple port bindings for distributed port and l2pop"},{"line_number":25,"context_line":"   will be notified for each binding to create tunnels to that agent"},{"line_number":26,"context_line":"   while adding router interface. So no need to bind port during HA"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":16,"id":"dada55a8_4702c170","line":23,"range":{"start_line":23,"start_character":34,"end_line":23,"end_character":42},"updated":"2016-07-22 20:25:18.000000000","message":"Not really. I\u0027m not saying multiple port binding is not appropriate here but they aren\u0027t distributed ports like DVR.\n\nDVR ports are active everywhere at the same time. These HA ports aren\u0027t active everywhere. There should only be one active location for an HA port at any given time.\n\nActually, this HA multiple port binding scenario is a lot more like the proposal to do multiple port binding for live migration scenario than it is like DVR. I\u0027d like to see some discussion about how these two use cases compare.\n\n [1] https://review.openstack.org/#/c/309416/","commit_id":"2b44804e62a00e3d32f351deabc6ee93a02dbd91"},{"author":{"_account_id":10267,"name":"venkata anil","email":"anilvenkata@redhat.com","username":"anil"},"change_message_id":"d2294522f18b7c2a1fcbc45073535fe4bcfcde50","unresolved":false,"context_lines":[{"line_number":20,"context_line":"time."},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"To fix this, we follow DVR approach of multiple port binding,"},{"line_number":23,"context_line":"as HA ports are distributed ports like DVR."},{"line_number":24,"context_line":"1) It allows multiple port bindings for distributed port and l2pop"},{"line_number":25,"context_line":"   will be notified for each binding to create tunnels to that agent"},{"line_number":26,"context_line":"   while adding router interface. So no need to bind port during HA"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":16,"id":"dada55a8_47063821","line":23,"range":{"start_line":23,"start_character":34,"end_line":23,"end_character":42},"in_reply_to":"dada55a8_4702c170","updated":"2016-07-23 04:14:11.000000000","message":"Thanks Carl.\nFor DVR ports, l2pop creates only flood flows and no unicast flows between hosts. We have same requirement in HA i.e for HA ports, l2pop should create only flood flows and no unicast flows(please see [1] for complete explanation).\nFlood flows to all HA router nodes should always exist and shouldn\u0027t change during failover i.e\nHA port binding and port status update(and l2pop processing) should happen only \n   a) when router scheduled on agents(interface added or delete)\n   b) when router added to new agent or deleted from existing agent\nand not during failover.\n\nDVR also does port binding/status update(and l2pop processing) only during router scheduling on agents, so we use existing DVR approach.\n\nThis is not for live migration scenario. As you know, to differentiate DVR ports during binding and status update, we use device_owner. Instead in all these 3 patches, we use vif_type(\u003ddistributed). This helps HA to set vif_type to distributed and use this common DVR port binding.\n\nWith this, apart from above[1] requirement, the other advantages are\n1) We can avoid normal port binding for HA. So\nany small changes to this normal port binding(ignoring HA) can break HA, for example [2]. We can avoid tracking and propose fixes like [3] \n2) We can reduce failover time[4] by avoiding - port binding, port update and l2pop processing during failover\n3) avoid races[5], as each agent will have separate port bindings and no need for new patches for HA port binding improvements[6]\n\n[1] https://bugs.launchpad.net/neutron/+bug/1522980\n[2] https://bugs.launchpad.net/neutron/+bug/1590845/comments/8\n[3] https://bugs.launchpad.net/neutron/+bug/1590845/comments/11\n[4] https://bugs.launchpad.net/neutron/+bug/1602614\n[5] https://bugs.launchpad.net/neutron/+bug/1488015\n[6] https://review.openstack.org/#/c/285773/","commit_id":"2b44804e62a00e3d32f351deabc6ee93a02dbd91"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"0eba9209d094d5c99097c622026b4a025ffc01ba","unresolved":false,"context_lines":[{"line_number":20,"context_line":"time."},{"line_number":21,"context_line":""},{"line_number":22,"context_line":"To fix this, we follow DVR approach of multiple port binding,"},{"line_number":23,"context_line":"as HA ports are distributed ports like DVR."},{"line_number":24,"context_line":"1) It allows multiple port bindings for distributed port and l2pop"},{"line_number":25,"context_line":"   will be notified for each binding to create tunnels to that agent"},{"line_number":26,"context_line":"   while adding router interface. So no need to bind port during HA"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":16,"id":"dada55a8_9431e5a4","line":23,"range":{"start_line":23,"start_character":34,"end_line":23,"end_character":42},"in_reply_to":"dada55a8_47063821","updated":"2016-07-27 11:31:16.000000000","message":"Based on anil\u0027s comments it seems DVR and HA ports are very similar in the l2pop areas, and while an HA port won\u0027t be fully active in two hosts at the same time, that\u0027s a detail which can be handled by the router while network dataplane (beyond IP address enablement or not in the interface) details remain unchanged.","commit_id":"2b44804e62a00e3d32f351deabc6ee93a02dbd91"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"48fa93bf0d1cf626fc4632de21e8a65a9d49272e","unresolved":false,"context_lines":[{"line_number":24,"context_line":"1) It allows multiple port bindings for distributed port and l2pop"},{"line_number":25,"context_line":"   will be notified for each binding to create tunnels to that agent"},{"line_number":26,"context_line":"   while adding router interface. So no need to bind port during HA"},{"line_number":27,"context_line":"   router state transition, hence reverting"},{"line_number":28,"context_line":"   https://review.openstack.org/#/c/141114/"},{"line_number":29,"context_line":"2) When agents restarted, or router added to new agent( or removed"},{"line_number":30,"context_line":"   from agent) l2pop will be notified and flows are updated properly."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":16,"id":"dada55a8_73aa2787","line":27,"updated":"2016-07-22 22:13:25.000000000","message":"So this will break ToR drivers that wire based on host_id (e.g. big switch and arista)?","commit_id":"2b44804e62a00e3d32f351deabc6ee93a02dbd91"},{"author":{"_account_id":10267,"name":"venkata anil","email":"anilvenkata@redhat.com","username":"anil"},"change_message_id":"0e1c011f5fd981462e3eb20f1019db634945b4ad","unresolved":false,"context_lines":[{"line_number":24,"context_line":"1) It allows multiple port bindings for distributed port and l2pop"},{"line_number":25,"context_line":"   will be notified for each binding to create tunnels to that agent"},{"line_number":26,"context_line":"   while adding router interface. So no need to bind port during HA"},{"line_number":27,"context_line":"   router state transition, hence reverting"},{"line_number":28,"context_line":"   https://review.openstack.org/#/c/141114/"},{"line_number":29,"context_line":"2) When agents restarted, or router added to new agent( or removed"},{"line_number":30,"context_line":"   from agent) l2pop will be notified and flows are updated properly."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":16,"id":"dada55a8_6d633142","line":27,"in_reply_to":"dada55a8_22bb3210","updated":"2016-07-25 14:20:28.000000000","message":"ovs agent will setup only flood flows on br-tun and it won\u0027t setup unicast flows. As you know, we have learning flow in table 10. When keepalived adds ip address to master router\u0027s qr-xx port, it also sends garp. Now ovs agent\u0027s learning action of table 10, will create  flow in table 20 pointing to the new master router\u0027s node.\n\nWith this, we still will have unicast and multicast flows (but not added by ovs agent during failover.)","commit_id":"2b44804e62a00e3d32f351deabc6ee93a02dbd91"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"f765b700990ffbea24dbb453505cfdd5b418166b","unresolved":false,"context_lines":[{"line_number":24,"context_line":"1) It allows multiple port bindings for distributed port and l2pop"},{"line_number":25,"context_line":"   will be notified for each binding to create tunnels to that agent"},{"line_number":26,"context_line":"   while adding router interface. So no need to bind port during HA"},{"line_number":27,"context_line":"   router state transition, hence reverting"},{"line_number":28,"context_line":"   https://review.openstack.org/#/c/141114/"},{"line_number":29,"context_line":"2) When agents restarted, or router added to new agent( or removed"},{"line_number":30,"context_line":"   from agent) l2pop will be notified and flows are updated properly."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":16,"id":"dada55a8_bba69f0c","line":27,"in_reply_to":"dada55a8_6d633142","updated":"2016-07-27 06:46:08.000000000","message":"these backends statically configure forwarding entries based on which host_id an IP/mac is bound to. IIUC, your change will no longer update the port\u0027s host_id when a failover occurs, so there is no compatibility with static flow configuration because the backend doesn\u0027t know to move the port rules.","commit_id":"2b44804e62a00e3d32f351deabc6ee93a02dbd91"},{"author":{"_account_id":10267,"name":"venkata anil","email":"anilvenkata@redhat.com","username":"anil"},"change_message_id":"22590e5434e233cf9e2accfac74dab756a6f33ca","unresolved":false,"context_lines":[{"line_number":24,"context_line":"1) It allows multiple port bindings for distributed port and l2pop"},{"line_number":25,"context_line":"   will be notified for each binding to create tunnels to that agent"},{"line_number":26,"context_line":"   while adding router interface. So no need to bind port during HA"},{"line_number":27,"context_line":"   router state transition, hence reverting"},{"line_number":28,"context_line":"   https://review.openstack.org/#/c/141114/"},{"line_number":29,"context_line":"2) When agents restarted, or router added to new agent( or removed"},{"line_number":30,"context_line":"   from agent) l2pop will be notified and flows are updated properly."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":16,"id":"dada55a8_22bb3210","line":27,"in_reply_to":"dada55a8_73aa2787","updated":"2016-07-23 04:46:45.000000000","message":"We are not doing any changes on l2 agent. \n\nwith this approach, all l3 HA agents will create and plug the port to br-int(same as existing approach). L2 agents will wire as usual(like existing approach) i.e processing of rpc_loop in ovs_neutron_agent.py will be same.\n\nOnly L2 agent\u0027s l2pop processing(i.e creating ovs flows and setup tunnel ports) will change.\nEarlier, as the port was treated like a regular port, ovs agent will be getting both unicast and flood entries from l2pop driver. \nWith this patch, like DVR, l2 agent will get only flood entries and no unicast entries for HA router port from l2pop driver. L2 agent will then setup tunnel ports and create flood flows(no unicast flows are created on the bridge).\n\nI am not familiar with \"ToR drivers that wire based on host_id\"? Can you kindly explain?\n\nThough flood flows always exist to all HA agents, only master HA router will have actual interfaces up and will respond to arp requests. External switches can always update its entries to master HA router.","commit_id":"2b44804e62a00e3d32f351deabc6ee93a02dbd91"},{"author":{"_account_id":10267,"name":"venkata anil","email":"anilvenkata@redhat.com","username":"anil"},"change_message_id":"352cd9a95e5b53a4d64bb42aa62d963cd4ccb6e6","unresolved":false,"context_lines":[{"line_number":24,"context_line":"1) It allows multiple port bindings for distributed port and l2pop"},{"line_number":25,"context_line":"   will be notified for each binding to create tunnels to that agent"},{"line_number":26,"context_line":"   while adding router interface. So no need to bind port during HA"},{"line_number":27,"context_line":"   router state transition, hence reverting"},{"line_number":28,"context_line":"   https://review.openstack.org/#/c/141114/"},{"line_number":29,"context_line":"2) When agents restarted, or router added to new agent( or removed"},{"line_number":30,"context_line":"   from agent) l2pop will be notified and flows are updated properly."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":16,"id":"dada55a8_c3b1dc48","line":27,"in_reply_to":"dada55a8_74755130","updated":"2016-07-27 12:05:47.000000000","message":"Thanks Miguel. I am working on Kevin\u0027s suggestion.","commit_id":"2b44804e62a00e3d32f351deabc6ee93a02dbd91"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"0eba9209d094d5c99097c622026b4a025ffc01ba","unresolved":false,"context_lines":[{"line_number":24,"context_line":"1) It allows multiple port bindings for distributed port and l2pop"},{"line_number":25,"context_line":"   will be notified for each binding to create tunnels to that agent"},{"line_number":26,"context_line":"   while adding router interface. So no need to bind port during HA"},{"line_number":27,"context_line":"   router state transition, hence reverting"},{"line_number":28,"context_line":"   https://review.openstack.org/#/c/141114/"},{"line_number":29,"context_line":"2) When agents restarted, or router added to new agent( or removed"},{"line_number":30,"context_line":"   from agent) l2pop will be notified and flows are updated properly."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":16,"id":"dada55a8_74755130","line":27,"in_reply_to":"dada55a8_bba69f0c","updated":"2016-07-27 11:31:16.000000000","message":"Then, we may probably update the host_id, while encouraging those vendors to update their implementations in a more responsive way (learning from ARP responses and RARP messages, and expecting packets from a port in any of the switch ports where it could be bound)\n\n\nKevin, how do those solutions work in the case of a live migration?, they won\u0027t accept packets from the VM at destination until the port host_id changed?","commit_id":"2b44804e62a00e3d32f351deabc6ee93a02dbd91"}],"neutron/api/rpc/handlers/l3_rpc.py":[{"author":{"_account_id":10267,"name":"venkata anil","email":"anilvenkata@redhat.com","username":"anil"},"change_message_id":"830980d64228f403107b4f7640323effa8577822","unresolved":false,"context_lines":[{"line_number":171,"context_line":"            # they are unbound. These ports are moved when an agent reports"},{"line_number":172,"context_line":"            # that one of its routers moved to the active state."},{"line_number":173,"context_line":"            else:"},{"line_number":174,"context_line":"                if not port.get(portbindings.HOST_ID):"},{"line_number":175,"context_line":"                    active_host \u003d ("},{"line_number":176,"context_line":"                        self.l3plugin.get_active_host_for_ha_router("},{"line_number":177,"context_line":"                            context, router_id))"}],"source_content_type":"text/x-python","patch_set":1,"id":"9abb7d3a_8144411b","line":174,"updated":"2016-05-31 12:00:38.000000000","message":"Need to remove separate HA handling as L194 will take care of HA also.","commit_id":"506c253ea7ac62447403a5908d8ab19102e54460"}],"neutron/db/migration/alembic_migrations/versions/newton/contract/c7722426a78c_change_ha_vif_type_to_distributed.py":[{"author":{"_account_id":7249,"name":"Ann Taraday","email":"akamyshnikova@mirantis.com","username":"AKamyshnikova"},"change_message_id":"5e62a82705aa7a1010bfc0120b1f1c2503c79c22","unresolved":false,"context_lines":[{"line_number":86,"context_line":"            for port in session.query(ports_table).filter("},{"line_number":87,"context_line":"                    ports_table.c.device_id \u003d\u003d router_attr.router_id,"},{"line_number":88,"context_line":"                    ports_table.c.device_owner.in_(HA_DISTRIBUTED_PORTS)):"},{"line_number":89,"context_line":"                print(\"port\u003d\", port)"},{"line_number":90,"context_line":"                bind \u003d session.query(port_binding).filter("},{"line_number":91,"context_line":"                    port_binding.c.port_id \u003d\u003d port.id).one()"},{"line_number":92,"context_line":"                session.execute(distributed_port_binding.insert().values("}],"source_content_type":"text/x-python","patch_set":7,"id":"7aa08908_5f303f56","line":89,"range":{"start_line":89,"start_character":16,"end_line":89,"end_character":36},"updated":"2016-06-14 10:47:37.000000000","message":"LOG?","commit_id":"2f606211355228abf51be197809b88e34fa0cd6d"},{"author":{"_account_id":10267,"name":"venkata anil","email":"anilvenkata@redhat.com","username":"anil"},"change_message_id":"b00378fa413bb81e15b7ffd9142702cb711dee6b","unresolved":false,"context_lines":[{"line_number":86,"context_line":"            for port in session.query(ports_table).filter("},{"line_number":87,"context_line":"                    ports_table.c.device_id \u003d\u003d router_attr.router_id,"},{"line_number":88,"context_line":"                    ports_table.c.device_owner.in_(HA_DISTRIBUTED_PORTS)):"},{"line_number":89,"context_line":"                print(\"port\u003d\", port)"},{"line_number":90,"context_line":"                bind \u003d session.query(port_binding).filter("},{"line_number":91,"context_line":"                    port_binding.c.port_id \u003d\u003d port.id).one()"},{"line_number":92,"context_line":"                session.execute(distributed_port_binding.insert().values("}],"source_content_type":"text/x-python","patch_set":7,"id":"7aa08908_6a13a965","line":89,"range":{"start_line":89,"start_character":16,"end_line":89,"end_character":36},"in_reply_to":"7aa08908_5f303f56","updated":"2016-06-14 12:52:08.000000000","message":"mistake :)","commit_id":"2f606211355228abf51be197809b88e34fa0cd6d"}],"neutron/plugins/ml2/db.py":[{"author":{"_account_id":7249,"name":"Ann Taraday","email":"akamyshnikova@mirantis.com","username":"AKamyshnikova"},"change_message_id":"5e62a82705aa7a1010bfc0120b1f1c2503c79c22","unresolved":false,"context_lines":[{"line_number":295,"context_line":""},{"line_number":296,"context_line":""},{"line_number":297,"context_line":"def is_ha_router(session, router_id):"},{"line_number":298,"context_line":"    with session.begin(subtransactions\u003dTrue):"},{"line_number":299,"context_line":"        return bool(session.query(l3_attrs_db.RouterExtraAttributes)."},{"line_number":300,"context_line":"            filter(l3_attrs_db.RouterExtraAttributes.router_id \u003d\u003d router_id,"},{"line_number":301,"context_line":"                   l3_attrs_db.RouterExtraAttributes.ha \u003d\u003d True).count())"}],"source_content_type":"text/x-python","patch_set":7,"id":"7aa08908_d60d31e9","line":298,"range":{"start_line":298,"start_character":4,"end_line":298,"end_character":45},"updated":"2016-06-14 10:47:37.000000000","message":"I don\u0027t think you need session.begin here","commit_id":"2f606211355228abf51be197809b88e34fa0cd6d"},{"author":{"_account_id":10267,"name":"venkata anil","email":"anilvenkata@redhat.com","username":"anil"},"change_message_id":"b00378fa413bb81e15b7ffd9142702cb711dee6b","unresolved":false,"context_lines":[{"line_number":295,"context_line":""},{"line_number":296,"context_line":""},{"line_number":297,"context_line":"def is_ha_router(session, router_id):"},{"line_number":298,"context_line":"    with session.begin(subtransactions\u003dTrue):"},{"line_number":299,"context_line":"        return bool(session.query(l3_attrs_db.RouterExtraAttributes)."},{"line_number":300,"context_line":"            filter(l3_attrs_db.RouterExtraAttributes.router_id \u003d\u003d router_id,"},{"line_number":301,"context_line":"                   l3_attrs_db.RouterExtraAttributes.ha \u003d\u003d True).count())"}],"source_content_type":"text/x-python","patch_set":7,"id":"7aa08908_8d242f60","line":298,"range":{"start_line":298,"start_character":4,"end_line":298,"end_character":45},"in_reply_to":"7aa08908_d60d31e9","updated":"2016-06-14 12:52:08.000000000","message":"It is required. \n\"is_ha_router\" is called while creating snat port for DVR router. If I don\u0027t use this, existing session(i.e session for snat port create) is getting deleted, and eventually port is not created in DB.","commit_id":"2f606211355228abf51be197809b88e34fa0cd6d"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"59db4d9b0af50b437773b75e58e59927df6787df","unresolved":false,"context_lines":[{"line_number":307,"context_line":"                filter(models_v2.Subnet.id.in_(subnet_ids)).count())"},{"line_number":308,"context_line":""},{"line_number":309,"context_line":""},{"line_number":310,"context_line":"def is_ha_router(session, router_id):"},{"line_number":311,"context_line":"    with session.begin(subtransactions\u003dTrue):"},{"line_number":312,"context_line":"        return bool(session.query(l3_attrs_db.RouterExtraAttributes)."},{"line_number":313,"context_line":"                    filter_by(ha\u003dTrue)."}],"source_content_type":"text/x-python","patch_set":16,"id":"dada55a8_3a122d63","line":310,"range":{"start_line":310,"start_character":4,"end_line":310,"end_character":16},"updated":"2016-07-24 15:10:14.000000000","message":"neutron.db.l3_hamode_db already has a function called is_ha_router(router_id) (it doesn\u0027t receive session as an argument). This is somewhat very confusing so I suggest you either rename one or remove one :)","commit_id":"2b44804e62a00e3d32f351deabc6ee93a02dbd91"},{"author":{"_account_id":10267,"name":"venkata anil","email":"anilvenkata@redhat.com","username":"anil"},"change_message_id":"4af4c9c9257a35ed1aba4fdb548db564accc8be7","unresolved":false,"context_lines":[{"line_number":307,"context_line":"                filter(models_v2.Subnet.id.in_(subnet_ids)).count())"},{"line_number":308,"context_line":""},{"line_number":309,"context_line":""},{"line_number":310,"context_line":"def is_ha_router(session, router_id):"},{"line_number":311,"context_line":"    with session.begin(subtransactions\u003dTrue):"},{"line_number":312,"context_line":"        return bool(session.query(l3_attrs_db.RouterExtraAttributes)."},{"line_number":313,"context_line":"                    filter_by(ha\u003dTrue)."}],"source_content_type":"text/x-python","patch_set":16,"id":"dada55a8_ffe6b9e6","line":310,"range":{"start_line":310,"start_character":4,"end_line":310,"end_character":16},"in_reply_to":"dada55a8_3a122d63","updated":"2016-07-25 08:18:45.000000000","message":"is_ha_router(router) in neutron.db.l3_hamode_db takes router DB entry or router dict. \nIn ml2 code I have only router_id. To use the above function\n1) I need to again call l3 api for getting router dict from router id\n2) and then call above function with router dict\n\nInstead I prefer directly accessing the db.","commit_id":"2b44804e62a00e3d32f351deabc6ee93a02dbd91"},{"author":{"_account_id":10267,"name":"venkata anil","email":"anilvenkata@redhat.com","username":"anil"},"change_message_id":"352cd9a95e5b53a4d64bb42aa62d963cd4ccb6e6","unresolved":false,"context_lines":[{"line_number":307,"context_line":"                filter(models_v2.Subnet.id.in_(subnet_ids)).count())"},{"line_number":308,"context_line":""},{"line_number":309,"context_line":""},{"line_number":310,"context_line":"def is_ha_router(session, router_id):"},{"line_number":311,"context_line":"    with session.begin(subtransactions\u003dTrue):"},{"line_number":312,"context_line":"        return bool(session.query(l3_attrs_db.RouterExtraAttributes)."},{"line_number":313,"context_line":"                    filter_by(ha\u003dTrue)."}],"source_content_type":"text/x-python","patch_set":16,"id":"dada55a8_83c884a9","line":310,"range":{"start_line":310,"start_character":4,"end_line":310,"end_character":16},"in_reply_to":"dada55a8_551ac67d","updated":"2016-07-27 12:05:47.000000000","message":"sure, I will update it to  is_router_id_ha.","commit_id":"2b44804e62a00e3d32f351deabc6ee93a02dbd91"},{"author":{"_account_id":8788,"name":"Miguel Angel Ajo","email":"mangelajo@redhat.com","username":"mangelajo"},"change_message_id":"8de234343f35f2cc5ae2db48164b9502e4201522","unresolved":false,"context_lines":[{"line_number":307,"context_line":"                filter(models_v2.Subnet.id.in_(subnet_ids)).count())"},{"line_number":308,"context_line":""},{"line_number":309,"context_line":""},{"line_number":310,"context_line":"def is_ha_router(session, router_id):"},{"line_number":311,"context_line":"    with session.begin(subtransactions\u003dTrue):"},{"line_number":312,"context_line":"        return bool(session.query(l3_attrs_db.RouterExtraAttributes)."},{"line_number":313,"context_line":"                    filter_by(ha\u003dTrue)."}],"source_content_type":"text/x-python","patch_set":16,"id":"dada55a8_551ac67d","line":310,"range":{"start_line":310,"start_character":4,"end_line":310,"end_character":16},"in_reply_to":"dada55a8_ffe6b9e6","updated":"2016-07-27 11:43:18.000000000","message":"May be this function should be move allong with the other one in l3_hamode_db and both be given different names, since they chase different cases.\n\nMay be this one could be is_router_id_ha ?","commit_id":"2b44804e62a00e3d32f351deabc6ee93a02dbd91"}],"neutron/plugins/ml2/plugin.py":[{"author":{"_account_id":10267,"name":"venkata anil","email":"anilvenkata@redhat.com","username":"anil"},"change_message_id":"830980d64228f403107b4f7640323effa8577822","unresolved":false,"context_lines":[{"line_number":318,"context_line":"                {attributes.PORT: {\u0027status\u0027: const.PORT_STATUS_DOWN}})"},{"line_number":319,"context_line":""},{"line_number":320,"context_line":"        if port[\u0027device_owner\u0027] in [const.DEVICE_OWNER_DVR_INTERFACE,"},{"line_number":321,"context_line":"                                    const.DEVICE_OWNER_HA_REPLICATED_INT]:"},{"line_number":322,"context_line":"            binding.vif_type \u003d portbindings.VIF_TYPE_DISTRIBUTED"},{"line_number":323,"context_line":"            binding.vif_details \u003d \u0027\u0027"},{"line_number":324,"context_line":"            db.clear_binding_levels(session, port_id, original_host)"}],"source_content_type":"text/x-python","patch_set":1,"id":"9abb7d3a_41da594d","line":321,"updated":"2016-05-31 12:00:38.000000000","message":"Need to DEVICE_OWNER_ROUTER_SNAT when router is HA+DVR.","commit_id":"506c253ea7ac62447403a5908d8ab19102e54460"},{"author":{"_account_id":10267,"name":"venkata anil","email":"anilvenkata@redhat.com","username":"anil"},"change_message_id":"830980d64228f403107b4f7640323effa8577822","unresolved":false,"context_lines":[{"line_number":521,"context_line":"        port[portbindings.VNIC_TYPE] \u003d binding.vnic_type"},{"line_number":522,"context_line":"        port[portbindings.PROFILE] \u003d self._get_profile(binding)"},{"line_number":523,"context_line":"        if port[\u0027device_owner\u0027] in [const.DEVICE_OWNER_DVR_INTERFACE,"},{"line_number":524,"context_line":"                                    const.DEVICE_OWNER_HA_REPLICATED_INT]:"},{"line_number":525,"context_line":"            port[portbindings.HOST_ID] \u003d \u0027\u0027"},{"line_number":526,"context_line":"            port[portbindings.VIF_TYPE] \u003d portbindings.VIF_TYPE_DISTRIBUTED"},{"line_number":527,"context_line":"            port[portbindings.VIF_DETAILS] \u003d {}"}],"source_content_type":"text/x-python","patch_set":1,"id":"9abb7d3a_c1cda986","line":524,"updated":"2016-05-31 12:00:38.000000000","message":"Need to DEVICE_OWNER_ROUTER_SNAT when router is HA+DVR.","commit_id":"506c253ea7ac62447403a5908d8ab19102e54460"},{"author":{"_account_id":12444,"name":"John Schwarz","email":"jschwarz@redhat.com","username":"jschwarz"},"change_message_id":"59db4d9b0af50b437773b75e58e59927df6787df","unresolved":false,"context_lines":[{"line_number":345,"context_line":"            return True"},{"line_number":346,"context_line":"        elif port[\u0027device_owner\u0027] \u003d\u003d const.DEVICE_OWNER_ROUTER_SNAT:"},{"line_number":347,"context_line":"            return db.is_ha_router(ctx.get_admin_context().session,"},{"line_number":348,"context_line":"                                   port[\u0027device_id\u0027])"},{"line_number":349,"context_line":""},{"line_number":350,"context_line":"    def _bind_port_if_needed(self, context, allow_notify\u003dFalse,"},{"line_number":351,"context_line":"                             need_notify\u003dFalse):"}],"source_content_type":"text/x-python","patch_set":16,"id":"dada55a8_25384e3d","line":348,"updated":"2016-07-24 15:10:14.000000000","message":"Can this please be changed to return False (instead of the implicit None) if none of the conditions above hold? None !\u003d False so it might lead to some future confusion we can avoid now.","commit_id":"2b44804e62a00e3d32f351deabc6ee93a02dbd91"},{"author":{"_account_id":10267,"name":"venkata anil","email":"anilvenkata@redhat.com","username":"anil"},"change_message_id":"4af4c9c9257a35ed1aba4fdb548db564accc8be7","unresolved":false,"context_lines":[{"line_number":345,"context_line":"            return True"},{"line_number":346,"context_line":"        elif port[\u0027device_owner\u0027] \u003d\u003d const.DEVICE_OWNER_ROUTER_SNAT:"},{"line_number":347,"context_line":"            return db.is_ha_router(ctx.get_admin_context().session,"},{"line_number":348,"context_line":"                                   port[\u0027device_id\u0027])"},{"line_number":349,"context_line":""},{"line_number":350,"context_line":"    def _bind_port_if_needed(self, context, allow_notify\u003dFalse,"},{"line_number":351,"context_line":"                             need_notify\u003dFalse):"}],"source_content_type":"text/x-python","patch_set":16,"id":"dada55a8_3ff8517c","line":348,"in_reply_to":"dada55a8_25384e3d","updated":"2016-07-25 08:18:45.000000000","message":"sure, thanks John","commit_id":"2b44804e62a00e3d32f351deabc6ee93a02dbd91"}],"neutron/tests/unit/db/test_db_base_plugin_v2.py":[{"author":{"_account_id":7249,"name":"Ann Taraday","email":"akamyshnikova@mirantis.com","username":"AKamyshnikova"},"change_message_id":"5e62a82705aa7a1010bfc0120b1f1c2503c79c22","unresolved":false,"context_lines":[{"line_number":41,"context_line":"from neutron.common import ipv6_utils"},{"line_number":42,"context_line":"from neutron.common import test_lib"},{"line_number":43,"context_line":"from neutron.common import utils"},{"line_number":44,"context_line":"from neutron.plugins.common import constants as p_const"},{"line_number":45,"context_line":"from neutron import context"},{"line_number":46,"context_line":"from neutron.db import api as db_api"},{"line_number":47,"context_line":"from neutron.db import db_base_plugin_common"}],"source_content_type":"text/x-python","patch_set":7,"id":"7aa08908_36fd95b1","line":44,"range":{"start_line":44,"start_character":0,"end_line":44,"end_character":55},"updated":"2016-06-14 10:47:37.000000000","message":"unrelated?","commit_id":"2f606211355228abf51be197809b88e34fa0cd6d"},{"author":{"_account_id":10267,"name":"venkata anil","email":"anilvenkata@redhat.com","username":"anil"},"change_message_id":"b00378fa413bb81e15b7ffd9142702cb711dee6b","unresolved":false,"context_lines":[{"line_number":41,"context_line":"from neutron.common import ipv6_utils"},{"line_number":42,"context_line":"from neutron.common import test_lib"},{"line_number":43,"context_line":"from neutron.common import utils"},{"line_number":44,"context_line":"from neutron.plugins.common import constants as p_const"},{"line_number":45,"context_line":"from neutron import context"},{"line_number":46,"context_line":"from neutron.db import api as db_api"},{"line_number":47,"context_line":"from neutron.db import db_base_plugin_common"}],"source_content_type":"text/x-python","patch_set":7,"id":"7aa08908_4a334d14","line":44,"range":{"start_line":44,"start_character":0,"end_line":44,"end_character":55},"in_reply_to":"7aa08908_36fd95b1","updated":"2016-06-14 12:52:08.000000000","message":"yes","commit_id":"2f606211355228abf51be197809b88e34fa0cd6d"}]}
