)]}'
{"neutron/db/l3_dvr_db.py":[{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"c496c18c49c64149e420369b6eff20d2f031a088","unresolved":false,"context_lines":[{"line_number":159,"context_line":"                       port_type\u003dconst.DEVICE_OWNER_DVR_INTERFACE)"},{"line_number":160,"context_line":"           )"},{"line_number":161,"context_line":"           for port in int_ports:"},{"line_number":162,"context_line":"               for agent in cur_agents:"},{"line_number":163,"context_line":"                   self._core_plugin.delete_distributed_port_bindings_on_host("},{"line_number":164,"context_line":"                       context.elevated(),"},{"line_number":165,"context_line":"                       router_db[\u0027id\u0027],"}],"source_content_type":"text/x-python","patch_set":1,"id":"7f515b1d_b339b8a4","line":162,"updated":"2017-10-02 18:54:01.000000000","message":"Maybe it\u0027s better to put the check for agent[\u0027host\u0027] here?","commit_id":"afd6ea6ba245359763a9922a2e45ac42cefc5675"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"04af2885085244e112f07b7e506fecccf85f9fd7","unresolved":false,"context_lines":[{"line_number":159,"context_line":"                       port_type\u003dconst.DEVICE_OWNER_DVR_INTERFACE)"},{"line_number":160,"context_line":"           )"},{"line_number":161,"context_line":"           for port in int_ports:"},{"line_number":162,"context_line":"               for agent in cur_agents:"},{"line_number":163,"context_line":"                   self._core_plugin.delete_distributed_port_bindings_on_host("},{"line_number":164,"context_line":"                       context.elevated(),"},{"line_number":165,"context_line":"                       router_db[\u0027id\u0027],"}],"source_content_type":"text/x-python","patch_set":1,"id":"7f515b1d_b962b9ac","line":162,"in_reply_to":"7f515b1d_36581686","updated":"2017-10-02 20:38:38.000000000","message":"Yes, it went along with my comment about port_id in the other file, since the ID is a required field in the port.","commit_id":"afd6ea6ba245359763a9922a2e45ac42cefc5675"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"38c1f1bd5acf8c60a592dab9d0a587b419c4659f","unresolved":false,"context_lines":[{"line_number":159,"context_line":"                       port_type\u003dconst.DEVICE_OWNER_DVR_INTERFACE)"},{"line_number":160,"context_line":"           )"},{"line_number":161,"context_line":"           for port in int_ports:"},{"line_number":162,"context_line":"               for agent in cur_agents:"},{"line_number":163,"context_line":"                   self._core_plugin.delete_distributed_port_bindings_on_host("},{"line_number":164,"context_line":"                       context.elevated(),"},{"line_number":165,"context_line":"                       router_db[\u0027id\u0027],"}],"source_content_type":"text/x-python","patch_set":1,"id":"7f515b1d_36581686","line":162,"in_reply_to":"7f515b1d_b339b8a4","updated":"2017-10-02 20:09:16.000000000","message":"Are you saying if(agent[\u0027host\u0027]) here?","commit_id":"afd6ea6ba245359763a9922a2e45ac42cefc5675"},{"author":{"_account_id":10267,"name":"venkata anil","email":"anilvenkata@redhat.com","username":"anil"},"change_message_id":"26e0ad1b6c95fcf9c5a1353e97d25f9ad6aef26b","unresolved":false,"context_lines":[{"line_number":155,"context_line":"        if is_original_router_distributed:"},{"line_number":156,"context_line":"            int_ports \u003d ("},{"line_number":157,"context_line":"                rp.port for rp in"},{"line_number":158,"context_line":"                router_db.attached_ports.filter_by("},{"line_number":159,"context_line":"                    port_type\u003dconst.DEVICE_OWNER_DVR_INTERFACE)"},{"line_number":160,"context_line":"            )"},{"line_number":161,"context_line":"            for port in int_ports:"}],"source_content_type":"text/x-python","patch_set":2,"id":"7f515b1d_ff4fbf8f","line":158,"updated":"2017-10-04 18:15:47.000000000","message":"We have already updated port_type to DEVICE_OWNER_HA_REPLICATED_INT/DEVICE_OWNER_ROUTER_INTF in lines 140-146. So this query won\u0027t return any ports.","commit_id":"a0907016c81a067404e0fbbc4e6f24c9c32e2d4a"},{"author":{"_account_id":10267,"name":"venkata anil","email":"anilvenkata@redhat.com","username":"anil"},"change_message_id":"6f5f05bcb86f49f4bb4842047c3430504266dff4","unresolved":false,"context_lines":[{"line_number":155,"context_line":"        if is_original_router_distributed:"},{"line_number":156,"context_line":"            int_ports \u003d ("},{"line_number":157,"context_line":"                rp.port for rp in"},{"line_number":158,"context_line":"                router_db.attached_ports.filter_by("},{"line_number":159,"context_line":"                    port_type\u003dconst.DEVICE_OWNER_DVR_INTERFACE)"},{"line_number":160,"context_line":"            )"},{"line_number":161,"context_line":"            for port in int_ports:"}],"source_content_type":"text/x-python","patch_set":2,"id":"7f515b1d_940c2d3c","line":158,"in_reply_to":"7f515b1d_11172ff0","updated":"2017-10-04 18:38:33.000000000","message":"Why do we need to pass port_id and host to delete_distributed_port_bindings_on_host() when we can delete records matching router_id(i.e after migration, router_id shouldn\u0027t exist in DistributedPortBinding as it is a non-DVR router) ? Instead we can rename delete_distributed_port_bindings_on_host to delete_distributed_port_bindings_by_router_id and implement like below\n\ndef delete_distributed_port_bindings_by_router_id()\n    context, router_id):\n        for binding in (context.session.query(models.DistributedPortBinding).\n                  filter_by(router_id\u003drouter_id)):\n            clear_binding_levels(context, binding.port_id, binding.host)\n            context.session.delete(binding)","commit_id":"a0907016c81a067404e0fbbc4e6f24c9c32e2d4a"},{"author":{"_account_id":10267,"name":"venkata anil","email":"anilvenkata@redhat.com","username":"anil"},"change_message_id":"cd58ce1bc83edc74acd281af25e40a8137e25210","unresolved":false,"context_lines":[{"line_number":155,"context_line":"        if is_original_router_distributed:"},{"line_number":156,"context_line":"            int_ports \u003d ("},{"line_number":157,"context_line":"                rp.port for rp in"},{"line_number":158,"context_line":"                router_db.attached_ports.filter_by("},{"line_number":159,"context_line":"                    port_type\u003dconst.DEVICE_OWNER_DVR_INTERFACE)"},{"line_number":160,"context_line":"            )"},{"line_number":161,"context_line":"            for port in int_ports:"}],"source_content_type":"text/x-python","patch_set":2,"id":"7f515b1d_ff5a0e81","line":158,"in_reply_to":"7f515b1d_67ad81e9","updated":"2017-10-05 05:33:39.000000000","message":"MariaDB [neutron]\u003e select * from ports where id\u003d\"0a78eb18-8532-4af5-8294-7890032bff2b\";\n+----------------------------------+--------------------------------------+------+--------------------------------------+-------------------+----------------+--------+--------------------------------------+--------------------------------------+------------------+---------------+\n| project_id                       | id                                   | name | network_id                           | mac_address       | admin_state_up | status | device_id                            | device_owner                         | standard_attr_id | ip_allocation |\n+----------------------------------+--------------------------------------+------+--------------------------------------+-------------------+----------------+--------+--------------------------------------+--------------------------------------+------------------+---------------+\n| 683d595586104909b9eaded6574c72dc | 0a78eb18-8532-4af5-8294-7890032bff2b |      | 68d4b2a5-78ac-4fdb-8343-08f0aa73e74f | fa:16:3e:17:57:40 |              1 | ACTIVE | 7f724cf6-87d7-4e5e-953d-b6d73dde6d80 | network:router_interface_distributed |             3395 | immediate     |\n+----------------------------------+--------------------------------------+------+--------------------------------------+-------------------+----------------+--------+--------------------------------------+--------------------------------------+------------------+---------------+\n1 row in set (0.00 sec)\n\nMariaDB [neutron]\u003e select * from ml2_distributed_port_bindings;\n+--------------------------------------+-------+--------------------------------------+----------+----------------------------------------------------------------------------+-----------+---------+--------+\n| port_id                              | host  | router_id                            | vif_type | vif_details                                                                | vnic_type | profile | status |\n+--------------------------------------+-------+--------------------------------------+----------+----------------------------------------------------------------------------+-----------+---------+--------+\n| 0a78eb18-8532-4af5-8294-7890032bff2b | node1 | 7f724cf6-87d7-4e5e-953d-b6d73dde6d80 | ovs      | {\"port_filter\": true, \"datapath_type\": \"system\", \"ovs_hybrid_plug\": false} | normal    |         | ACTIVE |\n| 0a78eb18-8532-4af5-8294-7890032bff2b | node2 | 7f724cf6-87d7-4e5e-953d-b6d73dde6d80 | ovs      | {\"port_filter\": true, \"datapath_type\": \"system\", \"ovs_hybrid_plug\": false} | normal    |         | ACTIVE |\n+--------------------------------------+-------+--------------------------------------+----------+----------------------------------------------------------------------------+-----------+---------+--------+\n2 rows in set (0.00 sec)\n\nMariaDB [neutron]\u003e select * from ml2_port_binding_levels where port_id\u003d\"0a78eb18-8532-4af5-8294-7890032bff2b\";\n+--------------------------------------+-------+-------+-------------+--------------------------------------+\n| port_id                              | host  | level | driver      | segment_id                           |\n+--------------------------------------+-------+-------+-------------+--------------------------------------+\n| 0a78eb18-8532-4af5-8294-7890032bff2b | node1 |     0 | openvswitch | 57a9ff33-8201-445c-8d8a-c75c27f618cb |\n| 0a78eb18-8532-4af5-8294-7890032bff2b | node2 |     0 | openvswitch | 57a9ff33-8201-445c-8d8a-c75c27f618cb |\n+--------------------------------------+-------+-------+-------------+--------------------------------------+\n2 rows in set (0.00 sec)\n\nMariaDB [neutron]\u003e \n\nAs \"0a78eb18-8532-4af5-8294-7890032bff2b\" is a \"router_interface_distributed\" port, and I have a 2 node setup(with dvr and dvr_snat agent modes), we see two records with this port in ml2_distributed_port_bindings and ml2_port_binding_levels tables.","commit_id":"a0907016c81a067404e0fbbc4e6f24c9c32e2d4a"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"8d8aee99d2b43ff31db297ee05272d5640bc114c","unresolved":false,"context_lines":[{"line_number":155,"context_line":"        if is_original_router_distributed:"},{"line_number":156,"context_line":"            int_ports \u003d ("},{"line_number":157,"context_line":"                rp.port for rp in"},{"line_number":158,"context_line":"                router_db.attached_ports.filter_by("},{"line_number":159,"context_line":"                    port_type\u003dconst.DEVICE_OWNER_DVR_INTERFACE)"},{"line_number":160,"context_line":"            )"},{"line_number":161,"context_line":"            for port in int_ports:"}],"source_content_type":"text/x-python","patch_set":2,"id":"7f515b1d_67ad81e9","line":158,"in_reply_to":"7f515b1d_940c2d3c","updated":"2017-10-04 19:12:52.000000000","message":"I don\u0027t see binding_level table populated for dvr_interfaces.","commit_id":"a0907016c81a067404e0fbbc4e6f24c9c32e2d4a"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"5801f03dd726321920ea7e0dd689bd84afa43595","unresolved":false,"context_lines":[{"line_number":155,"context_line":"        if is_original_router_distributed:"},{"line_number":156,"context_line":"            int_ports \u003d ("},{"line_number":157,"context_line":"                rp.port for rp in"},{"line_number":158,"context_line":"                router_db.attached_ports.filter_by("},{"line_number":159,"context_line":"                    port_type\u003dconst.DEVICE_OWNER_DVR_INTERFACE)"},{"line_number":160,"context_line":"            )"},{"line_number":161,"context_line":"            for port in int_ports:"}],"source_content_type":"text/x-python","patch_set":2,"id":"7f515b1d_11172ff0","line":158,"in_reply_to":"7f515b1d_ff4fbf8f","updated":"2017-10-04 18:22:02.000000000","message":"Probably should we make the _migrate_router_ports to return the port list or pass in the port list to _migrate_router_ports from here if we don\u0027t want to duplicate.","commit_id":"a0907016c81a067404e0fbbc4e6f24c9c32e2d4a"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"843b7aadd0361618245cc18cd29f4da056ace82e","unresolved":false,"context_lines":[{"line_number":155,"context_line":"        if is_original_router_distributed:"},{"line_number":156,"context_line":"            int_ports \u003d ("},{"line_number":157,"context_line":"                rp.port for rp in"},{"line_number":158,"context_line":"                router_db.attached_ports.filter_by("},{"line_number":159,"context_line":"                    port_type\u003dconst.DEVICE_OWNER_DVR_INTERFACE)"},{"line_number":160,"context_line":"            )"},{"line_number":161,"context_line":"            for port in int_ports:"}],"source_content_type":"text/x-python","patch_set":2,"id":"7f515b1d_bf87f6b6","line":158,"in_reply_to":"7f515b1d_ff5a0e81","updated":"2017-10-05 05:38:04.000000000","message":"Thanks for the information.","commit_id":"a0907016c81a067404e0fbbc4e6f24c9c32e2d4a"},{"author":{"_account_id":10267,"name":"venkata anil","email":"anilvenkata@redhat.com","username":"anil"},"change_message_id":"26e0ad1b6c95fcf9c5a1353e97d25f9ad6aef26b","unresolved":false,"context_lines":[{"line_number":161,"context_line":"            for port in int_ports:"},{"line_number":162,"context_line":"                for agent in cur_agents:"},{"line_number":163,"context_line":"                    if agent[\u0027host\u0027]:"},{"line_number":164,"context_line":"                        self._core_plugin.\\"},{"line_number":165,"context_line":"                            delete_distributed_port_bindings_on_host("},{"line_number":166,"context_line":"                                context.elevated(),"},{"line_number":167,"context_line":"                                router_db[\u0027id\u0027],"}],"source_content_type":"text/x-python","patch_set":2,"id":"7f515b1d_31490b60","line":164,"updated":"2017-10-04 18:15:47.000000000","message":"As we are updating port binding, do we need to notify any port_update events?","commit_id":"a0907016c81a067404e0fbbc4e6f24c9c32e2d4a"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"5801f03dd726321920ea7e0dd689bd84afa43595","unresolved":false,"context_lines":[{"line_number":161,"context_line":"            for port in int_ports:"},{"line_number":162,"context_line":"                for agent in cur_agents:"},{"line_number":163,"context_line":"                    if agent[\u0027host\u0027]:"},{"line_number":164,"context_line":"                        self._core_plugin.\\"},{"line_number":165,"context_line":"                            delete_distributed_port_bindings_on_host("},{"line_number":166,"context_line":"                                context.elevated(),"},{"line_number":167,"context_line":"                                router_db[\u0027id\u0027],"}],"source_content_type":"text/x-python","patch_set":2,"id":"7f515b1d_51e24703","line":164,"in_reply_to":"7f515b1d_31490b60","updated":"2017-10-04 18:22:02.000000000","message":"I don\u0027t think so, this whole port-binding is an async operation which is being done when ensure_port_binding is called.","commit_id":"a0907016c81a067404e0fbbc4e6f24c9c32e2d4a"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"354d10e83585ca4ff0c3dba8e439cd36f745365f","unresolved":false,"context_lines":[{"line_number":150,"context_line":"            self.l3plugin._unbind_router(context, router_db[\u0027id\u0027], agent[\u0027id\u0027])"},{"line_number":151,"context_line":"        self.l3plugin.set_extra_attr_value("},{"line_number":152,"context_line":"            context, router_db, \u0027distributed\u0027, migrating_to_distributed)"},{"line_number":153,"context_line":"        if is_original_router_distributed:"},{"line_number":154,"context_line":"            self._core_plugin.delete_distributed_port_bindings_by_router_id("},{"line_number":155,"context_line":"                context.elevated(), router_db[\u0027id\u0027])"},{"line_number":156,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"7f515b1d_858e0e25","line":153,"updated":"2017-10-05 19:12:24.000000000","message":"Fails with a message that this delete_distributed_port_bindings_by_router_id cannot be called from within a transaction.","commit_id":"2198f4dabbd72b79c4d9b5f7c6c13a8398e5e6c6"},{"author":{"_account_id":10267,"name":"venkata anil","email":"anilvenkata@redhat.com","username":"anil"},"change_message_id":"c90c04451a8e3197fb2b851d7d992c0e77fabcb6","unresolved":false,"context_lines":[{"line_number":150,"context_line":"            self.l3plugin._unbind_router(context, router_db[\u0027id\u0027], agent[\u0027id\u0027])"},{"line_number":151,"context_line":"        self.l3plugin.set_extra_attr_value("},{"line_number":152,"context_line":"            context, router_db, \u0027distributed\u0027, migrating_to_distributed)"},{"line_number":153,"context_line":"        if is_original_router_distributed:"},{"line_number":154,"context_line":"            self._core_plugin.delete_distributed_port_bindings_by_router_id("},{"line_number":155,"context_line":"                context.elevated(), router_db[\u0027id\u0027])"},{"line_number":156,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"7f515b1d_cfa76e0b","line":153,"in_reply_to":"7f515b1d_858e0e25","updated":"2017-10-06 13:35:02.000000000","message":"May be we are having these decorators \n   @utils.transaction_guard\n    @db_api.retry_if_session_inactive()\non delete_distributed_port_bindings_by_router_id.\n\nSorry I am not an expert in DB stuff :)","commit_id":"2198f4dabbd72b79c4d9b5f7c6c13a8398e5e6c6"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"fa2341077dfdd7507f966d4353bc43f97e1e5177","unresolved":false,"context_lines":[{"line_number":150,"context_line":"            self.l3plugin._unbind_router(context, router_db[\u0027id\u0027], agent[\u0027id\u0027])"},{"line_number":151,"context_line":"        self.l3plugin.set_extra_attr_value("},{"line_number":152,"context_line":"            context, router_db, \u0027distributed\u0027, migrating_to_distributed)"},{"line_number":153,"context_line":"        if is_original_router_distributed:"},{"line_number":154,"context_line":"            self._core_plugin.delete_distributed_port_bindings_by_router_id("},{"line_number":155,"context_line":"                context.elevated(), router_db[\u0027id\u0027])"},{"line_number":156,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"3f4b6375_03806545","line":153,"updated":"2017-10-25 21:03:31.000000000","message":"Need to revisit this fix: \nI do see a timeout error in sql when trying to delete the bindings.\n\nDEBUG neutron_lib.callbacks.manager [None req-609cfb4c-240f-4f94-b284-5af48d2dc072 admin admin] Callback neutron.services.l3_router.l3_router_plugin.L3RouterPlugin._handle_distributed_migration--9223372036854214243 raised (pymysql.err.InternalError) (1205, u\u0027Lock wait timeout exceeded; try restarting transaction\u0027) [SQL: u\u0027UPDATE standardattributes SET revision_number\u003d%(revision_number)s, updated_at\u003d%(updated_at)s WHERE standardattributes.id \u003d %(standardattributes_id)s AND standardattributes.revision_number \u003d %(standardattributes_revision_number)s\u0027] [parameters: {\u0027standardattributes_id\u0027: 19, \u0027standardattributes_revision_number\u0027: 16, \u0027revision_number\u0027: 17, \u0027updated_at\u0027: datetime.datetime(2017, 10, 25, 20, 58, 40)}] {{(pid\u003d26408) _notify_loop /usr/local/lib/python2.7/dist-packages/neutron_lib/callbacks/manager.py:184}}","commit_id":"d1d1a52751e4fe4c39995f4fb2a47ae7efd7b86c"}],"neutron/plugins/ml2/db.py":[{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"c496c18c49c64149e420369b6eff20d2f031a088","unresolved":false,"context_lines":[{"line_number":97,"context_line":"              filter_by(port_id\u003dport_id,"},{"line_number":98,"context_line":"                        router_id\u003drouter_id,"},{"line_number":99,"context_line":"                        host\u003dhost).first())"},{"line_number":100,"context_line":"    context.session.delete(record)"},{"line_number":101,"context_line":"    LOG.warning(\"For port %(port_id)s, host %(host)s, \""},{"line_number":102,"context_line":"                \"router %(router_id)s cleared distributed binding\","},{"line_number":103,"context_line":"                  {\u0027port_id\u0027: port_id,"}],"source_content_type":"text/x-python","patch_set":1,"id":"7f515b1d_735580f9","line":100,"updated":"2017-10-02 18:54:01.000000000","message":"Should probably add an \"if record:\" here in case there is nothing returned.  Shouldn\u0027t happen but better to be safe.","commit_id":"afd6ea6ba245359763a9922a2e45ac42cefc5675"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"38c1f1bd5acf8c60a592dab9d0a587b419c4659f","unresolved":false,"context_lines":[{"line_number":97,"context_line":"              filter_by(port_id\u003dport_id,"},{"line_number":98,"context_line":"                        router_id\u003drouter_id,"},{"line_number":99,"context_line":"                        host\u003dhost).first())"},{"line_number":100,"context_line":"    context.session.delete(record)"},{"line_number":101,"context_line":"    LOG.warning(\"For port %(port_id)s, host %(host)s, \""},{"line_number":102,"context_line":"                \"router %(router_id)s cleared distributed binding\","},{"line_number":103,"context_line":"                  {\u0027port_id\u0027: port_id,"}],"source_content_type":"text/x-python","patch_set":1,"id":"7f515b1d_d648a2b3","line":100,"in_reply_to":"7f515b1d_735580f9","updated":"2017-10-02 20:09:16.000000000","message":"Yes will add it.","commit_id":"afd6ea6ba245359763a9922a2e45ac42cefc5675"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"c496c18c49c64149e420369b6eff20d2f031a088","unresolved":false,"context_lines":[{"line_number":98,"context_line":"                        router_id\u003drouter_id,"},{"line_number":99,"context_line":"                        host\u003dhost).first())"},{"line_number":100,"context_line":"    context.session.delete(record)"},{"line_number":101,"context_line":"    LOG.warning(\"For port %(port_id)s, host %(host)s, \""},{"line_number":102,"context_line":"                \"router %(router_id)s cleared distributed binding\","},{"line_number":103,"context_line":"                  {\u0027port_id\u0027: port_id,"},{"line_number":104,"context_line":"                   \u0027host\u0027: host,"}],"source_content_type":"text/x-python","patch_set":1,"id":"7f515b1d_f333b0f4","line":101,"range":{"start_line":101,"start_character":8,"end_line":101,"end_character":15},"updated":"2017-10-02 18:54:01.000000000","message":"s/debug","commit_id":"afd6ea6ba245359763a9922a2e45ac42cefc5675"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"38c1f1bd5acf8c60a592dab9d0a587b419c4659f","unresolved":false,"context_lines":[{"line_number":98,"context_line":"                        router_id\u003drouter_id,"},{"line_number":99,"context_line":"                        host\u003dhost).first())"},{"line_number":100,"context_line":"    context.session.delete(record)"},{"line_number":101,"context_line":"    LOG.warning(\"For port %(port_id)s, host %(host)s, \""},{"line_number":102,"context_line":"                \"router %(router_id)s cleared distributed binding\","},{"line_number":103,"context_line":"                  {\u0027port_id\u0027: port_id,"},{"line_number":104,"context_line":"                   \u0027host\u0027: host,"}],"source_content_type":"text/x-python","patch_set":1,"id":"7f515b1d_96cc6a35","line":101,"range":{"start_line":101,"start_character":8,"end_line":101,"end_character":15},"in_reply_to":"7f515b1d_f333b0f4","updated":"2017-10-02 20:09:16.000000000","message":"Sure, might have added for my testing. Will replace it with debug.","commit_id":"afd6ea6ba245359763a9922a2e45ac42cefc5675"},{"author":{"_account_id":10267,"name":"venkata anil","email":"anilvenkata@redhat.com","username":"anil"},"change_message_id":"26e0ad1b6c95fcf9c5a1353e97d25f9ad6aef26b","unresolved":false,"context_lines":[{"line_number":91,"context_line":""},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"@db_api.context_manager.writer"},{"line_number":94,"context_line":"def clear_distributed_port_bindings_on_host("},{"line_number":95,"context_line":"    context, router_id, port_id, host):"},{"line_number":96,"context_line":"    record \u003d (context.session.query(models.DistributedPortBinding)."},{"line_number":97,"context_line":"              filter_by(port_id\u003dport_id,"}],"source_content_type":"text/x-python","patch_set":2,"id":"7f515b1d_519367a4","line":94,"updated":"2017-10-04 18:15:47.000000000","message":"router_id is not needed here. combination of port_id and host will be unique in each record.","commit_id":"a0907016c81a067404e0fbbc4e6f24c9c32e2d4a"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"5801f03dd726321920ea7e0dd689bd84afa43595","unresolved":false,"context_lines":[{"line_number":91,"context_line":""},{"line_number":92,"context_line":""},{"line_number":93,"context_line":"@db_api.context_manager.writer"},{"line_number":94,"context_line":"def clear_distributed_port_bindings_on_host("},{"line_number":95,"context_line":"    context, router_id, port_id, host):"},{"line_number":96,"context_line":"    record \u003d (context.session.query(models.DistributedPortBinding)."},{"line_number":97,"context_line":"              filter_by(port_id\u003dport_id,"}],"source_content_type":"text/x-python","patch_set":2,"id":"7f515b1d_b1b4dbf3","line":94,"in_reply_to":"7f515b1d_519367a4","updated":"2017-10-04 18:22:02.000000000","message":"agreed","commit_id":"a0907016c81a067404e0fbbc4e6f24c9c32e2d4a"}],"neutron/plugins/ml2/plugin.py":[{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"c496c18c49c64149e420369b6eff20d2f031a088","unresolved":false,"context_lines":[{"line_number":1440,"context_line":"        binding.router_id \u003d attrs and attrs.get(\u0027device_id\u0027)"},{"line_number":1441,"context_line":"        # merge into session to reflect changes"},{"line_number":1442,"context_line":"        binding.persist_state_to_session(plugin_context.session)"},{"line_number":1443,"context_line":""},{"line_number":1444,"context_line":"    def delete_distributed_port_bindings_on_host("},{"line_number":1445,"context_line":"        self, context, router_id, port_id, host):"},{"line_number":1446,"context_line":"        if host and port_id:"}],"source_content_type":"text/x-python","patch_set":1,"id":"7f515b1d_53428410","line":1443,"updated":"2017-10-02 18:54:01.000000000","message":"Think you need the same as L1450-51 here, right?","commit_id":"afd6ea6ba245359763a9922a2e45ac42cefc5675"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"38c1f1bd5acf8c60a592dab9d0a587b419c4659f","unresolved":false,"context_lines":[{"line_number":1440,"context_line":"        binding.router_id \u003d attrs and attrs.get(\u0027device_id\u0027)"},{"line_number":1441,"context_line":"        # merge into session to reflect changes"},{"line_number":1442,"context_line":"        binding.persist_state_to_session(plugin_context.session)"},{"line_number":1443,"context_line":""},{"line_number":1444,"context_line":"    def delete_distributed_port_bindings_on_host("},{"line_number":1445,"context_line":"        self, context, router_id, port_id, host):"},{"line_number":1446,"context_line":"        if host and port_id:"}],"source_content_type":"text/x-python","patch_set":1,"id":"7f515b1d_76e8ce7a","line":1443,"in_reply_to":"7f515b1d_53428410","updated":"2017-10-02 20:09:16.000000000","message":"Do we need a transaction_guard here and retry.\nI will add.","commit_id":"afd6ea6ba245359763a9922a2e45ac42cefc5675"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"04af2885085244e112f07b7e506fecccf85f9fd7","unresolved":false,"context_lines":[{"line_number":1440,"context_line":"        binding.router_id \u003d attrs and attrs.get(\u0027device_id\u0027)"},{"line_number":1441,"context_line":"        # merge into session to reflect changes"},{"line_number":1442,"context_line":"        binding.persist_state_to_session(plugin_context.session)"},{"line_number":1443,"context_line":""},{"line_number":1444,"context_line":"    def delete_distributed_port_bindings_on_host("},{"line_number":1445,"context_line":"        self, context, router_id, port_id, host):"},{"line_number":1446,"context_line":"        if host and port_id:"}],"source_content_type":"text/x-python","patch_set":1,"id":"7f515b1d_595bc5f4","line":1443,"in_reply_to":"7f515b1d_76e8ce7a","updated":"2017-10-02 20:38:38.000000000","message":"It seemed like it from the below, but I could be wrong.","commit_id":"afd6ea6ba245359763a9922a2e45ac42cefc5675"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"c496c18c49c64149e420369b6eff20d2f031a088","unresolved":false,"context_lines":[{"line_number":1443,"context_line":""},{"line_number":1444,"context_line":"    def delete_distributed_port_bindings_on_host("},{"line_number":1445,"context_line":"        self, context, router_id, port_id, host):"},{"line_number":1446,"context_line":"        if host and port_id:"},{"line_number":1447,"context_line":"            db.clear_distributed_port_bindings_on_host("},{"line_number":1448,"context_line":"                context, router_id, port_id, host)"},{"line_number":1449,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"7f515b1d_53cde4b4","line":1446,"range":{"start_line":1446,"start_character":20,"end_line":1446,"end_character":27},"updated":"2017-10-02 18:54:01.000000000","message":"Shouldn\u0027t port_id always be set?","commit_id":"afd6ea6ba245359763a9922a2e45ac42cefc5675"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"38c1f1bd5acf8c60a592dab9d0a587b419c4659f","unresolved":false,"context_lines":[{"line_number":1443,"context_line":""},{"line_number":1444,"context_line":"    def delete_distributed_port_bindings_on_host("},{"line_number":1445,"context_line":"        self, context, router_id, port_id, host):"},{"line_number":1446,"context_line":"        if host and port_id:"},{"line_number":1447,"context_line":"            db.clear_distributed_port_bindings_on_host("},{"line_number":1448,"context_line":"                context, router_id, port_id, host)"},{"line_number":1449,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"7f515b1d_368b76c3","line":1446,"range":{"start_line":1446,"start_character":20,"end_line":1446,"end_character":27},"in_reply_to":"7f515b1d_53cde4b4","updated":"2017-10-02 20:09:16.000000000","message":"We might not need both the host and port_id, if we verify the agent[\u0027host\u0027] in the calling function.","commit_id":"afd6ea6ba245359763a9922a2e45ac42cefc5675"},{"author":{"_account_id":10267,"name":"venkata anil","email":"anilvenkata@redhat.com","username":"anil"},"change_message_id":"26e0ad1b6c95fcf9c5a1353e97d25f9ad6aef26b","unresolved":false,"context_lines":[{"line_number":1445,"context_line":"    @db_api.retry_if_session_inactive()"},{"line_number":1446,"context_line":"    def delete_distributed_port_bindings_on_host("},{"line_number":1447,"context_line":"        self, context, router_id, port_id, host):"},{"line_number":1448,"context_line":"        db.clear_distributed_port_bindings_on_host("},{"line_number":1449,"context_line":"            context, router_id, port_id, host)"},{"line_number":1450,"context_line":""},{"line_number":1451,"context_line":"    @utils.transaction_guard"}],"source_content_type":"text/x-python","patch_set":2,"id":"7f515b1d_d12bd77f","line":1448,"updated":"2017-10-04 18:15:47.000000000","message":"We also need to clear binding levels(i.e db.clear_binding_levels()), otherwise PortBindingLevel table will still has binding information for all DVR hosts.","commit_id":"a0907016c81a067404e0fbbc4e6f24c9c32e2d4a"},{"author":{"_account_id":10267,"name":"venkata anil","email":"anilvenkata@redhat.com","username":"anil"},"change_message_id":"6f5f05bcb86f49f4bb4842047c3430504266dff4","unresolved":false,"context_lines":[{"line_number":1445,"context_line":"    @db_api.retry_if_session_inactive()"},{"line_number":1446,"context_line":"    def delete_distributed_port_bindings_on_host("},{"line_number":1447,"context_line":"        self, context, router_id, port_id, host):"},{"line_number":1448,"context_line":"        db.clear_distributed_port_bindings_on_host("},{"line_number":1449,"context_line":"            context, router_id, port_id, host)"},{"line_number":1450,"context_line":""},{"line_number":1451,"context_line":"    @utils.transaction_guard"}],"source_content_type":"text/x-python","patch_set":2,"id":"7f515b1d_91b55fd0","line":1448,"in_reply_to":"7f515b1d_11c5ef5b","updated":"2017-10-04 18:38:33.000000000","message":"It maintains. I have seen that.","commit_id":"a0907016c81a067404e0fbbc4e6f24c9c32e2d4a"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"5801f03dd726321920ea7e0dd689bd84afa43595","unresolved":false,"context_lines":[{"line_number":1445,"context_line":"    @db_api.retry_if_session_inactive()"},{"line_number":1446,"context_line":"    def delete_distributed_port_bindings_on_host("},{"line_number":1447,"context_line":"        self, context, router_id, port_id, host):"},{"line_number":1448,"context_line":"        db.clear_distributed_port_bindings_on_host("},{"line_number":1449,"context_line":"            context, router_id, port_id, host)"},{"line_number":1450,"context_line":""},{"line_number":1451,"context_line":"    @utils.transaction_guard"}],"source_content_type":"text/x-python","patch_set":2,"id":"7f515b1d_11c5ef5b","line":1448,"in_reply_to":"7f515b1d_d12bd77f","updated":"2017-10-04 18:22:02.000000000","message":"I don\u0027t think PortBindingLevel table maintains data about DVR routers. It is only used for CVR routers.\nCan you confirm.","commit_id":"a0907016c81a067404e0fbbc4e6f24c9c32e2d4a"}],"neutron/tests/unit/db/test_l3_dvr_db.py":[{"author":{"_account_id":10267,"name":"venkata anil","email":"anilvenkata@redhat.com","username":"anil"},"change_message_id":"55ba727d4ae9b749fbbd7823298b86aa2722d740","unresolved":false,"context_lines":[{"line_number":164,"context_line":"            self.assertEqual("},{"line_number":165,"context_line":"                1,"},{"line_number":166,"context_line":"                self.mixin._core_plugin."},{"line_number":167,"context_line":"                delete_distributed_port_bindings_by_router_id.call_count)"},{"line_number":168,"context_line":""},{"line_number":169,"context_line":"    def _test_get_device_owner(self, is_distributed\u003dFalse,"},{"line_number":170,"context_line":"                               expected\u003dconst.DEVICE_OWNER_ROUTER_INTF,"}],"source_content_type":"text/x-python","patch_set":4,"id":"7f515b1d_af731280","line":167,"updated":"2017-10-06 13:38:58.000000000","message":"Shall we also check if binding is removed from DistributedPortBinding and PortBindingLevel tables?","commit_id":"d1d1a52751e4fe4c39995f4fb2a47ae7efd7b86c"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"ee1873b4d34d2c2e740dfc8e68ce28acf1dbcf47","unresolved":false,"context_lines":[{"line_number":164,"context_line":"            self.assertEqual("},{"line_number":165,"context_line":"                1,"},{"line_number":166,"context_line":"                self.mixin._core_plugin."},{"line_number":167,"context_line":"                delete_distributed_port_bindings_by_router_id.call_count)"},{"line_number":168,"context_line":""},{"line_number":169,"context_line":"    def _test_get_device_owner(self, is_distributed\u003dFalse,"},{"line_number":170,"context_line":"                               expected\u003dconst.DEVICE_OWNER_ROUTER_INTF,"}],"source_content_type":"text/x-python","patch_set":4,"id":"3f4b6375_33337265","line":167,"in_reply_to":"7f515b1d_af731280","updated":"2017-10-27 18:58:32.000000000","message":"Yes we can, but right now I need to resolve the dberror issue with this change. \nI am looking into it.","commit_id":"d1d1a52751e4fe4c39995f4fb2a47ae7efd7b86c"}]}
