)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"6b4d3a2e4faa6e3cf1f74b436f1aaa7c6ed0af9c","unresolved":true,"context_lines":[{"line_number":10,"context_line":"dhcp_agents_per_network."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"which results that in a env with 3 agents and"},{"line_number":13,"context_line":"dhcp_agents_per_network\u003d2, for a given network already welle handled"},{"line_number":14,"context_line":"by 2 agents. IF you restart the third agent I will start to handle the"},{"line_number":15,"context_line":"network as-well which will result to have 3 agents handling the network."},{"line_number":16,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"80012985_0a83d43d","line":13,"range":{"start_line":13,"start_character":55,"end_line":13,"end_character":60},"updated":"2024-03-01 09:40:33.000000000","message":"?","commit_id":"7e0b0e47e79e6b4b699ed6979b1e98155ee04042"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"9133d59b96f48a3d9f5d0bbf90c4d9d32c00577e","unresolved":false,"context_lines":[{"line_number":10,"context_line":"dhcp_agents_per_network."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"which results that in a env with 3 agents and"},{"line_number":13,"context_line":"dhcp_agents_per_network\u003d2, for a given network already welle handled"},{"line_number":14,"context_line":"by 2 agents. IF you restart the third agent I will start to handle the"},{"line_number":15,"context_line":"network as-well which will result to have 3 agents handling the network."},{"line_number":16,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"1c1a3a60_3bd7ef3b","line":13,"range":{"start_line":13,"start_character":55,"end_line":13,"end_character":60},"in_reply_to":"80012985_0a83d43d","updated":"2024-03-25 10:23:31.000000000","message":"fixed :-)","commit_id":"7e0b0e47e79e6b4b699ed6979b1e98155ee04042"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"8f23bfc99dd9430f708b0095cd219ff8ca3dea1a","unresolved":true,"context_lines":[{"line_number":9,"context_line":"When using routed provided network, the condition is bypassing"},{"line_number":10,"context_line":"dhcp_agents_per_network which results that in a env with 3 agents and"},{"line_number":11,"context_line":"dhcp_agents_per_network\u003d2, for a given network already well handled"},{"line_number":12,"context_line":"by 2 agents. If restarting the third agent Ii will start to handle the"},{"line_number":13,"context_line":"network also which will result to have 3 agents handling the"},{"line_number":14,"context_line":"network."},{"line_number":15,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"edb55d25_fc2b6ce1","line":12,"range":{"start_line":12,"start_character":43,"end_line":12,"end_character":45},"updated":"2024-04-01 02:15:14.000000000","message":"s/it","commit_id":"cf4b6829d0a4192ee97435c5eef66b3df7609668"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"68915916073aea1e50b52af303b1395ab96ed315","unresolved":false,"context_lines":[{"line_number":9,"context_line":"When using routed provided network, the condition is bypassing"},{"line_number":10,"context_line":"dhcp_agents_per_network which results that in a env with 3 agents and"},{"line_number":11,"context_line":"dhcp_agents_per_network\u003d2, for a given network already well handled"},{"line_number":12,"context_line":"by 2 agents. If restarting the third agent Ii will start to handle the"},{"line_number":13,"context_line":"network also which will result to have 3 agents handling the"},{"line_number":14,"context_line":"network."},{"line_number":15,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"6afbd7b4_6db0f074","line":12,"range":{"start_line":12,"start_character":43,"end_line":12,"end_character":45},"in_reply_to":"edb55d25_fc2b6ce1","updated":"2024-04-22 12:22:17.000000000","message":"Done","commit_id":"cf4b6829d0a4192ee97435c5eef66b3df7609668"}],"/PATCHSET_LEVEL":[{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"6b4d3a2e4faa6e3cf1f74b436f1aaa7c6ed0af9c","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"b929087f_333e2297","updated":"2024-03-01 09:40:33.000000000","message":"1) Please open a LP bug describing the issue.\n2) Add testing to avoid regressions.","commit_id":"7e0b0e47e79e6b4b699ed6979b1e98155ee04042"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"9133d59b96f48a3d9f5d0bbf90c4d9d32c00577e","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"7d0fc994_5919da82","in_reply_to":"b929087f_333e2297","updated":"2024-03-25 10:23:31.000000000","message":"Sure, done.","commit_id":"7e0b0e47e79e6b4b699ed6979b1e98155ee04042"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"4366302c197d94c219501017b5988bc57fc328db","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"ae65b3c8_aebba53b","updated":"2024-04-18 17:29:08.000000000","message":"@Miguel Lavalle, do you mind to check the code change and my comment here? I am afraid this may break routed networks. Let me know what you think. If it\u0027s not a risk, then I am happy to remove -1.","commit_id":"cf4b6829d0a4192ee97435c5eef66b3df7609668"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"8f23bfc99dd9430f708b0095cd219ff8ca3dea1a","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"4c2ab6cb_0168dc17","updated":"2024-04-01 02:15:14.000000000","message":"Could you please have a try for this case:\nif you have 3 dhcp-agents, network is scheduled to A and B agents. Then shutdown the A agent, your network shoule/shouldn\u0027t be auto scheduled to C agent. See what happens with and without your fix.\n\nThanks.","commit_id":"cf4b6829d0a4192ee97435c5eef66b3df7609668"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"a0287e4c629b027df27feb20fac6647556c5529e","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":2,"id":"94a2865d_9cdf9f44","updated":"2024-04-21 21:39:05.000000000","message":"The code change proposed here is correct. -1 ing it because a comment is necessary and @Yulong\u0027s comments need to be addressed. As soon that is done, I\u0027ll be happy to +2 the patch","commit_id":"cf4b6829d0a4192ee97435c5eef66b3df7609668"}],"neutron/scheduler/dhcp_agent_scheduler.py":[{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"4366302c197d94c219501017b5988bc57fc328db","unresolved":true,"context_lines":[{"line_number":79,"context_line":"                    if is_routed_network:"},{"line_number":80,"context_line":"                        if len(segments_on_network \u0026 segments_on_host) \u003d\u003d 0:"},{"line_number":81,"context_line":"                            continue"},{"line_number":82,"context_line":"                    if len(agents) \u003e\u003d agents_per_network:"},{"line_number":83,"context_line":"                        continue"},{"line_number":84,"context_line":"                    if any(dhcp_agent.id \u003d\u003d agent.id for agent in agents):"},{"line_number":85,"context_line":"                        continue"}],"source_content_type":"text/x-python","patch_set":2,"id":"8195c324_dbd68aa9","line":82,"updated":"2024-04-18 17:29:08.000000000","message":"I am not sure about this change. I think this was discussed in https://review.opendev.org/c/openstack/neutron/+/333716/17..23/neutron/scheduler/dhcp_agent_scheduler.py#b76 and though I don\u0027t fully understand the discussion there, I think it suggests that perhaps there\u0027s a good reason to handle it differently. (You may need more than agents_per_network agents since some of them cannot host all segments?)\n\nI\u0027d like Miguel to chime in here.","commit_id":"cf4b6829d0a4192ee97435c5eef66b3df7609668"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"68915916073aea1e50b52af303b1395ab96ed315","unresolved":false,"context_lines":[{"line_number":79,"context_line":"                    if is_routed_network:"},{"line_number":80,"context_line":"                        if len(segments_on_network \u0026 segments_on_host) \u003d\u003d 0:"},{"line_number":81,"context_line":"                            continue"},{"line_number":82,"context_line":"                    if len(agents) \u003e\u003d agents_per_network:"},{"line_number":83,"context_line":"                        continue"},{"line_number":84,"context_line":"                    if any(dhcp_agent.id \u003d\u003d agent.id for agent in agents):"},{"line_number":85,"context_line":"                        continue"}],"source_content_type":"text/x-python","patch_set":2,"id":"3da1af3f_020d2071","line":82,"in_reply_to":"0d6c1c9f_e2cb9c0f","updated":"2024-04-22 12:22:17.000000000","message":"I have added the comment. If you don\u0027t mind I did not changed the conditions as this would have created a too big one.\n\nIf you really prefer in your way I will update it :-)","commit_id":"cf4b6829d0a4192ee97435c5eef66b3df7609668"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"10b6f0a779ddc97d0ea60b7e73534ef234b040aa","unresolved":false,"context_lines":[{"line_number":79,"context_line":"                    if is_routed_network:"},{"line_number":80,"context_line":"                        if len(segments_on_network \u0026 segments_on_host) \u003d\u003d 0:"},{"line_number":81,"context_line":"                            continue"},{"line_number":82,"context_line":"                    if len(agents) \u003e\u003d agents_per_network:"},{"line_number":83,"context_line":"                        continue"},{"line_number":84,"context_line":"                    if any(dhcp_agent.id \u003d\u003d agent.id for agent in agents):"},{"line_number":85,"context_line":"                        continue"}],"source_content_type":"text/x-python","patch_set":2,"id":"10b8e870_f98643bc","line":82,"in_reply_to":"3da1af3f_020d2071","updated":"2024-04-22 23:10:28.000000000","message":"It\u0027s fine the way you left it.","commit_id":"cf4b6829d0a4192ee97435c5eef66b3df7609668"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"a0287e4c629b027df27feb20fac6647556c5529e","unresolved":true,"context_lines":[{"line_number":79,"context_line":"                    if is_routed_network:"},{"line_number":80,"context_line":"                        if len(segments_on_network \u0026 segments_on_host) \u003d\u003d 0:"},{"line_number":81,"context_line":"                            continue"},{"line_number":82,"context_line":"                    if len(agents) \u003e\u003d agents_per_network:"},{"line_number":83,"context_line":"                        continue"},{"line_number":84,"context_line":"                    if any(dhcp_agent.id \u003d\u003d agent.id for agent in agents):"},{"line_number":85,"context_line":"                        continue"}],"source_content_type":"text/x-python","patch_set":2,"id":"0d6c1c9f_e2cb9c0f","line":82,"in_reply_to":"49055a02_e18bf6d9","updated":"2024-04-21 21:39:05.000000000","message":"What @Sahid proposes here is correct. In fact, the conversation in https://review.opendev.org/c/openstack/neutron/+/333716/17..23/neutron/scheduler/dhcp_agent_scheduler.py#b76 stated the following:\n\n\"... For each unique segment_id you will need to check if the segment has a mapping to the host. If none of the segments have a mapping to the host, continue the loop.\n\nIf any of the segments do, then you\u0027ll probably need to do the same checks as 73-76, (for clarity, Miguel Lavalle\u0027s transcription of the referenced lines follows)\n\n                        if len(agents) \u003e\u003d agents_per_network:\n                            continue\n                        if any(dhcp_agent.id \u003d\u003d agent.id for agent in agents):\n                            continue\n\nso that will be common for both routed networks and non routed networks. Hence, why I said preivously that the if statement on L72 can just be turned into if is_routed_networks and do the logic in the first paragraph. L73-76 would move after the if statement.\"\n\n@Sahid is just completing the implementation of this recommendation. For whatever reason, we merged the code back in 2016 and forgot to make sure that our own recommendation was fully implemented.\n\nI agree with @Ihar in that a comment would be helpful to avoid confusing future readers of the code. I would comment right above line 82 (added by @Sahir) something like:\n\n\"The following two checks apply to both routed and non-routed networks\"\n\nWe might even consolidate both checks in one if statement with an or","commit_id":"cf4b6829d0a4192ee97435c5eef66b3df7609668"},{"author":{"_account_id":9656,"name":"Ihar Hrachyshka","email":"ihrachys@redhat.com","username":"ihrachys","status":"Red Hat Networking Systems Engineer"},"change_message_id":"ff806a20bb88ca354fc915c488edbcc62c2d5489","unresolved":true,"context_lines":[{"line_number":79,"context_line":"                    if is_routed_network:"},{"line_number":80,"context_line":"                        if len(segments_on_network \u0026 segments_on_host) \u003d\u003d 0:"},{"line_number":81,"context_line":"                            continue"},{"line_number":82,"context_line":"                    if len(agents) \u003e\u003d agents_per_network:"},{"line_number":83,"context_line":"                        continue"},{"line_number":84,"context_line":"                    if any(dhcp_agent.id \u003d\u003d agent.id for agent in agents):"},{"line_number":85,"context_line":"                        continue"}],"source_content_type":"text/x-python","patch_set":2,"id":"49055a02_e18bf6d9","line":82,"in_reply_to":"8195c324_dbd68aa9","updated":"2024-04-18 19:21:41.000000000","message":"(but - if there\u0027s a good reason why this logic should be different for routed networks, we should make sure the reason is captured in a comment here.)","commit_id":"cf4b6829d0a4192ee97435c5eef66b3df7609668"}]}
