)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"7b549efdcd5a3887790962acda555bcf4b50d8af","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"DVR: remove misleading error log"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"csnat_ofport is always OFPORT_INVALID on compute nodes"},{"line_number":10,"context_line":"so the error was always wrong."},{"line_number":11,"context_line":"Not sure how it could mean duplicate dvr port even on controllers,"},{"line_number":12,"context_line":"so the patch is just removing the condition and the log."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"3a98d1f4_31bf1d62","line":9,"range":{"start_line":9,"start_character":41,"end_line":9,"end_character":54},"updated":"2016-10-03 16:26:03.000000000","message":"So in this case should we only raise this error on the dvr_snat node or the network node and not on compute nodes.","commit_id":"2f7c58f405288d323722ec6be224c4c70ccea8b3"},{"author":{"_account_id":7016,"name":"Swaminathan Vasudevan","email":"swvasude@cisco.com","username":"souminathan"},"change_message_id":"686f7f0b4e3481f2626aa78a58ed874a800e2184","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"DVR: remove misleading error log"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"csnat_ofport is always OFPORT_INVALID on compute nodes"},{"line_number":10,"context_line":"so the error was always wrong."},{"line_number":11,"context_line":"Not sure how it could mean duplicate dvr port even on controllers,"},{"line_number":12,"context_line":"so the patch is just removing the condition and the log."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"1a95cdbc_fa08002b","line":9,"range":{"start_line":9,"start_character":41,"end_line":9,"end_character":54},"in_reply_to":"3a98d1f4_1437564d","updated":"2016-10-04 16:19:48.000000000","message":"ok thanks.","commit_id":"2f7c58f405288d323722ec6be224c4c70ccea8b3"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"f84702b5e9e78bdfbacbe710dbc2917a3e2705f4","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"DVR: remove misleading error log"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"csnat_ofport is always OFPORT_INVALID on compute nodes"},{"line_number":10,"context_line":"so the error was always wrong."},{"line_number":11,"context_line":"Not sure how it could mean duplicate dvr port even on controllers,"},{"line_number":12,"context_line":"so the patch is just removing the condition and the log."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"3a98d1f4_1437564d","line":9,"range":{"start_line":9,"start_character":41,"end_line":9,"end_character":54},"in_reply_to":"3a98d1f4_31bf1d62","updated":"2016-10-04 08:18:24.000000000","message":"Please see lines 11-12. Thoughts? Also ovs agent has no clue whether it\u0027s dvr or dvr_snat node","commit_id":"2f7c58f405288d323722ec6be224c4c70ccea8b3"}],"neutron/plugins/ml2/drivers/openvswitch/agent/ovs_dvr_neutron_agent.py":[{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"38fcc2f3d7585cc96ac6b2e5f01a60cd97ccc428","unresolved":false,"context_lines":[{"line_number":361,"context_line":"        ldm \u003d None"},{"line_number":362,"context_line":"        if subnet_uuid in self.local_dvr_map:"},{"line_number":363,"context_line":"            ldm \u003d self.local_dvr_map[subnet_uuid]"},{"line_number":364,"context_line":"            csnat_ofport \u003d ldm.get_csnat_ofport()"},{"line_number":365,"context_line":"            if csnat_ofport \u003d\u003d constants.OFPORT_INVALID:"},{"line_number":366,"context_line":"                LOG.error(_LE(\"DVR: Duplicate DVR router interface detected \""},{"line_number":367,"context_line":"                              \"for subnet %s\"), subnet_uuid)"},{"line_number":368,"context_line":"                return"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa6399be_090532c1","side":"PARENT","line":365,"range":{"start_line":364,"start_character":0,"end_line":365,"end_character":56},"updated":"2016-10-19 01:34:33.000000000","message":"I guess the original code thinks this way:\n1) A router interface is added.\n2) Check if it is in the local cache local_dvr_map\n3) Check if it is a router interface(not csnat port), as router interface will have csnat_ofport \u003d\u003d constants.OFPORT_INVALID\n4) If it is in the local cache, and it is a router interface, the code will log error and just return(no need to execute the following code).\n\n\nSo, the code here basically seems correctly to me. Removing the code here might cause unnecessary code execution when actually duplicated router interface is added. I think you might need to avoid code hit this method when doing resync in agent.","commit_id":"0c76de8d0184ef069cd49a58657ffd5f76adf392"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"e0ef17febd43581e8c6ffa13e419fff540cdc4fb","unresolved":false,"context_lines":[{"line_number":361,"context_line":"        ldm \u003d None"},{"line_number":362,"context_line":"        if subnet_uuid in self.local_dvr_map:"},{"line_number":363,"context_line":"            ldm \u003d self.local_dvr_map[subnet_uuid]"},{"line_number":364,"context_line":"            csnat_ofport \u003d ldm.get_csnat_ofport()"},{"line_number":365,"context_line":"            if csnat_ofport \u003d\u003d constants.OFPORT_INVALID:"},{"line_number":366,"context_line":"                LOG.error(_LE(\"DVR: Duplicate DVR router interface detected \""},{"line_number":367,"context_line":"                              \"for subnet %s\"), subnet_uuid)"},{"line_number":368,"context_line":"                return"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa6399be_36db2aef","side":"PARENT","line":365,"range":{"start_line":364,"start_character":0,"end_line":365,"end_character":56},"in_reply_to":"fa6399be_090532c1","updated":"2016-10-19 07:44:52.000000000","message":"\u003e\u003e1) A router interface is added.\n\u003e\u003e2) Check if it is in the local cache local_dvr_map\n \nif _subnet_ is in local cache\n\n\n\u003e\u003e3) Check if it is a router interface(not csnat port), as router interface will have csnat_ofport \u003d\u003d constants.OFPORT_INVALID\n \n \"ldm\" here represents not router interface in the map but a subnet, so I\u0027d not say this check is whether it\u0027s csnat port or a dvr port (_bind_distributed_router_interface_port() will never be called for csnat port). On compute nodes this subnet will always have csnat_ofport \u003d\u003d INVALID as csnat ports are never processed on computes.\n\n\n\u003e\u003e4) If it is in the local cache, and it is a router interface, the code will log error and just return(no need to execute the following code).\n  \n again, it\u0027s not a router interface in the map, but a subnet; and it wasn\u0027t a check if it\u0027s router interface or a csnat port.","commit_id":"0c76de8d0184ef069cd49a58657ffd5f76adf392"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"e86a0bc31ccb2f1344f8b821dc287ee3ed7ecfe2","unresolved":false,"context_lines":[{"line_number":361,"context_line":"        ldm \u003d None"},{"line_number":362,"context_line":"        if subnet_uuid in self.local_dvr_map:"},{"line_number":363,"context_line":"            ldm \u003d self.local_dvr_map[subnet_uuid]"},{"line_number":364,"context_line":"            csnat_ofport \u003d ldm.get_csnat_ofport()"},{"line_number":365,"context_line":"            if csnat_ofport \u003d\u003d constants.OFPORT_INVALID:"},{"line_number":366,"context_line":"                LOG.error(_LE(\"DVR: Duplicate DVR router interface detected \""},{"line_number":367,"context_line":"                              \"for subnet %s\"), subnet_uuid)"},{"line_number":368,"context_line":"                return"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa6399be_ff5c257f","side":"PARENT","line":365,"range":{"start_line":364,"start_character":0,"end_line":365,"end_character":56},"in_reply_to":"fa6399be_36db2aef","updated":"2016-10-19 08:57:30.000000000","message":"You are right, it should be subnet. My question still stands.\n\n1) A router interface is added.\n2) Check if the subnet of the router port is in the local cache local_dvr_map\n3) Check if the subnet is for csnat, as the subnet of router interface() will not have csnat_ofport \u003d\u003d constants.OFPORT_INVALID\n4) If the subnet is in the local cache, and it is a subnet for router interface, the code will log error and just return(no need to execute the following code).","commit_id":"0c76de8d0184ef069cd49a58657ffd5f76adf392"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"1b0dc21748bd82c81d40dcc20d1264f6b121ad0d","unresolved":false,"context_lines":[{"line_number":361,"context_line":"        ldm \u003d None"},{"line_number":362,"context_line":"        if subnet_uuid in self.local_dvr_map:"},{"line_number":363,"context_line":"            ldm \u003d self.local_dvr_map[subnet_uuid]"},{"line_number":364,"context_line":"            csnat_ofport \u003d ldm.get_csnat_ofport()"},{"line_number":365,"context_line":"            if csnat_ofport \u003d\u003d constants.OFPORT_INVALID:"},{"line_number":366,"context_line":"                LOG.error(_LE(\"DVR: Duplicate DVR router interface detected \""},{"line_number":367,"context_line":"                              \"for subnet %s\"), subnet_uuid)"},{"line_number":368,"context_line":"                return"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa6399be_4d02c43f","side":"PARENT","line":365,"range":{"start_line":364,"start_character":0,"end_line":365,"end_character":56},"in_reply_to":"fa6399be_3aaea898","updated":"2016-10-19 10:50:26.000000000","message":"First, I admit that it is a bit verbose here to check the csnat_ofport. If it is binding router interface, the csnat_ofport must be -1.\n\nBut I think the change here will introduce new issue. resync will sync all related ports in the ovs-agent, right? So, if router interface(or the subnet of router interface) is already in the local cache local_dvr_map. Compute ports will be updated at line 453 to line 496. The original code just return  seems correct. If we don\u0027t skip here, and execute the following code, then there will be two update to one compute port.\n\nThis is my thought on this patch. I don\u0027t know your case well, and maybe I am totally wrong. So, what do you think about it?","commit_id":"0c76de8d0184ef069cd49a58657ffd5f76adf392"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"a6f6a6d59816e5b73f5122c064c668bb1e2b4dc5","unresolved":false,"context_lines":[{"line_number":361,"context_line":"        ldm \u003d None"},{"line_number":362,"context_line":"        if subnet_uuid in self.local_dvr_map:"},{"line_number":363,"context_line":"            ldm \u003d self.local_dvr_map[subnet_uuid]"},{"line_number":364,"context_line":"            csnat_ofport \u003d ldm.get_csnat_ofport()"},{"line_number":365,"context_line":"            if csnat_ofport \u003d\u003d constants.OFPORT_INVALID:"},{"line_number":366,"context_line":"                LOG.error(_LE(\"DVR: Duplicate DVR router interface detected \""},{"line_number":367,"context_line":"                              \"for subnet %s\"), subnet_uuid)"},{"line_number":368,"context_line":"                return"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa6399be_61e22f03","side":"PARENT","line":365,"range":{"start_line":364,"start_character":0,"end_line":365,"end_character":56},"in_reply_to":"fa6399be_4d02c43f","updated":"2016-10-19 12:07:01.000000000","message":"Currently the condition \"if csnat_ofport \u003d\u003d constants.OFPORT_INVALID\" to detect if it\u0027s a duplicate dvr port on the subnet is completely wrong. It can\u0027t mean there is duplicate, moreover it\u0027s always True on compute nodes, which leads to misleading error messages and skipping further processing in all cases once a subnet is in local map. This is what this patch is fixing.\n\nTo you point, is it right that the issue of double compute ports processing can be fixed by putting \"return\" right after #362? Does it solves your concern?","commit_id":"0c76de8d0184ef069cd49a58657ffd5f76adf392"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"0259527da5ea34d8be75c6472df7e82dea8f477e","unresolved":false,"context_lines":[{"line_number":361,"context_line":"        ldm \u003d None"},{"line_number":362,"context_line":"        if subnet_uuid in self.local_dvr_map:"},{"line_number":363,"context_line":"            ldm \u003d self.local_dvr_map[subnet_uuid]"},{"line_number":364,"context_line":"            csnat_ofport \u003d ldm.get_csnat_ofport()"},{"line_number":365,"context_line":"            if csnat_ofport \u003d\u003d constants.OFPORT_INVALID:"},{"line_number":366,"context_line":"                LOG.error(_LE(\"DVR: Duplicate DVR router interface detected \""},{"line_number":367,"context_line":"                              \"for subnet %s\"), subnet_uuid)"},{"line_number":368,"context_line":"                return"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa6399be_ecc8da76","side":"PARENT","line":365,"range":{"start_line":364,"start_character":0,"end_line":365,"end_character":56},"in_reply_to":"fa6399be_61e22f03","updated":"2016-10-20 00:34:49.000000000","message":"Yes, that is the behavior which I think should be kept.","commit_id":"0c76de8d0184ef069cd49a58657ffd5f76adf392"},{"author":{"_account_id":7787,"name":"Kevin Benton","email":"kevin@benton.pub","username":"blak111"},"change_message_id":"b9f98f60573c1687bd6eb3a9b767aa81f2a34fe6","unresolved":false,"context_lines":[{"line_number":361,"context_line":"        ldm \u003d None"},{"line_number":362,"context_line":"        if subnet_uuid in self.local_dvr_map:"},{"line_number":363,"context_line":"            ldm \u003d self.local_dvr_map[subnet_uuid]"},{"line_number":364,"context_line":"            csnat_ofport \u003d ldm.get_csnat_ofport()"},{"line_number":365,"context_line":"            if csnat_ofport \u003d\u003d constants.OFPORT_INVALID:"},{"line_number":366,"context_line":"                LOG.error(_LE(\"DVR: Duplicate DVR router interface detected \""},{"line_number":367,"context_line":"                              \"for subnet %s\"), subnet_uuid)"},{"line_number":368,"context_line":"                return"}],"source_content_type":"text/x-python","patch_set":1,"id":"7a77a97e_86cd6fb9","side":"PARENT","line":365,"range":{"start_line":364,"start_character":0,"end_line":365,"end_character":56},"in_reply_to":"fa6399be_73ad829a","updated":"2016-11-17 07:32:06.000000000","message":"Duplicate processing of a single port on an agent is definitely not a concern. We have been bitten way too many times trying to be clever to micro optimize for something that is basically negligible.","commit_id":"0c76de8d0184ef069cd49a58657ffd5f76adf392"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"eac47f8a0d2c40f4faba0986554b96c17dd77137","unresolved":false,"context_lines":[{"line_number":361,"context_line":"        ldm \u003d None"},{"line_number":362,"context_line":"        if subnet_uuid in self.local_dvr_map:"},{"line_number":363,"context_line":"            ldm \u003d self.local_dvr_map[subnet_uuid]"},{"line_number":364,"context_line":"            csnat_ofport \u003d ldm.get_csnat_ofport()"},{"line_number":365,"context_line":"            if csnat_ofport \u003d\u003d constants.OFPORT_INVALID:"},{"line_number":366,"context_line":"                LOG.error(_LE(\"DVR: Duplicate DVR router interface detected \""},{"line_number":367,"context_line":"                              \"for subnet %s\"), subnet_uuid)"},{"line_number":368,"context_line":"                return"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa6399be_3aaea898","side":"PARENT","line":365,"range":{"start_line":364,"start_character":0,"end_line":365,"end_character":56},"in_reply_to":"fa6399be_d78e6526","updated":"2016-10-19 10:10:04.000000000","message":"Again, there is no special subnet for router interface, it\u0027s just a subnet connected to a router. This subnet in local map will have csnat_ofport \u003d\u003d INVALID initially, and then actual ofport after processing csnat port (#527 or #533) - on controllers. On compute nodes it will always be INVALID but it doesn\u0027t mean that we should skip dvr port binding on resync, in the end resync is meant to ensure everything is up to date so I don\u0027t think it\u0027s a good idea to skip processing.","commit_id":"0c76de8d0184ef069cd49a58657ffd5f76adf392"},{"author":{"_account_id":11159,"name":"Hong Hui Xiao","email":"honghui_xiao@yeah.net","username":"HongHuiXiao"},"change_message_id":"4d418c5aee7117bef93957887d070ca11f71fb6b","unresolved":false,"context_lines":[{"line_number":361,"context_line":"        ldm \u003d None"},{"line_number":362,"context_line":"        if subnet_uuid in self.local_dvr_map:"},{"line_number":363,"context_line":"            ldm \u003d self.local_dvr_map[subnet_uuid]"},{"line_number":364,"context_line":"            csnat_ofport \u003d ldm.get_csnat_ofport()"},{"line_number":365,"context_line":"            if csnat_ofport \u003d\u003d constants.OFPORT_INVALID:"},{"line_number":366,"context_line":"                LOG.error(_LE(\"DVR: Duplicate DVR router interface detected \""},{"line_number":367,"context_line":"                              \"for subnet %s\"), subnet_uuid)"},{"line_number":368,"context_line":"                return"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa6399be_d78e6526","side":"PARENT","line":365,"range":{"start_line":364,"start_character":0,"end_line":365,"end_character":56},"in_reply_to":"fa6399be_ea3aa1e6","updated":"2016-10-19 09:48:25.000000000","message":"But, the subnet in local cache for router interface will have csnat_ofport \u003d\u003d constants.OFPORT_INVALID, right?","commit_id":"0c76de8d0184ef069cd49a58657ffd5f76adf392"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"96beec1ffafe46683d0c583ceb042bfa28a23ca4","unresolved":false,"context_lines":[{"line_number":361,"context_line":"        ldm \u003d None"},{"line_number":362,"context_line":"        if subnet_uuid in self.local_dvr_map:"},{"line_number":363,"context_line":"            ldm \u003d self.local_dvr_map[subnet_uuid]"},{"line_number":364,"context_line":"            csnat_ofport \u003d ldm.get_csnat_ofport()"},{"line_number":365,"context_line":"            if csnat_ofport \u003d\u003d constants.OFPORT_INVALID:"},{"line_number":366,"context_line":"                LOG.error(_LE(\"DVR: Duplicate DVR router interface detected \""},{"line_number":367,"context_line":"                              \"for subnet %s\"), subnet_uuid)"},{"line_number":368,"context_line":"                return"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa6399be_73ad829a","side":"PARENT","line":365,"range":{"start_line":364,"start_character":0,"end_line":365,"end_character":56},"in_reply_to":"fa6399be_ecc8da76","updated":"2016-10-20 07:40:15.000000000","message":"Then I think this optimization should go with a separate patch. This patch deals with wrong condition and error message. Duplicate compute port processing should not break break anything, however the optimization can. \n\nI also have a concern regarding skipping processing in case a subnet is in local map, seems we shouldn\u0027t skip processing in case of resync. So this probably needs some refactoring, not just return at #363. Definitely a separate patch.","commit_id":"0c76de8d0184ef069cd49a58657ffd5f76adf392"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"9cdf6b7af24d535c0c36ac3dcb2c7df1a94d9998","unresolved":false,"context_lines":[{"line_number":361,"context_line":"        ldm \u003d None"},{"line_number":362,"context_line":"        if subnet_uuid in self.local_dvr_map:"},{"line_number":363,"context_line":"            ldm \u003d self.local_dvr_map[subnet_uuid]"},{"line_number":364,"context_line":"            csnat_ofport \u003d ldm.get_csnat_ofport()"},{"line_number":365,"context_line":"            if csnat_ofport \u003d\u003d constants.OFPORT_INVALID:"},{"line_number":366,"context_line":"                LOG.error(_LE(\"DVR: Duplicate DVR router interface detected \""},{"line_number":367,"context_line":"                              \"for subnet %s\"), subnet_uuid)"},{"line_number":368,"context_line":"                return"}],"source_content_type":"text/x-python","patch_set":1,"id":"fa6399be_ea3aa1e6","side":"PARENT","line":365,"range":{"start_line":364,"start_character":0,"end_line":365,"end_character":56},"in_reply_to":"fa6399be_ff5c257f","updated":"2016-10-19 09:19:14.000000000","message":"There is no separate subnet for csnat and subnet for router port, it\u0027s always the same subnet in the map.","commit_id":"0c76de8d0184ef069cd49a58657ffd5f76adf392"}]}
