)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"4d88c7c0f36995f315032c313f57757ef7bddc47","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"8bd9805a_ecc1b00e","updated":"2026-07-30 00:50:07.000000000","message":"@ralonsoh@redhat.com thank you very much for the review. Please see my follow up question in line. Please clarify when you have a chance","commit_id":"e78c8b51c82bb1293fc612f77fbc60a80762a52b"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"2cb53d9c18e834f1d30280fdce450fbd0935878b","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"bb9e4e91_2cea4430","updated":"2026-07-20 09:49:39.000000000","message":"I\u0027m not ok with this change that breaks the assumption of having a resource revision per Neutron resource, directly dependent on the Neutron resource, not a parent. This implementation will require a explicit `delete_revision`.\n\nInstead, having a `bump_revision(context, segment, TYPE_SEGMENTS)` each time we modify the parent resource will keep this 1:1 assignation untouched.","commit_id":"e78c8b51c82bb1293fc612f77fbc60a80762a52b"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"cedb12a545ac0eb0f7c5bb0c51f9a33a0efc06c4","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"20e7929d_3a8ea571","updated":"2026-07-09 14:27:42.000000000","message":"recheck failure in neutron-ovs-tempest-dvr-ha-multinode-full unrelated to change","commit_id":"e78c8b51c82bb1293fc612f77fbc60a80762a52b"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"1368d32abb1294c979e010ee10627e83dc1622bb","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"3015377c_afe7a40f","updated":"2026-07-08 14:39:38.000000000","message":"recheck. Funcitonal tests and grenade job failures related to installation issues","commit_id":"e78c8b51c82bb1293fc612f77fbc60a80762a52b"}],"neutron/db/ovn_revision_numbers_db.py":[{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"2cb53d9c18e834f1d30280fdce450fbd0935878b","unresolved":true,"context_lines":[{"line_number":180,"context_line":""},{"line_number":181,"context_line":""},{"line_number":182,"context_line":"@db_api.retry_if_session_inactive()"},{"line_number":183,"context_line":"def bump_revision(context, resource, resource_type, dependent_resource\u003dNone,"},{"line_number":184,"context_line":"                  dependent_resource_type\u003dNone):"},{"line_number":185,"context_line":"    revision_number \u003d ovn_utils.get_revision_number(resource, resource_type)"},{"line_number":186,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"0d542367_421e5cf6","line":183,"range":{"start_line":183,"start_character":4,"end_line":183,"end_character":17},"updated":"2026-07-20 09:49:39.000000000","message":"After reviewing the upper patches, this approach breaks the assumption of the OVN resource deletion when the FK is set to null. In this case, the FK is not the resource itself (segments) but the network.\n\nI would suggest to make `segments` a resource to be monitored by OVN at the same level as the others. That will require to explicitly add a segment bump for each network operation. For example:\n```\ndef update_network(self, context, network, ...):\n    segments \u003d get_network_segments(context, network[\u0027id\u0027])\n    # ... update each segment LS in OVN ...\n    for segment in segments:\n        # Bump segment standardattr so maintenance can detect failures\n        segment_obj \u003d NetworkSegment.get_object(context, id\u003dsegment[\u0027id\u0027])\n        segment_obj.bump_revision()\n        db_rev.bump_revision(context, segment, TYPE_SEGMENTS)\n```","commit_id":"e78c8b51c82bb1293fc612f77fbc60a80762a52b"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"4d88c7c0f36995f315032c313f57757ef7bddc47","unresolved":true,"context_lines":[{"line_number":180,"context_line":""},{"line_number":181,"context_line":""},{"line_number":182,"context_line":"@db_api.retry_if_session_inactive()"},{"line_number":183,"context_line":"def bump_revision(context, resource, resource_type, dependent_resource\u003dNone,"},{"line_number":184,"context_line":"                  dependent_resource_type\u003dNone):"},{"line_number":185,"context_line":"    revision_number \u003d ovn_utils.get_revision_number(resource, resource_type)"},{"line_number":186,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"fbd9b483_26e00c3d","line":183,"range":{"start_line":183,"start_character":4,"end_line":183,"end_character":17},"in_reply_to":"0d542367_421e5cf6","updated":"2026-07-30 00:50:07.000000000","message":"Hi Rodolfo,\n\nThank you very much for taking the time to review this series of patches. Let me write what I am understanding about your suggestion:\n\n1)You suggest to make segments a resource monitored by OVN at the same level as the others. This means that, for each segment, there will be a row in the ovn_revision_numbers table with a standard_attr_id pointing to the segment\u0027s row in the standardattributes table.\n\n2) You also suggest to add a segment revision bump for each network operation. In other words, we are trying to keep the segments revision_number column in the  ovn_revision_numbers table aligned with the network\u0027s revision_number column in the standardattributes table.\n\n3) When the OVN driver maintenance job eventually executes, it will invoke get_inconsistent_resources and will execute https://github.com/openstack/neutron/blob/04151e6bb70c378f2af5b320fe88a48949cdec1f/neutron/db/ovn_revision_numbers_db.py#L221-L231, which will compare the segment\u0027s revision_number in the ovn_revision_numbers with the segment\u0027s revision_number in the standardattributes table. But per point 2 above, we want to keep up with the network\u0027s revision_number. This is not what we need\n\nAm I missing or misunderstanding something?","commit_id":"e78c8b51c82bb1293fc612f77fbc60a80762a52b"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"6f5e38e1378fdc05f15a2137499aa602bc849f09","unresolved":true,"context_lines":[{"line_number":180,"context_line":""},{"line_number":181,"context_line":""},{"line_number":182,"context_line":"@db_api.retry_if_session_inactive()"},{"line_number":183,"context_line":"def bump_revision(context, resource, resource_type, dependent_resource\u003dNone,"},{"line_number":184,"context_line":"                  dependent_resource_type\u003dNone):"},{"line_number":185,"context_line":"    revision_number \u003d ovn_utils.get_revision_number(resource, resource_type)"},{"line_number":186,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"ab76ed1f_2f8288f0","line":183,"range":{"start_line":183,"start_character":4,"end_line":183,"end_character":17},"in_reply_to":"40060ebe_eeaba85f","updated":"2026-08-05 21:02:32.000000000","message":"@Slawek, correct, segment is the resource defined in https://github.com/openstack/neutron-lib/blob/master/neutron_lib/api/definitions/segment.py","commit_id":"e78c8b51c82bb1293fc612f77fbc60a80762a52b"},{"author":{"_account_id":8313,"name":"Lajos Katona","display_name":"lajoskatona","email":"katonalala@gmail.com","username":"elajkat","status":"Ericsson Software Technology"},"change_message_id":"3ad3801550bdcc2ce6fce8485a934125566aa719","unresolved":false,"context_lines":[{"line_number":180,"context_line":""},{"line_number":181,"context_line":""},{"line_number":182,"context_line":"@db_api.retry_if_session_inactive()"},{"line_number":183,"context_line":"def bump_revision(context, resource, resource_type, dependent_resource\u003dNone,"},{"line_number":184,"context_line":"                  dependent_resource_type\u003dNone):"},{"line_number":185,"context_line":"    revision_number \u003d ovn_utils.get_revision_number(resource, resource_type)"},{"line_number":186,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"f494d86c_c2bdc401","line":183,"range":{"start_line":183,"start_character":4,"end_line":183,"end_character":17},"in_reply_to":"46ce8e1e_a38d9221","updated":"2026-08-14 12:28:28.000000000","message":"really good conversation, thanks","commit_id":"e78c8b51c82bb1293fc612f77fbc60a80762a52b"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"9e248cf8abf3253925b38238829dba0793463980","unresolved":true,"context_lines":[{"line_number":180,"context_line":""},{"line_number":181,"context_line":""},{"line_number":182,"context_line":"@db_api.retry_if_session_inactive()"},{"line_number":183,"context_line":"def bump_revision(context, resource, resource_type, dependent_resource\u003dNone,"},{"line_number":184,"context_line":"                  dependent_resource_type\u003dNone):"},{"line_number":185,"context_line":"    revision_number \u003d ovn_utils.get_revision_number(resource, resource_type)"},{"line_number":186,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"40060ebe_eeaba85f","line":183,"range":{"start_line":183,"start_character":4,"end_line":183,"end_character":17},"in_reply_to":"5ab8153c_25f741f3","updated":"2026-08-05 13:09:03.000000000","message":"IIUC \"segment\" which we are talking about here is resource defined in https://github.com/openstack/neutron-lib/blob/master/neutron_lib/api/definitions/segment.py, correct? If yes, according to what Miguel is saying that the only really important from the OVN LS perspective attribute is its \u0027segmentation_id\u0027, I think that Miguel is correct here, we probably don\u0027t need to track here revision of the segment itself but rather treat those Logical Switches as one thing which represents multi segment network from Neutron and rely on the network\u0027s revision_id.","commit_id":"e78c8b51c82bb1293fc612f77fbc60a80762a52b"},{"author":{"_account_id":1131,"name":"Brian Haley","email":"haleyb.dev@gmail.com","username":"brian-haley"},"change_message_id":"11e617a3b9947086305be3c437ffd3de5c3489e1","unresolved":true,"context_lines":[{"line_number":180,"context_line":""},{"line_number":181,"context_line":""},{"line_number":182,"context_line":"@db_api.retry_if_session_inactive()"},{"line_number":183,"context_line":"def bump_revision(context, resource, resource_type, dependent_resource\u003dNone,"},{"line_number":184,"context_line":"                  dependent_resource_type\u003dNone):"},{"line_number":185,"context_line":"    revision_number \u003d ovn_utils.get_revision_number(resource, resource_type)"},{"line_number":186,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"46ce8e1e_a38d9221","line":183,"range":{"start_line":183,"start_character":4,"end_line":183,"end_character":17},"in_reply_to":"84d336f6_69cb3b77","updated":"2026-08-06 20:35:54.000000000","message":"Miguel asked me to look at this conversation yesterday, seems to have been resolved since then. I would agree with the conclusion that it is Ok to do things this way and be careful as Rodolfo suggested.","commit_id":"e78c8b51c82bb1293fc612f77fbc60a80762a52b"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"57dbc3edf6c0f9c443ccbb5036e0e24b42593049","unresolved":true,"context_lines":[{"line_number":180,"context_line":""},{"line_number":181,"context_line":""},{"line_number":182,"context_line":"@db_api.retry_if_session_inactive()"},{"line_number":183,"context_line":"def bump_revision(context, resource, resource_type, dependent_resource\u003dNone,"},{"line_number":184,"context_line":"                  dependent_resource_type\u003dNone):"},{"line_number":185,"context_line":"    revision_number \u003d ovn_utils.get_revision_number(resource, resource_type)"},{"line_number":186,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"84d336f6_69cb3b77","line":183,"range":{"start_line":183,"start_character":4,"end_line":183,"end_character":17},"in_reply_to":"ab76ed1f_2f8288f0","updated":"2026-08-06 06:48:28.000000000","message":"Ok, I\u0027m not going to be an stopper on this. Let\u0027s use this \"dependent resource\" approach. Let\u0027s consider carefully the resource deletion when the LS is deleted.\n\nI\u0027ll remove my -1","commit_id":"e78c8b51c82bb1293fc612f77fbc60a80762a52b"},{"author":{"_account_id":4694,"name":"Miguel Lavalle","email":"miguel@mlavalle.com","username":"minsel"},"change_message_id":"6fc7239627f9aa2f3907ddb578f18d566084c1f1","unresolved":true,"context_lines":[{"line_number":180,"context_line":""},{"line_number":181,"context_line":""},{"line_number":182,"context_line":"@db_api.retry_if_session_inactive()"},{"line_number":183,"context_line":"def bump_revision(context, resource, resource_type, dependent_resource\u003dNone,"},{"line_number":184,"context_line":"                  dependent_resource_type\u003dNone):"},{"line_number":185,"context_line":"    revision_number \u003d ovn_utils.get_revision_number(resource, resource_type)"},{"line_number":186,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"5ab8153c_25f741f3","line":183,"range":{"start_line":183,"start_character":4,"end_line":183,"end_character":17},"in_reply_to":"ec94d377_ccb569bc","updated":"2026-08-03 23:57:18.000000000","message":"Hi Rodolfo,\n\nBelow, I am going to explain why I think the logical switches representing segments in a routed network with multiple segments per node need to keep in synch with the Neutron network attributes and not with the Neutron segments. And thank you very much for the suggestion of requesting feedback from other reviewers. I will do that.\n\nDear reviewers,\n\nIn reading the following, please keep in mind that this is part of the series that implements the approved specification for Routed Provider Networks with Multiple Segments per Host for ML2/OVN [1]. In the spec\u0027s \"Proposed Change\" section [2], it was agreed that each segment in a routed network will be represented by a logical switch, so a Neutron network now becomes represented collectively in the OVN NBDB by several logical switches.\n\nIn the ML2/OVN back-end driver, we use the OVN revision numbers mechanism to keep an OVN resource (a logical switch) in synch with a relevant Neutron resource (a network). We don\u0027t keep the revision numbers of both resources synchronized for its own sake. We do it because the synchronized revision numbers signify that the values of attributes that have been set by the users in the Neutron resource are reflected in the configuration of the corresponding relevant OVN resource. In the case that interest us here, an OVN logical switch configuration is setup to reflect attribute values in the corresponding Neutron network. \n\nThis is reflected in the OVN client code. When we create or update a Neutron network, we take the values of several of its attributes and set the OVN logical switch accordingly (please see [3] and [4] for network creation and [5] for network update). Crucially please note that neither network create nor network update use Neutron segment attributes to update the corresponding logical switch. The only attribute that is used from the segments is the segmentation id, that is used to update the tag attribute in the corresponding OVN local net port (please see [6] and [7]).\n\nFor the above reasons, in this patch I propose an adaptation to the OVN revision numbers that, for the case of Routed Provider Networks with Multiple Segments per Host, will allow the several OVN logical switches representing segments to be kept in synch with the Neutron network that they represent collectively. It has been suggested that these logical switches should track their corresponding Neutron segments. But, as indicated above, in my opinion, there are no attributes in a Neutron segment that should be represented in an OVN logical switch and, therefore, no need to keep them in synch. It would be a superfluous use of CPU cycles.\n\nPlease weigh in.\n\n[1] https://specs.openstack.org/openstack/neutron-specs/specs/2026.1/multiple-segments-per-host-routed-net-ovn.html.\n[2] https://specs.openstack.org/openstack/neutron-specs/specs/2026.1/multiple-segments-per-host-routed-net-ovn.html#proposed-change\n[3] https://github.com/openstack/neutron/blob/3cd91cd333b6b05bf335b724bfbb9889092d2897/neutron/plugins/ml2/drivers/ovn/mech_driver/ovsdb/ovn_client.py#L2295\n[4] https://github.com/openstack/neutron/blob/3cd91cd333b6b05bf335b724bfbb9889092d2897/neutron/plugins/ml2/drivers/ovn/mech_driver/ovsdb/ovn_client.py#L2301-L2302\n[5] https://github.com/openstack/neutron/blob/3cd91cd333b6b05bf335b724bfbb9889092d2897/neutron/plugins/ml2/drivers/ovn/mech_driver/ovsdb/ovn_client.py#L2413-L2416\n[6] https://github.com/openstack/neutron/blob/3cd91cd333b6b05bf335b724bfbb9889092d2897/neutron/plugins/ml2/drivers/ovn/mech_driver/ovsdb/ovn_client.py#L2413-L2416\n[7] https://github.com/openstack/neutron/blob/3cd91cd333b6b05bf335b724bfbb9889092d2897/neutron/plugins/ml2/drivers/ovn/mech_driver/ovsdb/ovn_client.py#L2413-L2416","commit_id":"e78c8b51c82bb1293fc612f77fbc60a80762a52b"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"0324d3a7c8bbe1eb79330b7ed74edd51c02f4cd3","unresolved":true,"context_lines":[{"line_number":180,"context_line":""},{"line_number":181,"context_line":""},{"line_number":182,"context_line":"@db_api.retry_if_session_inactive()"},{"line_number":183,"context_line":"def bump_revision(context, resource, resource_type, dependent_resource\u003dNone,"},{"line_number":184,"context_line":"                  dependent_resource_type\u003dNone):"},{"line_number":185,"context_line":"    revision_number \u003d ovn_utils.get_revision_number(resource, resource_type)"},{"line_number":186,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"ec94d377_ccb569bc","line":183,"range":{"start_line":183,"start_character":4,"end_line":183,"end_character":17},"in_reply_to":"fbd9b483_26e00c3d","updated":"2026-08-03 09:48:26.000000000","message":"Yes, as I also commented in the next patch [1], I would make `segments` a tracked resource but at the same level as any other resource. That will make this patch not necessary but you\u0027ll need to track each segment with its own revision number.\n\nI would also request more feedback from other reviewers too, in order to agree on the correct (or at least optimal) approach here.\n\n[1]https://review.opendev.org/c/openstack/neutron/+/975111/comment/af011c36_2138c049/","commit_id":"e78c8b51c82bb1293fc612f77fbc60a80762a52b"}]}
