)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":8313,"name":"Lajos Katona","display_name":"lajoskatona","email":"katonalala@gmail.com","username":"elajkat","status":"Ericsson Software Technology"},"change_message_id":"d155c8bc122dc80353fffebd86881bbf5b7a757d","unresolved":true,"context_lines":[{"line_number":25,"context_line":"a lower level (i.e. higher number) would instead bind the port to a"},{"line_number":26,"context_line":"segment that isn\u0027t supposed to exist at that level."},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"This patch reverts the change made in [0], and adds a unit test that"},{"line_number":29,"context_line":"covers the bug described in [1]."},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"[0]: https://review.opendev.org/c/openstack/neutron/+/980637"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"9ab3029f_de3f08e7","line":28,"range":{"start_line":28,"start_character":11,"end_line":28,"end_character":18},"updated":"2026-08-13 08:08:13.000000000","message":"why didn\u0027t you proposed a revert patch than, it is a little confusing at least for me.\nThe change https://review.opendev.org/c/openstack/neutron/+/980637/1/neutron/plugins/ml2/driver_context.py added filter_dynamic\u003dNone, nd this commit reverts it, but as not with a \"real revert\" patch, harder to have all participants in the review","commit_id":"147b0243443f264b194336320da295705f69ce02"},{"author":{"_account_id":18031,"name":"Thomas Bachman","email":"tbachman@yahoo.com","username":"bachmantech"},"change_message_id":"fc1e8ad6039452bc15aa1ebef899ad1668ad3988","unresolved":true,"context_lines":[{"line_number":25,"context_line":"a lower level (i.e. higher number) would instead bind the port to a"},{"line_number":26,"context_line":"segment that isn\u0027t supposed to exist at that level."},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"This patch reverts the change made in [0], and adds a unit test that"},{"line_number":29,"context_line":"covers the bug described in [1]."},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"[0]: https://review.opendev.org/c/openstack/neutron/+/980637"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"f1e0766b_f62c2f3f","line":28,"range":{"start_line":28,"start_character":11,"end_line":28,"end_character":18},"in_reply_to":"9ab3029f_de3f08e7","updated":"2026-08-13 15:45:25.000000000","message":"No problem doing a revert - this patch initially started out trying to come up with an alternate way to address the issue raised by the reviewer. As I dug into it more, I realized that it probably should be reverted (i.e. not a bug). I\u0027ll create a separate patch that does the revert, and if that looks good, I\u0027ll abandon this one. Thanks!","commit_id":"147b0243443f264b194336320da295705f69ce02"},{"author":{"_account_id":8313,"name":"Lajos Katona","display_name":"lajoskatona","email":"katonalala@gmail.com","username":"elajkat","status":"Ericsson Software Technology"},"change_message_id":"5f8f252f5aa4ea09e7adcbfd69e407c58d873479","unresolved":false,"context_lines":[{"line_number":25,"context_line":"a lower level (i.e. higher number) would instead bind the port to a"},{"line_number":26,"context_line":"segment that isn\u0027t supposed to exist at that level."},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"This patch reverts the change made in [0], and adds a unit test that"},{"line_number":29,"context_line":"covers the bug described in [1]."},{"line_number":30,"context_line":""},{"line_number":31,"context_line":"[0]: https://review.opendev.org/c/openstack/neutron/+/980637"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"d894c937_e7b4e583","line":28,"range":{"start_line":28,"start_character":11,"end_line":28,"end_character":18},"in_reply_to":"f1e0766b_f62c2f3f","updated":"2026-08-14 12:37:46.000000000","message":"thanks for checking","commit_id":"147b0243443f264b194336320da295705f69ce02"}],"/PATCHSET_LEVEL":[{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"f8ed0bbdef735022016d43693997a8017fb2f7c3","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"1618071d_5e186b03","updated":"2026-08-07 08:23:31.000000000","message":"To be honest, with the description and the patch provided, the error is difficult to see. Please, improve the description both in the launchpad bug and the commit  message.\n\nIf I\u0027m not wrong, the problem is still in the port deletion. What the original fix tried to solve was the segment expansion (`_expand_segment`) called from `PortContext.binding_levels`:\n```\n@property\ndef binding_levels(self):\n    if self._binding_levels:\n        return [{\n            api.BOUND_DRIVER: level.driver,\n            api.BOUND_SEGMENT: self._expand_segment(level.segment_id)\n        } for level in self._binding_levels]\n```\n\nIn a 2-level HPB binding, the levels look like:\n* Level 0: fabric driver -\u003e static VXLAN segment (seg1)\n* Level 1: agent driver -\u003e dynamic VLAN segment (seg2)\n\nThe segment expansion fails because it has only static segments.\n\nThe fix https://review.opendev.org/c/openstack/neutron/+/980637 expanded this list to have static and dynamic level in all operations. That means during the port binding operation, the level 0 binding had access to all segments (static and dynamic).\n\nYour fix tries to bring the segment expansion only to the port deletion.\n\nPlease, provide this information in both places.","commit_id":"d997dd6a1c049e579b9d1e5666e30c18a3cd1628"},{"author":{"_account_id":18031,"name":"Thomas Bachman","email":"tbachman@yahoo.com","username":"bachmantech"},"change_message_id":"74959468f533fc5f518caa76b86688b286c846c8","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"cf43a1a3_7d48abe9","in_reply_to":"1618071d_5e186b03","updated":"2026-08-07 12:20:34.000000000","message":"I\u0027ll update the bug and description to elaborate. The problem is that the patch [0] from the description results in both static and dynamic segments being returned when binding at level 0. The mechanism manager\u0027s code to bind at each level expects to start with just the static segments. Binding at any level should return just the segments allocated for the next level, which are then used in the recursive call to _bind_port_level: \n            try:\n                context._prepare_to_bind(segments_to_bind)\n                driver.obj.bind_port(context)\n                segment \u003d context._new_bound_segment\n                if segment:\n                    pbl_obj \u003d ports.PortBindingLevel(\n                        context.plugin_context,\n                        port_id\u003dport_id,\n                        host\u003dcontext.host,\n                        level\u003dlevel,\n                        driver\u003ddriver.name,\n                        segment_id\u003dsegment\n                    )\n                    context._push_binding_level(pbl_obj)\n                    next_segments \u003d context._next_segments_to_bind\n                    if next_segments:\n                        # Continue binding another level.\n                        if self._bind_port_level(context, level + 1,\n                                                 next_segments):\n\nThe problem with the patch in [0] is that once dynamic segments have been allocated, they will show up at level 0. This results in unintended behavior, where a mechanism driver that was only meant to bind a port at a lower level would instead bind the port at level 0.\n\nI haven\u0027t looked close enough at the unwinding/delete call path, so I wasn\u0027t sure if the proposed fix was sufficient. I\u0027ll look into creating a UT to reproduce the original issue.","commit_id":"d997dd6a1c049e579b9d1e5666e30c18a3cd1628"}],"neutron/plugins/ml2/plugin.py":[{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"f8ed0bbdef735022016d43693997a8017fb2f7c3","unresolved":true,"context_lines":[{"line_number":2266,"context_line":"            network \u003d self.get_network(context, port[\u0027network_id\u0027])"},{"line_number":2267,"context_line":"            # Use a NetworkContext that has both static and dynamic"},{"line_number":2268,"context_line":"            # segments when creating the PortContext"},{"line_number":2269,"context_line":"            segments \u003d segments_db.get_network_segments(context, network[\u0027id\u0027],"},{"line_number":2270,"context_line":"                                             filter_dynamic\u003dNone)"},{"line_number":2271,"context_line":"            network_context \u003d driver_context.NetworkContext("},{"line_number":2272,"context_line":"                self, context, network, segments\u003dsegments)"},{"line_number":2273,"context_line":"            bound_mech_contexts \u003d []"}],"source_content_type":"text/x-python","patch_set":3,"id":"77769b72_da3ea54f","line":2270,"range":{"start_line":2269,"start_character":56,"end_line":2270,"end_character":64},"updated":"2026-08-07 08:23:31.000000000","message":"nit: please indent these lines correctly","commit_id":"d997dd6a1c049e579b9d1e5666e30c18a3cd1628"}],"neutron/tests/unit/plugins/ml2/test_driver_context.py":[{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"f8ed0bbdef735022016d43693997a8017fb2f7c3","unresolved":true,"context_lines":[{"line_number":23,"context_line":"from neutron.tests import base"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"class TestNetworkContext(base.BaseTestCase):"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"    def test_network_segments_includes_dynamic_segments(self):"},{"line_number":29,"context_line":"        plugin \u003d mock.Mock()"}],"source_content_type":"text/x-python","patch_set":3,"id":"1c73c7ca_12a03da1","side":"PARENT","line":26,"updated":"2026-08-07 08:23:31.000000000","message":"You are deleting tests but adding none. You should provide any test to prevent a future regression.","commit_id":"3cd91cd333b6b05bf335b724bfbb9889092d2897"},{"author":{"_account_id":18031,"name":"Thomas Bachman","email":"tbachman@yahoo.com","username":"bachmantech"},"change_message_id":"97e33c37a83421c1b42ad54fc2dfd54a951a4485","unresolved":true,"context_lines":[{"line_number":23,"context_line":"from neutron.tests import base"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":""},{"line_number":26,"context_line":"class TestNetworkContext(base.BaseTestCase):"},{"line_number":27,"context_line":""},{"line_number":28,"context_line":"    def test_network_segments_includes_dynamic_segments(self):"},{"line_number":29,"context_line":"        plugin \u003d mock.Mock()"}],"source_content_type":"text/x-python","patch_set":3,"id":"59544aac_db2a0c78","side":"PARENT","line":26,"in_reply_to":"1c73c7ca_12a03da1","updated":"2026-08-10 15:52:22.000000000","message":"The test that\u0027s removed was to test for what I think is the wrong behavior. FWIW, I\u0027ve updated the patch to include a test that fails if the original code isn\u0027t reverted, and passes with the revert.","commit_id":"3cd91cd333b6b05bf335b724bfbb9889092d2897"}]}
