)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"2ef25624c6139de5f5ed1b4d89b463cb42336320","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Check for agent restarted after checking for DVR port"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Commit a5244d6d44d2b66de27dc77efa7830fa657260be changed the check"},{"line_number":10,"context_line":"order so regular non-dvr ports are checked for agent restarted."},{"line_number":11,"context_line":"However regular ports may be unbound already, which leads to the"},{"line_number":12,"context_line":"error in the bug description: agent_restarted check is done against"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"7faddb67_777641a7","line":9,"range":{"start_line":9,"start_character":0,"end_line":9,"end_character":47},"updated":"2019-07-10 07:50:15.000000000","message":"So, IMO, nothing to do with this commit. The root cause is unclear.","commit_id":"335df863ea05efe7cbbf5caca934bccdaa2dace2"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"3bd3e311b3cf53d3056ffc447d81abeb2c6d193e","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Check for agent restarted after checking for DVR port"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Commit a5244d6d44d2b66de27dc77efa7830fa657260be changed the check"},{"line_number":10,"context_line":"order so regular non-dvr ports are checked for agent restarted."},{"line_number":11,"context_line":"However regular ports may be unbound already, which leads to the"},{"line_number":12,"context_line":"error in the bug description: agent_restarted check is done against"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"7faddb67_d74ff531","line":9,"range":{"start_line":9,"start_character":0,"end_line":9,"end_character":47},"in_reply_to":"7faddb67_777641a7","updated":"2019-07-10 08:12:44.000000000","message":"please see below","commit_id":"335df863ea05efe7cbbf5caca934bccdaa2dace2"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"294369fdd556f414f454964cac3a2812920eba45","unresolved":false,"context_lines":[{"line_number":10,"context_line":"order so regular non-dvr ports are checked for agent restarted."},{"line_number":11,"context_line":"However regular ports may be unbound already, which leads to the"},{"line_number":12,"context_line":"error in the bug description: agent_restarted check is done against"},{"line_number":13,"context_line":"a \u0027None\u0027 agent."},{"line_number":14,"context_line":"This patch fixed logic back - only check agent_restarted for dvr ports."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"This also adds some logging to have a clue why update port up/down fails."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"7faddb67_7f9f0803","line":13,"range":{"start_line":13,"start_character":2,"end_line":13,"end_character":14},"updated":"2019-07-09 15:05:15.000000000","message":"But how could this happen?","commit_id":"335df863ea05efe7cbbf5caca934bccdaa2dace2"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"c09208b93a41378030338d24a9d16c1c6b29268a","unresolved":false,"context_lines":[{"line_number":10,"context_line":"order so regular non-dvr ports are checked for agent restarted."},{"line_number":11,"context_line":"However regular ports may be unbound already, which leads to the"},{"line_number":12,"context_line":"error in the bug description: agent_restarted check is done against"},{"line_number":13,"context_line":"a \u0027None\u0027 agent."},{"line_number":14,"context_line":"This patch fixed logic back - only check agent_restarted for dvr ports."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"This also adds some logging to have a clue why update port up/down fails."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"7faddb67_fc678350","line":13,"range":{"start_line":13,"start_character":2,"end_line":13,"end_character":14},"in_reply_to":"7faddb67_1aa86275","updated":"2019-07-09 16:25:04.000000000","message":"But we have following code, if it is unbound, the port_context should not return a valid value:\n\"\"\"\n        port_context \u003d plugin.get_bound_port_context(\n                rpc_context, port_id, host)\n        if not port_context:\n            # port deleted\n            return\n\"\"\"\nMaybe some extreme case was not covered in _bind_port_if_needed:\nhttps://github.com/openstack/neutron/blob/master/neutron/plugins/ml2/plugin.py#L493\n\nBut I\u0027m still confusing about this. So do you have any reproduce procedure for this?","commit_id":"335df863ea05efe7cbbf5caca934bccdaa2dace2"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"2ef25624c6139de5f5ed1b4d89b463cb42336320","unresolved":false,"context_lines":[{"line_number":10,"context_line":"order so regular non-dvr ports are checked for agent restarted."},{"line_number":11,"context_line":"However regular ports may be unbound already, which leads to the"},{"line_number":12,"context_line":"error in the bug description: agent_restarted check is done against"},{"line_number":13,"context_line":"a \u0027None\u0027 agent."},{"line_number":14,"context_line":"This patch fixed logic back - only check agent_restarted for dvr ports."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"This also adds some logging to have a clue why update port up/down fails."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"7faddb67_d73055eb","line":13,"range":{"start_line":13,"start_character":2,"end_line":13,"end_character":14},"in_reply_to":"7faddb67_26797d2e","updated":"2019-07-10 07:50:15.000000000","message":"One more thing:\nhttps://github.com/openstack/neutron/blob/master/neutron/plugins/ml2/drivers/l2pop/mech_driver.py#L295\nThis line will change the agent, if it is None, the code will not go futher.\n\nMaybe you can give us some infomation like: the neutron version, how to deploy it? The size of the deployment. The probability of this exception raised.","commit_id":"335df863ea05efe7cbbf5caca934bccdaa2dace2"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"033b7605a0b9c20aa93f7a52c8f94c2c9cd48053","unresolved":false,"context_lines":[{"line_number":10,"context_line":"order so regular non-dvr ports are checked for agent restarted."},{"line_number":11,"context_line":"However regular ports may be unbound already, which leads to the"},{"line_number":12,"context_line":"error in the bug description: agent_restarted check is done against"},{"line_number":13,"context_line":"a \u0027None\u0027 agent."},{"line_number":14,"context_line":"This patch fixed logic back - only check agent_restarted for dvr ports."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"This also adds some logging to have a clue why update port up/down fails."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"7faddb67_0d5b3c54","line":13,"range":{"start_line":13,"start_character":2,"end_line":13,"end_character":14},"in_reply_to":"7faddb67_4d2b742f","updated":"2019-07-10 11:08:17.000000000","message":"Yes, agent logs have errors for non-existing ports in OVS","commit_id":"335df863ea05efe7cbbf5caca934bccdaa2dace2"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"98ff1dbeb13a976b43479bc68f685f9966e5759b","unresolved":false,"context_lines":[{"line_number":10,"context_line":"order so regular non-dvr ports are checked for agent restarted."},{"line_number":11,"context_line":"However regular ports may be unbound already, which leads to the"},{"line_number":12,"context_line":"error in the bug description: agent_restarted check is done against"},{"line_number":13,"context_line":"a \u0027None\u0027 agent."},{"line_number":14,"context_line":"This patch fixed logic back - only check agent_restarted for dvr ports."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"This also adds some logging to have a clue why update port up/down fails."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"7faddb67_4d2b742f","line":13,"range":{"start_line":13,"start_character":2,"end_line":13,"end_character":14},"in_reply_to":"7faddb67_77d3a139","updated":"2019-07-10 10:51:24.000000000","message":"Thanks for the information.\nSo, after the exception, the agent side will have stale resources remained?","commit_id":"335df863ea05efe7cbbf5caca934bccdaa2dace2"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"2aa9754281e7eff58039472290cea53788a25b90","unresolved":false,"context_lines":[{"line_number":10,"context_line":"order so regular non-dvr ports are checked for agent restarted."},{"line_number":11,"context_line":"However regular ports may be unbound already, which leads to the"},{"line_number":12,"context_line":"error in the bug description: agent_restarted check is done against"},{"line_number":13,"context_line":"a \u0027None\u0027 agent."},{"line_number":14,"context_line":"This patch fixed logic back - only check agent_restarted for dvr ports."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"This also adds some logging to have a clue why update port up/down fails."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"7faddb67_1aa86275","line":13,"range":{"start_line":13,"start_character":2,"end_line":13,"end_character":14},"in_reply_to":"7faddb67_7f9f0803","updated":"2019-07-09 15:33:54.000000000","message":"Unbound port has empty host in port context, so no agent is returned by host.","commit_id":"335df863ea05efe7cbbf5caca934bccdaa2dace2"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"3bd3e311b3cf53d3056ffc447d81abeb2c6d193e","unresolved":false,"context_lines":[{"line_number":10,"context_line":"order so regular non-dvr ports are checked for agent restarted."},{"line_number":11,"context_line":"However regular ports may be unbound already, which leads to the"},{"line_number":12,"context_line":"error in the bug description: agent_restarted check is done against"},{"line_number":13,"context_line":"a \u0027None\u0027 agent."},{"line_number":14,"context_line":"This patch fixed logic back - only check agent_restarted for dvr ports."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"This also adds some logging to have a clue why update port up/down fails."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"7faddb67_77d3a139","line":13,"range":{"start_line":13,"start_character":2,"end_line":13,"end_character":14},"in_reply_to":"7faddb67_d73055eb","updated":"2019-07-10 08:12:44.000000000","message":"Version: Queens, size of deployment: 80 nodes, non-DVR. gtw node hosting over 1000 ports, during constant resources creation/deletion can see described errors in neutron server logs.\n\nHappens not in l2 pop mech driver update_port_up but in ml2 rpc update_devide_down: https://github.com/openstack/neutron/blob/master/neutron/plugins/ml2/rpc.py#L258","commit_id":"335df863ea05efe7cbbf5caca934bccdaa2dace2"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"44cb694e43e9d7caaddad550d29ef4b90028b3ab","unresolved":false,"context_lines":[{"line_number":10,"context_line":"order so regular non-dvr ports are checked for agent restarted."},{"line_number":11,"context_line":"However regular ports may be unbound already, which leads to the"},{"line_number":12,"context_line":"error in the bug description: agent_restarted check is done against"},{"line_number":13,"context_line":"a \u0027None\u0027 agent."},{"line_number":14,"context_line":"This patch fixed logic back - only check agent_restarted for dvr ports."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"This also adds some logging to have a clue why update port up/down fails."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"7faddb67_26797d2e","line":13,"range":{"start_line":13,"start_character":2,"end_line":13,"end_character":14},"in_reply_to":"7faddb67_fc678350","updated":"2019-07-10 03:42:33.000000000","message":"I don\u0027t have an exact repro procedure, I just saw this error on a production environment, got the traceback and saw that port context may return empty host.","commit_id":"335df863ea05efe7cbbf5caca934bccdaa2dace2"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"294369fdd556f414f454964cac3a2812920eba45","unresolved":false,"context_lines":[{"line_number":11,"context_line":"However regular ports may be unbound already, which leads to the"},{"line_number":12,"context_line":"error in the bug description: agent_restarted check is done against"},{"line_number":13,"context_line":"a \u0027None\u0027 agent."},{"line_number":14,"context_line":"This patch fixed logic back - only check agent_restarted for dvr ports."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"This also adds some logging to have a clue why update port up/down fails."},{"line_number":17,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"7faddb67_9fbbe470","line":14,"range":{"start_line":14,"start_character":23,"end_line":14,"end_character":27},"updated":"2019-07-09 15:05:15.000000000","message":"According to the change you mentioned here:\nhttps://review.opendev.org/#/c/640797/19/neutron/plugins/ml2/rpc.py Left Line 331.\nThe original code did not cover a None agent for a regular port as well.","commit_id":"335df863ea05efe7cbbf5caca934bccdaa2dace2"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"2ef25624c6139de5f5ed1b4d89b463cb42336320","unresolved":false,"context_lines":[{"line_number":11,"context_line":"However regular ports may be unbound already, which leads to the"},{"line_number":12,"context_line":"error in the bug description: agent_restarted check is done against"},{"line_number":13,"context_line":"a \u0027None\u0027 agent."},{"line_number":14,"context_line":"This patch fixed logic back - only check agent_restarted for dvr ports."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"This also adds some logging to have a clue why update port up/down fails."},{"line_number":17,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"7faddb67_794cfa9d","line":14,"range":{"start_line":14,"start_character":23,"end_line":14,"end_character":27},"in_reply_to":"7faddb67_06a321a0","updated":"2019-07-10 07:50:15.000000000","message":"This is the original code without the commit a5244d6d44d2b66de27dc77efa7830fa657260be :\n\"\"\"\n        if (port[\u0027device_owner\u0027] \u003d\u003d n_const.DEVICE_OWNER_DVR_INTERFACE and\n                not l2pop_driver.obj.agent_restarted(port_context)):\n            return\n\"\"\"\n\nSo, a port_context with None host will still be sent to the exception place for a reguler port. That is saying the commit a5244d6d44d2b66de27dc77efa7830fa657260be is not related. So here \u0027back\u0027 and this reference commit in this commit message should be replaced with a precisely statement.","commit_id":"335df863ea05efe7cbbf5caca934bccdaa2dace2"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"3bd3e311b3cf53d3056ffc447d81abeb2c6d193e","unresolved":false,"context_lines":[{"line_number":11,"context_line":"However regular ports may be unbound already, which leads to the"},{"line_number":12,"context_line":"error in the bug description: agent_restarted check is done against"},{"line_number":13,"context_line":"a \u0027None\u0027 agent."},{"line_number":14,"context_line":"This patch fixed logic back - only check agent_restarted for dvr ports."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"This also adds some logging to have a clue why update port up/down fails."},{"line_number":17,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"7faddb67_37b689fc","line":14,"range":{"start_line":14,"start_character":23,"end_line":14,"end_character":27},"in_reply_to":"7faddb67_794cfa9d","updated":"2019-07-10 08:12:44.000000000","message":"So in original code quoted above if port has device_owner !\u003d DEVICE_OWNER_DVR_INTERFACE - agent_restarted() will not even be called. Commit a5244d6d44d2b66de27dc77efa7830fa657260be changed that behavior, so that agent_restarted() called always, no matter which device_owner a port has.","commit_id":"335df863ea05efe7cbbf5caca934bccdaa2dace2"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"c09208b93a41378030338d24a9d16c1c6b29268a","unresolved":false,"context_lines":[{"line_number":11,"context_line":"However regular ports may be unbound already, which leads to the"},{"line_number":12,"context_line":"error in the bug description: agent_restarted check is done against"},{"line_number":13,"context_line":"a \u0027None\u0027 agent."},{"line_number":14,"context_line":"This patch fixed logic back - only check agent_restarted for dvr ports."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"This also adds some logging to have a clue why update port up/down fails."},{"line_number":17,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"7faddb67_9c776f3b","line":14,"range":{"start_line":14,"start_character":23,"end_line":14,"end_character":27},"in_reply_to":"7faddb67_7ae716e6","updated":"2019-07-09 16:25:04.000000000","message":"But the following test code just has one output \"2\".\n\ndef call():\n    print \"call\"\n    return False\n\ndevice_owner \u003d \"nova\"\n\nif device_owner \u003d\u003d \"dvr\" and call():\n    print \"1\"\nelse:\n    print \"2\"\n\n\n$ python\nPython 2.7.5 (default, Oct 30 2018, 23:45:53) \n[GCC 4.8.5 20150623 (Red Hat 4.8.5-36)] on linux2\nType \"help\", \"copyright\", \"credits\" or \"license\" for more information.\n\u003e\u003e\u003e def call():\n...     print \"call\"\n...     return False\n... \n\u003e\u003e\u003e device_owner \u003d \"nova\"\n\u003e\u003e\u003e \n\u003e\u003e\u003e if device_owner \u003d\u003d \"dvr\" and call():\n...     print \"1\"\n... else:\n...     print \"2\"\n... \n2\n\u003e\u003e\u003e \n\u003e\u003e\u003e\n\n\n$ python3\nPython 3.6.6 (default, Jan 26 2019, 16:53:05) \n[GCC 4.8.5 20150623 (Red Hat 4.8.5-36)] on linux\nType \"help\", \"copyright\", \"credits\" or \"license\" for more information.\n\u003e\u003e\u003e def call():\n...     print(\"call\")\n...     return False\n... \n\u003e\u003e\u003e device_owner \u003d \"nova\"\n\u003e\u003e\u003e \n\u003e\u003e\u003e if device_owner \u003d\u003d \"dvr\" and call():\n...     print(\"1\")\n... else:\n...     print(\"2\")\n... \n2\n\u003e\u003e\u003e \n\u003e\u003e\u003e","commit_id":"335df863ea05efe7cbbf5caca934bccdaa2dace2"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"44cb694e43e9d7caaddad550d29ef4b90028b3ab","unresolved":false,"context_lines":[{"line_number":11,"context_line":"However regular ports may be unbound already, which leads to the"},{"line_number":12,"context_line":"error in the bug description: agent_restarted check is done against"},{"line_number":13,"context_line":"a \u0027None\u0027 agent."},{"line_number":14,"context_line":"This patch fixed logic back - only check agent_restarted for dvr ports."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"This also adds some logging to have a clue why update port up/down fails."},{"line_number":17,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"7faddb67_06a321a0","line":14,"range":{"start_line":14,"start_character":23,"end_line":14,"end_character":27},"in_reply_to":"7faddb67_9c776f3b","updated":"2019-07-10 03:42:33.000000000","message":"Right, like I said: the second expression is not executed - \u0027call\u0027 is not printed.","commit_id":"335df863ea05efe7cbbf5caca934bccdaa2dace2"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"2aa9754281e7eff58039472290cea53788a25b90","unresolved":false,"context_lines":[{"line_number":11,"context_line":"However regular ports may be unbound already, which leads to the"},{"line_number":12,"context_line":"error in the bug description: agent_restarted check is done against"},{"line_number":13,"context_line":"a \u0027None\u0027 agent."},{"line_number":14,"context_line":"This patch fixed logic back - only check agent_restarted for dvr ports."},{"line_number":15,"context_line":""},{"line_number":16,"context_line":"This also adds some logging to have a clue why update port up/down fails."},{"line_number":17,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"7faddb67_7ae716e6","line":14,"range":{"start_line":14,"start_character":23,"end_line":14,"end_character":27},"in_reply_to":"7faddb67_9fbbe470","updated":"2019-07-09 15:33:54.000000000","message":"In python if first expression before \u0027and\u0027 is false - second expression is not executed for the sake of efficiency.","commit_id":"335df863ea05efe7cbbf5caca934bccdaa2dace2"}],"neutron/plugins/ml2/rpc.py":[{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"3f1c2af3556032e7fbdb256c2ee90f59a3b51c62","unresolved":false,"context_lines":[{"line_number":344,"context_line":"                agent_restarted \u003d l2pop_driver.obj.agent_restarted("},{"line_number":345,"context_line":"                    port_context)"},{"line_number":346,"context_line":"            if not agent_restarted:"},{"line_number":347,"context_line":"                return"},{"line_number":348,"context_line":""},{"line_number":349,"context_line":"        port \u003d port_context.current"},{"line_number":350,"context_line":"        if (port[\u0027device_owner\u0027] !\u003d n_const.DEVICE_OWNER_DVR_INTERFACE and"}],"source_content_type":"text/x-python","patch_set":1,"id":"7faddb67_e91274b1","line":347,"updated":"2019-07-08 18:41:30.000000000","message":"Shouldn\u0027t we add a test for this? :)","commit_id":"b929668f40c3deed1f78bd4788437fd217f10e34"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"98ff1dbeb13a976b43479bc68f685f9966e5759b","unresolved":false,"context_lines":[{"line_number":339,"context_line":"        # and so we don\u0027t need to update it again here. But, l2pop did not"},{"line_number":340,"context_line":"        # handle DVR ports while restart neutron-*-agent, we need to handle"},{"line_number":341,"context_line":"        # it here."},{"line_number":342,"context_line":"        if agent_restarted is None:"},{"line_number":343,"context_line":"            agent_restarted \u003d l2pop_driver.obj.agent_restarted(port_context)"},{"line_number":344,"context_line":"        if (port[\u0027device_owner\u0027] \u003d\u003d n_const.DEVICE_OWNER_DVR_INTERFACE and"},{"line_number":345,"context_line":"                not agent_restarted):"},{"line_number":346,"context_line":"            return"}],"source_content_type":"text/x-python","patch_set":2,"id":"7faddb67_b254c7cb","side":"PARENT","line":343,"range":{"start_line":342,"start_character":8,"end_line":343,"end_character":76},"updated":"2019-07-10 10:51:24.000000000","message":"We are going to abandon these lines.\nBut for stable branches, we may need a fix, how about fix this here:\nhttps://review.opendev.org/#/c/669640/2/neutron/plugins/ml2/drivers/l2pop/mech_driver.py@258\nhttps://review.opendev.org/#/c/669640/2/neutron/plugins/ml2/drivers/l2pop/mech_driver.py@260\ncheck the context.host or agent like the other function do.\n\nOur local queens has directly removed this, LOL","commit_id":"28721b4c8e48ffc14211272fc2c226b1ba5c1ba0"},{"author":{"_account_id":5948,"name":"Oleg Bondarev","email":"obondarev@mirantis.com","username":"obondarev"},"change_message_id":"61d3f4a14e0516a52aa18e97c5ebd9cff5d91b12","unresolved":false,"context_lines":[{"line_number":339,"context_line":"        # and so we don\u0027t need to update it again here. But, l2pop did not"},{"line_number":340,"context_line":"        # handle DVR ports while restart neutron-*-agent, we need to handle"},{"line_number":341,"context_line":"        # it here."},{"line_number":342,"context_line":"        if agent_restarted is None:"},{"line_number":343,"context_line":"            agent_restarted \u003d l2pop_driver.obj.agent_restarted(port_context)"},{"line_number":344,"context_line":"        if (port[\u0027device_owner\u0027] \u003d\u003d n_const.DEVICE_OWNER_DVR_INTERFACE and"},{"line_number":345,"context_line":"                not agent_restarted):"},{"line_number":346,"context_line":"            return"}],"source_content_type":"text/x-python","patch_set":2,"id":"7faddb67_0d725ce4","side":"PARENT","line":343,"range":{"start_line":342,"start_character":8,"end_line":343,"end_character":76},"in_reply_to":"7faddb67_b254c7cb","updated":"2019-07-10 11:06:54.000000000","message":"Fix in inside agent_restarted() is ok, but I\u0027d like to avoid calling agent_restarted in case non-dvr ports also for efficiency.","commit_id":"28721b4c8e48ffc14211272fc2c226b1ba5c1ba0"}],"neutron/tests/unit/plugins/ml2/test_rpc.py":[{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"3edb838d1acfe839e063a21c8def56967bb1aec5","unresolved":false,"context_lines":[{"line_number":277,"context_line":"            ml2_db_get_port.return_value \u003d port"},{"line_number":278,"context_line":"            self.callbacks.notify_l2pop_port_wiring("},{"line_number":279,"context_line":"                \u0027port_id\u0027, mock.Mock(), \u0027DOWN\u0027, \u0027host\u0027, agent_restarted\u003dNone)"},{"line_number":280,"context_line":"            self.assertFalse(l2pop_driver.obj.agent_restarted.called)"},{"line_number":281,"context_line":""},{"line_number":282,"context_line":"    def test_update_device_down_call_update_port_status_failed(self):"},{"line_number":283,"context_line":"        self.plugin.update_port_status.side_effect \u003d exc.StaleDataError"}],"source_content_type":"text/x-python","patch_set":2,"id":"7faddb67_5579d32c","line":280,"updated":"2019-07-09 09:20:49.000000000","message":"nit: there is assertNotCalled() method which can be used here also","commit_id":"335df863ea05efe7cbbf5caca934bccdaa2dace2"}]}
