)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"c4fa1b81e8f3584ebb134eb0a89d2f86d81ce146","unresolved":true,"context_lines":[{"line_number":12,"context_line":"status\u003dINACTIVE. This script is useful to remove those leftovers"},{"line_number":13,"context_line":"that remain in the database after a failed live migration."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Closes-Bug: #1979072"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"Change-Id: I0de5fbb70eb852f82bd311616557985d1ce89bbf"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"0b43ae04_6aba8254","line":15,"updated":"2022-08-05 07:08:31.000000000","message":"You are marking this as closing the bug, but should not we try to also fix the part that is not well cleaning port during revert?","commit_id":"7fcbe1271e6bf98d48e1dbe4a938600423ac6e4d"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"1fb167d89eaed9a0f51b7759e14eabb5dbe22bd8","unresolved":false,"context_lines":[{"line_number":12,"context_line":"status\u003dINACTIVE. This script is useful to remove those leftovers"},{"line_number":13,"context_line":"that remain in the database after a failed live migration."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Closes-Bug: #1979072"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"Change-Id: I0de5fbb70eb852f82bd311616557985d1ce89bbf"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":5,"id":"9873cef2_ed76b698","line":15,"in_reply_to":"0b43ae04_6aba8254","updated":"2022-08-08 11:35:45.000000000","message":"That doesn\u0027t depend on Neutron. From Neutron\u0027s point of view, this is all we can do (for now).","commit_id":"7fcbe1271e6bf98d48e1dbe4a938600423ac6e4d"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"3851877a811a00d27967dd16291f114444fc5955","unresolved":true,"context_lines":[{"line_number":16,"context_line":"config option. The duplicated port bindings are printed in the shell but"},{"line_number":17,"context_line":"not deleted."},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"Closes-Bug: #1979072"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"Change-Id: I0de5fbb70eb852f82bd311616557985d1ce89bbf"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"798a8c64_5c691ef0","line":19,"range":{"start_line":19,"start_character":0,"end_line":19,"end_character":20},"updated":"2022-08-17 14:46:29.000000000","message":"Related-Bug perhapse but it does not close the bug\n\n\ni dont have time to review this currently but please call out very clearly that if you use this you must ensure that no migrations are in progress.\n\nin generally im not sure we shoudl have a script for this\n\nthis could break ongoing live migrations or cross cell cold migrations and leave the vms in an unrecoverable state.\n\nfor this bug to be closed we need to adress both the nova and neutron issues with cleaning.\n\nmy understading is that this happens when neutorn does not complete removing the inactive port binding when nova rolls back. either due to timeouts, db deadlocks on the neutron side and or un managed failures in rool back on nova.\n\n\nnova rollback logic does try to clean up the inactive port bidinings already and obvioulsy nova depends on the inactive bindings it created during a live migration so in general its only safe to do this when no migrations are happening.","commit_id":"904f8077254f047dbbd1ec556c3145d0ccb9804b"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"cebcaea704286abc966b56e00e64e7e5279917e6","unresolved":false,"context_lines":[{"line_number":16,"context_line":"config option. The duplicated port bindings are printed in the shell but"},{"line_number":17,"context_line":"not deleted."},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"Closes-Bug: #1979072"},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"Change-Id: I0de5fbb70eb852f82bd311616557985d1ce89bbf"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":6,"id":"ba00ac95_2bbe9128","line":19,"range":{"start_line":19,"start_character":0,"end_line":19,"end_character":20},"in_reply_to":"798a8c64_5c691ef0","updated":"2022-08-17 15:43:18.000000000","message":"Right, this is a related patch. I\u0027m not trying to solve this issue, mainly because that should be solved in Nova.\n\nWe should have an script like this because we can\u0027t ask our customers to manually delete any DB register; in general, we should avoid them to directly manipulate the DB.\n\nOf course, I\u0027ll be very clear on the point of \"not having another migration in progress\".\n\n\"db deadlocks\"? Sorry but I didn\u0027t see that in a while. So far, if a migration does not succeed, is Nova responsibility to delete the duplicated port binding.","commit_id":"904f8077254f047dbbd1ec556c3145d0ccb9804b"}],"/PATCHSET_LEVEL":[{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"ee693ad1b0b5ff27dbc0b1950053a00684be2948","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"4de9f92a_4422fce6","updated":"2022-06-28 09:04:25.000000000","message":"this should be fixed in nova revert logic not in neutron","commit_id":"fa042b2192fe111ab0c74d78eb3133cde6aa2c90"},{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"c4fa1b81e8f3584ebb134eb0a89d2f86d81ce146","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"986468ed_1022e40d","updated":"2022-08-05 07:08:31.000000000","message":"Thank you Rodolfo! just some suggestions noted.","commit_id":"7fcbe1271e6bf98d48e1dbe4a938600423ac6e4d"},{"author":{"_account_id":9531,"name":"liuyulong","display_name":"LIU Yulong","email":"i@liuyulong.me","username":"LIU-Yulong"},"change_message_id":"83c0663624cdce4522234f40d13c75c42abbe51b","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":6,"id":"2d3d0ee7_4ca289a7","updated":"2022-08-16 04:51:32.000000000","message":"A useful script for OPs. LGTM.","commit_id":"904f8077254f047dbbd1ec556c3145d0ccb9804b"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"0d89ff03382ed4a17a191a6e6923fc8922804c13","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":6,"id":"5f2def74_e97970cc","updated":"2022-08-10 12:56:57.000000000","message":"recheck FT","commit_id":"904f8077254f047dbbd1ec556c3145d0ccb9804b"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"4db18a63dbfe353b51048dffa244e6a80273b4f0","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":6,"id":"df89f97d_dbbe3984","updated":"2022-08-10 10:16:31.000000000","message":"recheck unrelated tempest error","commit_id":"904f8077254f047dbbd1ec556c3145d0ccb9804b"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"80acde620819f76038270dc184b41b2ab7555831","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":8,"id":"9195f854_c177feb8","updated":"2022-08-18 11:13:56.000000000","message":"recheck py39 zuul error","commit_id":"c5b76a8393a21adb87447c925da2ede4a75dd11a"}],"doc/source/contributor/internals/live_migration.rst":[{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"51b651e29a07677886f2d6e1f0af26ed67d72250","unresolved":true,"context_lines":[{"line_number":188,"context_line":""},{"line_number":189,"context_line":".. note::"},{"line_number":190,"context_line":""},{"line_number":191,"context_line":"   This script cannot be executed while a Live Migration. The script will"},{"line_number":192,"context_line":"   delete the inactive port binding and will break the process."},{"line_number":193,"context_line":""},{"line_number":194,"context_line":""}],"source_content_type":"text/x-rst","patch_set":7,"id":"0c44ceb9_ea2ccdd0","line":191,"range":{"start_line":191,"start_character":42,"end_line":191,"end_character":56},"updated":"2022-08-17 17:59:37.000000000","message":"nit:\"live migration or cross cell cold migration is in progress\".","commit_id":"2d2e058fdb14676fe0db6ca1ff8d383b3a3dd7ad"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"336a1c257908d22883239ee80137908157546b4c","unresolved":false,"context_lines":[{"line_number":188,"context_line":""},{"line_number":189,"context_line":".. note::"},{"line_number":190,"context_line":""},{"line_number":191,"context_line":"   This script cannot be executed while a Live Migration. The script will"},{"line_number":192,"context_line":"   delete the inactive port binding and will break the process."},{"line_number":193,"context_line":""},{"line_number":194,"context_line":""}],"source_content_type":"text/x-rst","patch_set":7,"id":"2143e5ae_248de3ad","line":191,"range":{"start_line":191,"start_character":42,"end_line":191,"end_character":56},"in_reply_to":"0c44ceb9_ea2ccdd0","updated":"2022-08-18 08:12:37.000000000","message":"Done","commit_id":"2d2e058fdb14676fe0db6ca1ff8d383b3a3dd7ad"}],"neutron/cmd/remove_duplicated_port_bindings.py":[{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"c4fa1b81e8f3584ebb134eb0a89d2f86d81ce146","unresolved":true,"context_lines":[{"line_number":35,"context_line":"    conf()"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"def main():"},{"line_number":39,"context_line":"    \"\"\"Main method for removing the duplicated port binding registers."},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"    This script finds all ``PortBinding`` registers with the same ``port_id``."}],"source_content_type":"text/x-python","patch_set":5,"id":"0bfb4f81_6496808a","line":38,"updated":"2022-08-05 07:08:31.000000000","message":"Don\u0027t you think that we can have a mode dry-run? I guess operators would appreciate to first get opportunity to list the port that are going to be removed, at least to double-check.","commit_id":"7fcbe1271e6bf98d48e1dbe4a938600423ac6e4d"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"1fb167d89eaed9a0f51b7759e14eabb5dbe22bd8","unresolved":false,"context_lines":[{"line_number":35,"context_line":"    conf()"},{"line_number":36,"context_line":""},{"line_number":37,"context_line":""},{"line_number":38,"context_line":"def main():"},{"line_number":39,"context_line":"    \"\"\"Main method for removing the duplicated port binding registers."},{"line_number":40,"context_line":""},{"line_number":41,"context_line":"    This script finds all ``PortBinding`` registers with the same ``port_id``."}],"source_content_type":"text/x-python","patch_set":5,"id":"17222215_bda93c7d","line":38,"in_reply_to":"0bfb4f81_6496808a","updated":"2022-08-08 11:35:45.000000000","message":"Done","commit_id":"7fcbe1271e6bf98d48e1dbe4a938600423ac6e4d"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"12c2fdcc3efd73d40a096091ffd92cab3f7045b8","unresolved":true,"context_lines":[{"line_number":21,"context_line":"from oslo_log import log as logging"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"from neutron.common import config as common_config"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"from neutron.objects import ports as ports_obj"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"3d5d7e1e_c3c9a157","line":24,"updated":"2022-08-17 14:11:36.000000000","message":"nit: this empty line is not needed","commit_id":"904f8077254f047dbbd1ec556c3145d0ccb9804b"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"cebcaea704286abc966b56e00e64e7e5279917e6","unresolved":false,"context_lines":[{"line_number":21,"context_line":"from oslo_log import log as logging"},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"from neutron.common import config as common_config"},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"from neutron.objects import ports as ports_obj"},{"line_number":26,"context_line":""},{"line_number":27,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"3fb71655_e3eac245","line":24,"in_reply_to":"3d5d7e1e_c3c9a157","updated":"2022-08-17 15:43:18.000000000","message":"Done","commit_id":"904f8077254f047dbbd1ec556c3145d0ccb9804b"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"4a487746c743abd1a41f3c5c529a92a338e9accb","unresolved":true,"context_lines":[{"line_number":42,"context_line":"    That happens during the live-migration process. Once finished, the inactive"},{"line_number":43,"context_line":"    port binding register is deleted. However, it could happen that during the"},{"line_number":44,"context_line":"    live-migration, an error occurs and this deletion is not executed. The"},{"line_number":45,"context_line":"    related port cannot be migrated anymore."},{"line_number":46,"context_line":"    \"\"\""},{"line_number":47,"context_line":"    conf \u003d cfg.CONF"},{"line_number":48,"context_line":"    setup_conf(conf)"}],"source_content_type":"text/x-python","patch_set":6,"id":"e500f9d0_0301cb05","line":45,"updated":"2022-08-17 14:48:39.000000000","message":"it can just not to the same host where the inactive binding is.\n\nand that is what can be fixed in nova. we can handel that issue by deleting and recreating the binding in that specific case where they have already leaked.\n\nbut the reason they leaked in the first place is either we tried to delete the binding and if failed. we have seen that happen due to internal db issue in neutorn in the past or we failed in the rollback before that happened.","commit_id":"904f8077254f047dbbd1ec556c3145d0ccb9804b"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"336a1c257908d22883239ee80137908157546b4c","unresolved":false,"context_lines":[{"line_number":42,"context_line":"    That happens during the live-migration process. Once finished, the inactive"},{"line_number":43,"context_line":"    port binding register is deleted. However, it could happen that during the"},{"line_number":44,"context_line":"    live-migration, an error occurs and this deletion is not executed. The"},{"line_number":45,"context_line":"    related port cannot be migrated anymore."},{"line_number":46,"context_line":"    \"\"\""},{"line_number":47,"context_line":"    conf \u003d cfg.CONF"},{"line_number":48,"context_line":"    setup_conf(conf)"}],"source_content_type":"text/x-python","patch_set":6,"id":"f422752b_43be2b9b","line":45,"in_reply_to":"b4d603f7_e6bc694c","updated":"2022-08-18 08:12:37.000000000","message":"s/You can\u0027t/You shouldn\u0027t\n\nThe method \"create_port_binding\" was created to implement the multiple port binding feature [1] and that feature had in mind live migration only. We should have created the DB table \"ml2_port_bindings\" with a limitation on (port,status), being unable to have more than one port in inactive or active status.\n\n[1]https://bugs.launchpad.net/neutron/+bug/1580880","commit_id":"904f8077254f047dbbd1ec556c3145d0ccb9804b"},{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"c9e3498063509f20756f16a582d56068f9a72742","unresolved":false,"context_lines":[{"line_number":42,"context_line":"    That happens during the live-migration process. Once finished, the inactive"},{"line_number":43,"context_line":"    port binding register is deleted. However, it could happen that during the"},{"line_number":44,"context_line":"    live-migration, an error occurs and this deletion is not executed. The"},{"line_number":45,"context_line":"    related port cannot be migrated anymore."},{"line_number":46,"context_line":"    \"\"\""},{"line_number":47,"context_line":"    conf \u003d cfg.CONF"},{"line_number":48,"context_line":"    setup_conf(conf)"}],"source_content_type":"text/x-python","patch_set":6,"id":"b4d603f7_e6bc694c","line":45,"in_reply_to":"d8a1c807_8c3c8b40","updated":"2022-08-17 17:57:48.000000000","message":"i have seen the port bindihng not get deleted because nova asked neutron to delete it and that failed internally in neutron at the db level.\ni think this was related to segmented network tempest tests in some way but its been a while.\n\ni have also see duplicates created because nova tried to delete the port binding and that times out.\n\n\nim also pretty sure you can have more then 2 port bidnigns.\ni have defintly seen ports in the past that have more then 1 inactive port binding where all 3 ports has a differnt host id\nif that is not possibel anymore its a cange in behavior from what i recall.","commit_id":"904f8077254f047dbbd1ec556c3145d0ccb9804b"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"cebcaea704286abc966b56e00e64e7e5279917e6","unresolved":false,"context_lines":[{"line_number":42,"context_line":"    That happens during the live-migration process. Once finished, the inactive"},{"line_number":43,"context_line":"    port binding register is deleted. However, it could happen that during the"},{"line_number":44,"context_line":"    live-migration, an error occurs and this deletion is not executed. The"},{"line_number":45,"context_line":"    related port cannot be migrated anymore."},{"line_number":46,"context_line":"    \"\"\""},{"line_number":47,"context_line":"    conf \u003d cfg.CONF"},{"line_number":48,"context_line":"    setup_conf(conf)"}],"source_content_type":"text/x-python","patch_set":6,"id":"d8a1c807_8c3c8b40","line":45,"in_reply_to":"e500f9d0_0301cb05","updated":"2022-08-17 15:43:18.000000000","message":"You can\u0027t create a 3rd port binding register.\n\nAnd what I\u0027m trying to solve here is this intermediate state for those environments without the fix in Nova.\n\nWhat \"internal db issue\"? This is quite generic. I\u0027ve seen this error caused because Nova didn\u0027t attend to the vif-plugged event, libvirt issues, RPC issues, etc.","commit_id":"904f8077254f047dbbd1ec556c3145d0ccb9804b"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"12c2fdcc3efd73d40a096091ffd92cab3f7045b8","unresolved":true,"context_lines":[{"line_number":57,"context_line":"            for pbinding in dup_pbindings:"},{"line_number":58,"context_line":"                ports_obj.PortBinding.delete_objects("},{"line_number":59,"context_line":"                    admin_ctx, status\u003dconstants.INACTIVE,"},{"line_number":60,"context_line":"                    port_id\u003dpbinding.port_id)"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"        if dup_pbindings:"},{"line_number":63,"context_line":"            port_ids \u003d [pbinding.port_id for pbinding in dup_pbindings]"}],"source_content_type":"text/x-python","patch_set":6,"id":"9924924f_7404c156","line":60,"updated":"2022-08-17 14:11:36.000000000","message":"IIUC for each duplicate port binding You will call delete_objects at least twice as You will have in dup_pbindings both ACTIVE and INACTIVE port binding objects.\nIf You would do set of port_ids first it would be less db calls.\nI know it\u0027s just simple CLI script and that isn\u0027t big performance improvement but maybe it\u0027s worth to do it. Wdyt?","commit_id":"904f8077254f047dbbd1ec556c3145d0ccb9804b"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"cebcaea704286abc966b56e00e64e7e5279917e6","unresolved":false,"context_lines":[{"line_number":57,"context_line":"            for pbinding in dup_pbindings:"},{"line_number":58,"context_line":"                ports_obj.PortBinding.delete_objects("},{"line_number":59,"context_line":"                    admin_ctx, status\u003dconstants.INACTIVE,"},{"line_number":60,"context_line":"                    port_id\u003dpbinding.port_id)"},{"line_number":61,"context_line":""},{"line_number":62,"context_line":"        if dup_pbindings:"},{"line_number":63,"context_line":"            port_ids \u003d [pbinding.port_id for pbinding in dup_pbindings]"}],"source_content_type":"text/x-python","patch_set":6,"id":"e2b4a4c7_766b6cb6","line":60,"in_reply_to":"9924924f_7404c156","updated":"2022-08-17 15:43:18.000000000","message":"Not really. \"PortBinding.get_duplicated_port_bindings\" will return a list of \"port_id\" of those duplicated port bindings. That means I\u0027ll get only one \"port_id\" from two port binding registers. Please check that in this method I\u0027m grouping the results; that means I\u0027ll have only one port_id only.","commit_id":"904f8077254f047dbbd1ec556c3145d0ccb9804b"}],"neutron/conf/common.py":[{"author":{"_account_id":11604,"name":"sean mooney","email":"smooney@redhat.com","username":"sean-k-mooney"},"change_message_id":"c1d3ba3b76a4c08f0ac88ed4ca5230857b1dbbd8","unresolved":true,"context_lines":[{"line_number":151,"context_line":"                       \u00272. DHCP scheduler API extension \u0027"},{"line_number":152,"context_line":"                       \u00273. Network scheduling mechanism \u0027"},{"line_number":153,"context_line":"                       \u00274. DHCP RPC/notification\u0027)),"},{"line_number":154,"context_line":"    cfg.IntOpt(\u0027port_binding_duplicates_check_interval\u0027, default\u003d800, min\u003d0,"},{"line_number":155,"context_line":"               help\u003d_(\"The ML2 plugin has a periodic worker that checks and \""},{"line_number":156,"context_line":"                      \"deletes the duplicated port bindings. That usually \""},{"line_number":157,"context_line":"                      \"happends during failed live migrations; the duplicated \""}],"source_content_type":"text/x-python","patch_set":3,"id":"8032a1c3_5e1efd1e","line":154,"range":{"start_line":154,"start_character":58,"end_line":154,"end_character":68},"updated":"2022-06-28 09:09:23.000000000","message":"we cant do this \nthat coudl race with a long runnign live migration and casue the migratio nto fail.\n\nthis should not be fix in neutron its just an edgecase that is missed in our role back logic.\nnova should delete the inactive port binding when we role back and if the port binding already exits becaus the delete fail when we migrate in the future we should just haneld that and reuse the inactive port bindign or delete and recreate it.\n\nwe shoudl not futher complicate things by adding a periodic to neturon.","commit_id":"fa042b2192fe111ab0c74d78eb3133cde6aa2c90"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"b2132ede5aa6ffd2489a318cc29a05f754124d48","unresolved":true,"context_lines":[{"line_number":151,"context_line":"                       \u00272. DHCP scheduler API extension \u0027"},{"line_number":152,"context_line":"                       \u00273. Network scheduling mechanism \u0027"},{"line_number":153,"context_line":"                       \u00274. DHCP RPC/notification\u0027)),"},{"line_number":154,"context_line":"    cfg.IntOpt(\u0027port_binding_duplicates_check_interval\u0027, default\u003d800, min\u003d0,"},{"line_number":155,"context_line":"               help\u003d_(\"The ML2 plugin has a periodic worker that checks and \""},{"line_number":156,"context_line":"                      \"deletes the duplicated port bindings. That usually \""},{"line_number":157,"context_line":"                      \"happends during failed live migrations; the duplicated \""}],"source_content_type":"text/x-python","patch_set":3,"id":"ec7c0955_a59bc745","line":154,"range":{"start_line":154,"start_character":58,"end_line":154,"end_character":68},"in_reply_to":"8032a1c3_5e1efd1e","updated":"2022-06-28 11:50:55.000000000","message":"I know this should not be done in Neutron but has been a problem for years. I\u0027m ok with fixing that in the right place.\n\nThis could be an edge case but we have bugs related to this issue internally every month. Thus that is important for us.","commit_id":"fa042b2192fe111ab0c74d78eb3133cde6aa2c90"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"a99d820a44ee549d85d7f1551b54dc5989a57995","unresolved":false,"context_lines":[{"line_number":151,"context_line":"                       \u00272. DHCP scheduler API extension \u0027"},{"line_number":152,"context_line":"                       \u00273. Network scheduling mechanism \u0027"},{"line_number":153,"context_line":"                       \u00274. DHCP RPC/notification\u0027)),"},{"line_number":154,"context_line":"    cfg.IntOpt(\u0027port_binding_duplicates_check_interval\u0027, default\u003d800, min\u003d0,"},{"line_number":155,"context_line":"               help\u003d_(\"The ML2 plugin has a periodic worker that checks and \""},{"line_number":156,"context_line":"                      \"deletes the duplicated port bindings. That usually \""},{"line_number":157,"context_line":"                      \"happends during failed live migrations; the duplicated \""}],"source_content_type":"text/x-python","patch_set":3,"id":"ee5fe5e5_2abf63b9","line":154,"range":{"start_line":154,"start_character":58,"end_line":154,"end_character":68},"in_reply_to":"ec7c0955_a59bc745","updated":"2022-07-12 13:09:13.000000000","message":"Done","commit_id":"fa042b2192fe111ab0c74d78eb3133cde6aa2c90"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"12c2fdcc3efd73d40a096091ffd92cab3f7045b8","unresolved":true,"context_lines":[{"line_number":223,"context_line":"cli_script_options \u003d ["},{"line_number":224,"context_line":"    cfg.BoolOpt(\u0027dry_run\u0027, default\u003dFalse,"},{"line_number":225,"context_line":"                help\u003d_(\u0027Dry-run execution of the CLI script. No change will \u0027"},{"line_number":226,"context_line":"                       \u0027be performed on the system\u0027)),"},{"line_number":227,"context_line":"]"},{"line_number":228,"context_line":""},{"line_number":229,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"ec7d8ac7_3ad1a0e1","line":226,"range":{"start_line":226,"start_character":44,"end_line":226,"end_character":50},"updated":"2022-08-17 14:11:36.000000000","message":"nit: missing dot at the end","commit_id":"904f8077254f047dbbd1ec556c3145d0ccb9804b"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"cebcaea704286abc966b56e00e64e7e5279917e6","unresolved":false,"context_lines":[{"line_number":223,"context_line":"cli_script_options \u003d ["},{"line_number":224,"context_line":"    cfg.BoolOpt(\u0027dry_run\u0027, default\u003dFalse,"},{"line_number":225,"context_line":"                help\u003d_(\u0027Dry-run execution of the CLI script. No change will \u0027"},{"line_number":226,"context_line":"                       \u0027be performed on the system\u0027)),"},{"line_number":227,"context_line":"]"},{"line_number":228,"context_line":""},{"line_number":229,"context_line":""}],"source_content_type":"text/x-python","patch_set":6,"id":"467a9e8e_47b2e54e","line":226,"range":{"start_line":226,"start_character":44,"end_line":226,"end_character":50},"in_reply_to":"ec7d8ac7_3ad1a0e1","updated":"2022-08-17 15:43:18.000000000","message":"Done","commit_id":"904f8077254f047dbbd1ec556c3145d0ccb9804b"}],"neutron/objects/ports.py":[{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"c4fa1b81e8f3584ebb134eb0a89d2f86d81ce146","unresolved":true,"context_lines":[{"line_number":108,"context_line":"    def get_duplicated_port_bindings(cls, context):"},{"line_number":109,"context_line":"        return context.session.query("},{"line_number":110,"context_line":"            cls.db_model).group_by("},{"line_number":111,"context_line":"            cls.db_model.port_id).having(sqlalchemy.func.count() \u003e 1).all()"},{"line_number":112,"context_line":""},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"@base.NeutronObjectRegistry.register"}],"source_content_type":"text/x-python","patch_set":5,"id":"5dbb9be5_40983c80","line":111,"updated":"2022-08-05 07:08:31.000000000","message":"port_id is indexed so we should be good doing this.","commit_id":"7fcbe1271e6bf98d48e1dbe4a938600423ac6e4d"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"eb2e62d3c3447380e79ca8112511b982be6c65b5","unresolved":false,"context_lines":[{"line_number":108,"context_line":"    def get_duplicated_port_bindings(cls, context):"},{"line_number":109,"context_line":"        return context.session.query("},{"line_number":110,"context_line":"            cls.db_model).group_by("},{"line_number":111,"context_line":"            cls.db_model.port_id).having(sqlalchemy.func.count() \u003e 1).all()"},{"line_number":112,"context_line":""},{"line_number":113,"context_line":""},{"line_number":114,"context_line":"@base.NeutronObjectRegistry.register"}],"source_content_type":"text/x-python","patch_set":5,"id":"6e2b0277_5ff0e418","line":111,"in_reply_to":"5dbb9be5_40983c80","updated":"2022-08-10 10:16:39.000000000","message":"Done","commit_id":"7fcbe1271e6bf98d48e1dbe4a938600423ac6e4d"}],"releasenotes/notes/remove-duplicated-port-bindings-83b58060f3adb403.yaml":[{"author":{"_account_id":7730,"name":"Sahid Orentino Ferdjaoui","email":"sahid.ferdjaoui@industrialdiscipline.com","username":"sahid"},"change_message_id":"c4fa1b81e8f3584ebb134eb0a89d2f86d81ce146","unresolved":true,"context_lines":[{"line_number":5,"context_line":"    will list all ``ml2_port_bindings`` records in the database, finding those"},{"line_number":6,"context_line":"    ones with the same port ID. Then the script removes those ones with"},{"line_number":7,"context_line":"    status\u003dINACTIVE. This script is useful to remove those leftovers that"},{"line_number":8,"context_line":"    remain in the database after a failed live migration."}],"source_content_type":"text/x-yaml","patch_set":5,"id":"8614314b_7460dd79","line":8,"updated":"2022-08-05 07:08:31.000000000","message":"Adding small line showing usage would help operators to use the script I guess, but I understand that may not directly related to a release note.","commit_id":"7fcbe1271e6bf98d48e1dbe4a938600423ac6e4d"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"1fb167d89eaed9a0f51b7759e14eabb5dbe22bd8","unresolved":false,"context_lines":[{"line_number":5,"context_line":"    will list all ``ml2_port_bindings`` records in the database, finding those"},{"line_number":6,"context_line":"    ones with the same port ID. Then the script removes those ones with"},{"line_number":7,"context_line":"    status\u003dINACTIVE. This script is useful to remove those leftovers that"},{"line_number":8,"context_line":"    remain in the database after a failed live migration."}],"source_content_type":"text/x-yaml","patch_set":5,"id":"37e4c7b5_5265e385","line":8,"in_reply_to":"8614314b_7460dd79","updated":"2022-08-08 11:35:45.000000000","message":"That doesn\u0027t belong here. Once implemented you suggestion, I\u0027ll add this documentation.","commit_id":"7fcbe1271e6bf98d48e1dbe4a938600423ac6e4d"},{"author":{"_account_id":11975,"name":"Slawek Kaplonski","email":"skaplons@redhat.com","username":"slaweq"},"change_message_id":"12c2fdcc3efd73d40a096091ffd92cab3f7045b8","unresolved":true,"context_lines":[{"line_number":5,"context_line":"    will list all ``ml2_port_bindings`` records in the database, finding those"},{"line_number":6,"context_line":"    ones with the same port ID. Then the script removes those ones with"},{"line_number":7,"context_line":"    status\u003dINACTIVE. This script is useful to remove those leftovers that"},{"line_number":8,"context_line":"    remain in the database after a failed live migration."}],"source_content_type":"text/x-yaml","patch_set":6,"id":"04764214_b1a6dcb6","line":8,"updated":"2022-08-17 14:11:36.000000000","message":"I think that we should mention that running this script in the same time when some live migrations are in progress may break them as it will clean INACTIVE port bindings for such ports. Or am I missing something and it will not be like that?","commit_id":"904f8077254f047dbbd1ec556c3145d0ccb9804b"},{"author":{"_account_id":16688,"name":"Rodolfo Alonso","email":"ralonsoh@redhat.com","username":"rodolfo-alonso-hernandez"},"change_message_id":"cebcaea704286abc966b56e00e64e7e5279917e6","unresolved":false,"context_lines":[{"line_number":5,"context_line":"    will list all ``ml2_port_bindings`` records in the database, finding those"},{"line_number":6,"context_line":"    ones with the same port ID. Then the script removes those ones with"},{"line_number":7,"context_line":"    status\u003dINACTIVE. This script is useful to remove those leftovers that"},{"line_number":8,"context_line":"    remain in the database after a failed live migration."}],"source_content_type":"text/x-yaml","patch_set":6,"id":"1da09bee_af268d61","line":8,"in_reply_to":"04764214_b1a6dcb6","updated":"2022-08-17 15:43:18.000000000","message":"Right, that must be mentioned here, in the documentation and in the script description.","commit_id":"904f8077254f047dbbd1ec556c3145d0ccb9804b"}]}
