)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":16788,"name":"Ramanjaneya Reddy Palleti","email":"ramanjaneya.palleti@huawei.com","username":"Ramanjaneya"},"change_message_id":"0fcc84703aa814592fd5ded371092918e304bb6e","unresolved":false,"context_lines":[{"line_number":9,"context_line":"This patch is a regression issue for patch[1]."},{"line_number":10,"context_line":""},{"line_number":11,"context_line":"Only those agents which expose tunneling-ip will be "},{"line_number":12,"context_line":"considered in determining data-path tunnels "},{"line_number":13,"context_line":"in deployments with l2pop ON."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"[1] https://review.openstack.org/#/c/236970/"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"da85f559_d05fbe0c","line":12,"updated":"2015-11-09 06:37:27.000000000","message":"remove trail spaces","commit_id":"ae9f9657589a16a6cef207f4d68c6b07f3a8b47c"}],"neutron/plugins/ml2/drivers/l2pop/db.py":[{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"8037384b7f42ece01378df9e305a7656e946c79f","unresolved":false,"context_lines":[{"line_number":74,"context_line":"        query \u003d query.filter(models_v2.Port.device_owner !\u003d"},{"line_number":75,"context_line":"                             const.DEVICE_OWNER_DVR_INTERFACE)"},{"line_number":76,"context_line":"        return [(bind, agent) for bind, agent in query.all()"},{"line_number":77,"context_line":"                if self.get_agent_ip(agent) and agent.is_active]"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"    def get_dvr_active_network_ports(self, session, network_id):"},{"line_number":80,"context_line":"        with session.begin(subtransactions\u003dTrue):"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a26ad4f_2016b1a7","line":77,"updated":"2015-10-29 22:00:54.000000000","message":"@Vivek: I agree that filtering only the active agents is a bad idea, but do you think we\u0027d still need to modify the queries here to extract only the 2 agents, with a tunnel ip? I believe that\u0027s implicit, because of the extra filter on the dvr port interface and the query on the port binding table.","commit_id":"e2f8b99cae8c9f6bece5c2a5fb4387eaa6e7ae2f"},{"author":{"_account_id":9361,"name":"Vivekanandan Narasimhan","email":"n.vivekanandan@ericsson.com","username":"viveknarasimhan"},"change_message_id":"47114c85e1fc8b18f88150dee6cbafb8df30bb83","unresolved":false,"context_lines":[{"line_number":74,"context_line":"        query \u003d query.filter(models_v2.Port.device_owner !\u003d"},{"line_number":75,"context_line":"                             const.DEVICE_OWNER_DVR_INTERFACE)"},{"line_number":76,"context_line":"        return [(bind, agent) for bind, agent in query.all()"},{"line_number":77,"context_line":"                if self.get_agent_ip(agent) and agent.is_active]"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"    def get_dvr_active_network_ports(self, session, network_id):"},{"line_number":80,"context_line":"        with session.begin(subtransactions\u003dTrue):"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a26ad4f_b1d76222","line":77,"in_reply_to":"1a26ad4f_2016b1a7","updated":"2015-10-30 10:04:01.000000000","message":"@Armando: Without this patch, the query used to provide all the nodes in the cloud that host a non-dvr active port, on input network_id.\n\nWith this patch, the query will now provide only those ports bound to agent which exposed a tunneling_ip to ML2.\n\nQuery on port-binding table only retrieves a list of all agents hosting atleast one port that belongs to input network-id.  It does not take into account the need for the agents to have exposed a tunneling_ip.\n\nSo IMHO, get_agent_ip() fix isn\u0027t implicit.  \n\nPlease note that port-binding could have succeeded for an active agent during binding time, but the agent could have gone down after that, with the neutron port still residing on that host. \n\nSo including agent.is_active in the query here would cause unnecessary datapath disruption for tenant traffic on hosts that have a single-agent running, which is the most common case.","commit_id":"e2f8b99cae8c9f6bece5c2a5fb4387eaa6e7ae2f"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"e696b6548b14dce4f4b8f3cee536aa75548d45ea","unresolved":false,"context_lines":[{"line_number":74,"context_line":"        query \u003d query.filter(models_v2.Port.device_owner !\u003d"},{"line_number":75,"context_line":"                             const.DEVICE_OWNER_DVR_INTERFACE)"},{"line_number":76,"context_line":"        return [(bind, agent) for bind, agent in query.all()"},{"line_number":77,"context_line":"                if self.get_agent_ip(agent) and agent.is_active]"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"    def get_dvr_active_network_ports(self, session, network_id):"},{"line_number":80,"context_line":"        with session.begin(subtransactions\u003dTrue):"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a26ad4f_a82cde02","line":77,"in_reply_to":"1a26ad4f_2016b1a7","updated":"2015-10-30 05:49:57.000000000","message":"It bothered me whether to filter active agent. From the user case in reported bug, it will help to filter out stale agent. But it might be overkill because is_active is based on heartbeat.\nFrom your options, I would accept not to filter active agent.   But I think we will need to extract only L2 agent(@\t\nArmando, I guess you mean L2 agent in your comment) here, that is because(1) before patch [1], only L2 agents will be returned (2) the consumer of the methods here will only need L2 agent, and rely on the tunnel ip for next actions.\n[1] https://review.openstack.org/#/c/236970/","commit_id":"e2f8b99cae8c9f6bece5c2a5fb4387eaa6e7ae2f"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"2e869885fbd577961df5e2d164d9f70ab7bb1de8","unresolved":false,"context_lines":[{"line_number":74,"context_line":"        query \u003d query.filter(models_v2.Port.device_owner !\u003d"},{"line_number":75,"context_line":"                             const.DEVICE_OWNER_DVR_INTERFACE)"},{"line_number":76,"context_line":"        return [(bind, agent) for bind, agent in query.all()"},{"line_number":77,"context_line":"                if self.get_agent_ip(agent) and agent.is_active]"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"    def get_dvr_active_network_ports(self, session, network_id):"},{"line_number":80,"context_line":"        with session.begin(subtransactions\u003dTrue):"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a26ad4f_2329ba37","line":77,"in_reply_to":"1a26ad4f_2910be00","updated":"2015-10-30 21:52:34.000000000","message":"I am still confused: the port binding tables will always contain hosts that run l2 agents. Now it\u0027s true that a single host can run other agents, but the join which lead to the result-set should only select based on non-null rows.\n\nI am starting to wonder if the query is broken and post-filtering is unnecessary.","commit_id":"e2f8b99cae8c9f6bece5c2a5fb4387eaa6e7ae2f"},{"author":{"_account_id":9361,"name":"Vivekanandan Narasimhan","email":"n.vivekanandan@ericsson.com","username":"viveknarasimhan"},"change_message_id":"b25160896b3737081d5f672c8f5626d211fd99ba","unresolved":false,"context_lines":[{"line_number":74,"context_line":"        query \u003d query.filter(models_v2.Port.device_owner !\u003d"},{"line_number":75,"context_line":"                             const.DEVICE_OWNER_DVR_INTERFACE)"},{"line_number":76,"context_line":"        return [(bind, agent) for bind, agent in query.all()"},{"line_number":77,"context_line":"                if self.get_agent_ip(agent) and agent.is_active]"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"    def get_dvr_active_network_ports(self, session, network_id):"},{"line_number":80,"context_line":"        with session.begin(subtransactions\u003dTrue):"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a26ad4f_2910be00","line":77,"in_reply_to":"1a26ad4f_659d8458","updated":"2015-10-30 18:35:57.000000000","message":"@Armando:  OK. I checked out and atleast in \u0027neutron\u0027 repo , the Port Binding table is always used only by ML2 compatible agents.\n\nBut we need to note that a given host can have multiple types of agents : L3-AGENT, DHCP-AGENT, METADATA-AGENT, L2-AGENT etc.\n\nEarlier, the condition here of SUPPORTED_AGENT_TYPES prevented selection of all agents except the L2-AGENTS..  \n\nWith that condition removed, the port-binding query used above will now select all types of agents incorrectly as said by Hong in the bug\n\n\"When I debug the code, I found that all agents(metadata, dhcp, l3, ovs) are returned for get_dvr_active_network_ports and get_nondvr_active_network_ports. So, the query still need to refine.\"\n\nSo we need to add the tunnel_ip presence condition to ensure that only L2-Agents are considered before producing the results for the query.\n\nThis will fix the general l2pop datapath issue.\n\nIt will also fix the bug reported, wherein during migration the migration script should do a neutron agent-delete of the LB Agent (while OVS agent is actively running on that same host already reporting the tunneling-ip ).","commit_id":"e2f8b99cae8c9f6bece5c2a5fb4387eaa6e7ae2f"},{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"14afc7879e87922a9071ac05df2c62f90b4f040e","unresolved":false,"context_lines":[{"line_number":74,"context_line":"        query \u003d query.filter(models_v2.Port.device_owner !\u003d"},{"line_number":75,"context_line":"                             const.DEVICE_OWNER_DVR_INTERFACE)"},{"line_number":76,"context_line":"        return [(bind, agent) for bind, agent in query.all()"},{"line_number":77,"context_line":"                if self.get_agent_ip(agent) and agent.is_active]"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"    def get_dvr_active_network_ports(self, session, network_id):"},{"line_number":80,"context_line":"        with session.begin(subtransactions\u003dTrue):"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a26ad4f_659d8458","line":77,"in_reply_to":"1a26ad4f_b1d76222","updated":"2015-10-30 12:27:13.000000000","message":"Vivek, but my question is: can this query return in other agents besides L2 ones? The method _get_active_network_ports does query the port binding table, and to the best of my knowledge we don\u0027t store agents other than l2 ones. What am I missing?","commit_id":"e2f8b99cae8c9f6bece5c2a5fb4387eaa6e7ae2f"},{"author":{"_account_id":9361,"name":"Vivekanandan Narasimhan","email":"n.vivekanandan@ericsson.com","username":"viveknarasimhan"},"change_message_id":"5be9b38cc3fc1e60e5c26c70e5637412b94a1ddb","unresolved":false,"context_lines":[{"line_number":74,"context_line":"        query \u003d query.filter(models_v2.Port.device_owner !\u003d"},{"line_number":75,"context_line":"                             const.DEVICE_OWNER_DVR_INTERFACE)"},{"line_number":76,"context_line":"        return [(bind, agent) for bind, agent in query.all()"},{"line_number":77,"context_line":"                if self.get_agent_ip(agent)]"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"    def get_dvr_active_network_ports(self, session, network_id):"},{"line_number":80,"context_line":"        with session.begin(subtransactions\u003dTrue):"}],"source_content_type":"text/x-python","patch_set":3,"id":"da85f559_08fe846b","line":77,"updated":"2015-11-08 21:01:08.000000000","message":"Checking for the agent_ip  here would be the right semantic.\n\nWe can remove the the \u0027first check\u0027 in mech-driver in _get_tunnels() that does this and simplify that method.\n\nSimilarly, we can include agent_ip as the third parameter to the return value here, which in turn can be used in \u0027second check\u0027  under _create_agent_fdb() for faster iteration.\n\nPlease let me know your comments.","commit_id":"ae9f9657589a16a6cef207f4d68c6b07f3a8b47c"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"40e04bea80b2dc2ebc7bc7763c9616ebeef5825a","unresolved":false,"context_lines":[{"line_number":74,"context_line":"        query \u003d query.filter(models_v2.Port.device_owner !\u003d"},{"line_number":75,"context_line":"                             const.DEVICE_OWNER_DVR_INTERFACE)"},{"line_number":76,"context_line":"        return [(bind, agent) for bind, agent in query.all()"},{"line_number":77,"context_line":"                if self.get_agent_ip(agent)]"},{"line_number":78,"context_line":""},{"line_number":79,"context_line":"    def get_dvr_active_network_ports(self, session, network_id):"},{"line_number":80,"context_line":"        with session.begin(subtransactions\u003dTrue):"}],"source_content_type":"text/x-python","patch_set":3,"id":"da85f559_ad68a2bb","line":77,"in_reply_to":"da85f559_08fe846b","updated":"2015-11-09 05:28:33.000000000","message":"As I commented in mech-driver, I would like to have double check to make things more robust.\n\nChecking for agent_ip here is the alternative solution for the old \"SUPPORTED_AGENT_TYPES\", so I believe it is right thing here for the regression.\n\nIncluding agent_ip as the third parameter can speed up the following iteration. But it is trivial in this patch, and I want to keep the old logic untouched as much as possible.","commit_id":"ae9f9657589a16a6cef207f4d68c6b07f3a8b47c"}],"neutron/plugins/ml2/drivers/l2pop/mech_driver.py":[{"author":{"_account_id":9361,"name":"Vivekanandan Narasimhan","email":"n.vivekanandan@ericsson.com","username":"viveknarasimhan"},"change_message_id":"5be9b38cc3fc1e60e5c26c70e5637412b94a1ddb","unresolved":false,"context_lines":[{"line_number":197,"context_line":"            agent.host))"},{"line_number":198,"context_line":"        for agent_ip, fdbs in ports.items():"},{"line_number":199,"context_line":"            for binding, agent in fdb_network_ports:"},{"line_number":200,"context_line":"                if self.get_agent_ip(agent) \u003d\u003d agent_ip:"},{"line_number":201,"context_line":"                    fdbs.extend(self._get_port_fdb_entries(binding.port))"},{"line_number":202,"context_line":""},{"line_number":203,"context_line":"        return agent_fdb_entries"}],"source_content_type":"text/x-python","patch_set":3,"id":"da85f559_e8cea059","line":200,"updated":"2015-11-08 21:01:08.000000000","message":"Even though the \"binding, agent in fdb_network_ports\" would contain all agents, the outer for loop here on ports.items() will contain only L2 Agents.\n\nSo the above \u0027second check\u0027 here filters out duplicate entries being added to  the \u0027fdbs\u0027 list.","commit_id":"ae9f9657589a16a6cef207f4d68c6b07f3a8b47c"},{"author":{"_account_id":9361,"name":"Vivekanandan Narasimhan","email":"n.vivekanandan@ericsson.com","username":"viveknarasimhan"},"change_message_id":"5be9b38cc3fc1e60e5c26c70e5637412b94a1ddb","unresolved":false,"context_lines":[{"line_number":208,"context_line":"            if agent.host \u003d\u003d exclude_host:"},{"line_number":209,"context_line":"                continue"},{"line_number":210,"context_line":""},{"line_number":211,"context_line":"            ip \u003d self.get_agent_ip(agent)"},{"line_number":212,"context_line":"            if not ip:"},{"line_number":213,"context_line":"                LOG.debug(\"Unable to retrieve the agent ip, check \""},{"line_number":214,"context_line":"                          \"the agent %s configuration.\", agent.host)"}],"source_content_type":"text/x-python","patch_set":3,"id":"da85f559_c8a39c9d","line":211,"updated":"2015-11-08 21:01:08.000000000","message":"Without the patch of including agent_ip into the queries, we will get all types of agents included in the query output.\n\nBut the the \u0027first check\u0027 here in _get_tunnels() filters out only those agents that contain the tunnel_ip.  So the \u0027agents\u0027 dict returned here will contain only L2 Agents.","commit_id":"ae9f9657589a16a6cef207f4d68c6b07f3a8b47c"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"40e04bea80b2dc2ebc7bc7763c9616ebeef5825a","unresolved":false,"context_lines":[{"line_number":208,"context_line":"            if agent.host \u003d\u003d exclude_host:"},{"line_number":209,"context_line":"                continue"},{"line_number":210,"context_line":""},{"line_number":211,"context_line":"            ip \u003d self.get_agent_ip(agent)"},{"line_number":212,"context_line":"            if not ip:"},{"line_number":213,"context_line":"                LOG.debug(\"Unable to retrieve the agent ip, check \""},{"line_number":214,"context_line":"                          \"the agent %s configuration.\", agent.host)"}],"source_content_type":"text/x-python","patch_set":3,"id":"da85f559_ed1f8a59","line":211,"in_reply_to":"da85f559_c8a39c9d","updated":"2015-11-09 05:28:33.000000000","message":"Yes, this is the key why the test case didn\u0027t fail. \n\nHowever, even if I filter agent with \"agent_ip\" in db, I would like to leave the agent_ip check here. This method can\u0027t guarantee where will it be called(Although it is only called at line 195 for now). The extra check here can make the mech_driver be more robust.\n\n\nI do remove the agent_ip check at line 165, as it is not necessary according to the context.","commit_id":"ae9f9657589a16a6cef207f4d68c6b07f3a8b47c"}],"neutron/tests/unit/plugins/ml2/drivers/l2pop/test_db.py":[{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"c8ffc237f901b35ffa94ad52343a7a8903718a83","unresolved":false,"context_lines":[{"line_number":45,"context_line":"            self.ctx.session, helpers.HOST)"},{"line_number":46,"context_line":"        self.assertIsNone(agent)"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"    def _setup_dvr_binding(self, network_id\u003d\u0027network_id\u0027):"},{"line_number":49,"context_line":"        with self.ctx.session.begin(subtransactions\u003dTrue):"},{"line_number":50,"context_line":"            self.ctx.session.add(models_v2.Network(id\u003dnetwork_id))"},{"line_number":51,"context_line":"            self.ctx.session.add(models_v2.Port("}],"source_content_type":"text/x-python","patch_set":4,"id":"ba8a016a_e0de596c","line":48,"updated":"2015-11-18 07:02:43.000000000","message":"looks like these setup methods could be simplified a bit if we avoided the duplicated information used to create the bindings.","commit_id":"910f70920613ce1280e4542c5729398af6899d35"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"42f70c053bc70377c3163240453350ddffc1ae4a","unresolved":false,"context_lines":[{"line_number":45,"context_line":"            self.ctx.session, helpers.HOST)"},{"line_number":46,"context_line":"        self.assertIsNone(agent)"},{"line_number":47,"context_line":""},{"line_number":48,"context_line":"    def _setup_dvr_binding(self, network_id\u003d\u0027network_id\u0027):"},{"line_number":49,"context_line":"        with self.ctx.session.begin(subtransactions\u003dTrue):"},{"line_number":50,"context_line":"            self.ctx.session.add(models_v2.Network(id\u003dnetwork_id))"},{"line_number":51,"context_line":"            self.ctx.session.add(models_v2.Port("}],"source_content_type":"text/x-python","patch_set":4,"id":"ba8a016a_9760b8d0","line":48,"in_reply_to":"ba8a016a_e0de596c","updated":"2015-11-19 05:17:57.000000000","message":"Done","commit_id":"910f70920613ce1280e4542c5729398af6899d35"}],"neutron/tests/unit/plugins/ml2/drivers/l2pop/test_mech_driver.py":[{"author":{"_account_id":748,"name":"Armando Migliaccio","email":"armamig@gmail.com","username":"armando-migliaccio"},"change_message_id":"c8ffc237f901b35ffa94ad52343a7a8903718a83","unresolved":false,"context_lines":[{"line_number":827,"context_line":"        def agent_ip_side_effect(agent):"},{"line_number":828,"context_line":"            return agent_ips[agent]"},{"line_number":829,"context_line":""},{"line_number":830,"context_line":"        def nondvr_active_network_ports_side_effect(session, network_id):"},{"line_number":831,"context_line":"            return fdb_network_ports"},{"line_number":832,"context_line":""},{"line_number":833,"context_line":"        def dvr_active_network_ports_side_effect(session, network_id):"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba8a016a_605fc9e5","line":830,"updated":"2015-11-18 07:02:43.000000000","message":"Is this refactoring really necessary? Most changes look just cosmetic. Since you want to backport this, I wonder if we can minimize the amount of changes made in this patch.","commit_id":"910f70920613ce1280e4542c5729398af6899d35"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"42f70c053bc70377c3163240453350ddffc1ae4a","unresolved":false,"context_lines":[{"line_number":827,"context_line":"        def agent_ip_side_effect(agent):"},{"line_number":828,"context_line":"            return agent_ips[agent]"},{"line_number":829,"context_line":""},{"line_number":830,"context_line":"        def nondvr_active_network_ports_side_effect(session, network_id):"},{"line_number":831,"context_line":"            return fdb_network_ports"},{"line_number":832,"context_line":""},{"line_number":833,"context_line":"        def dvr_active_network_ports_side_effect(session, network_id):"}],"source_content_type":"text/x-python","patch_set":4,"id":"ba8a016a_d76ac0b2","line":830,"in_reply_to":"ba8a016a_605fc9e5","updated":"2015-11-19 05:17:57.000000000","message":"yeah, this will cause unnecessary problem for backport, I will try to minimize the change here in next PS.","commit_id":"910f70920613ce1280e4542c5729398af6899d35"}]}
