)]}'
{"nova/network/neutron.py":[{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"f5f360c9a61468228914ad425b52044d960d09b9","unresolved":false,"context_lines":[{"line_number":406,"context_line":"            # This call is safe in that 404s for non-existing"},{"line_number":407,"context_line":"            # bindings are ignored."},{"line_number":408,"context_line":"            try:"},{"line_number":409,"context_line":"                client.delete_port_binding(port[\u0027id\u0027], host)"},{"line_number":410,"context_line":"            except neutron_client_exc.NeutronClientException as exc:"},{"line_number":411,"context_line":"                # We can safely ignore 404s since we\u0027re trying to delete"},{"line_number":412,"context_line":"                # the thing that wasn\u0027t found anyway, but for everything else"}],"source_content_type":"text/x-python","patch_set":3,"id":"3fa7e38b_1a2cad92","line":409,"updated":"2020-02-07 15:16:04.000000000","message":"could self.delete_port_binding() be used?","commit_id":"72268a3fa1549a35277e3b724f74145438db7afb"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"f5f360c9a61468228914ad425b52044d960d09b9","unresolved":false,"context_lines":[{"line_number":2780,"context_line":"                continue"},{"line_number":2781,"context_line":""},{"line_number":2782,"context_line":"            try:"},{"line_number":2783,"context_line":"                # This is a bit weird in that we don\u0027t PUT and update the"},{"line_number":2784,"context_line":"                # status to ACTIVE, it\u0027s more like a POST action method in the"},{"line_number":2785,"context_line":"                # compute API."},{"line_number":2786,"context_line":"                client.activate_port_binding(vif[\u0027id\u0027], dest_host)"},{"line_number":2787,"context_line":"                LOG.debug(\u0027Activated binding for port %s and host %s.\u0027,"},{"line_number":2788,"context_line":"                          vif[\u0027id\u0027], dest_host)"}],"source_content_type":"text/x-python","patch_set":3,"id":"3fa7e38b_da7055aa","line":2785,"range":{"start_line":2783,"start_character":0,"end_line":2785,"end_character":30},"updated":"2020-02-07 15:16:04.000000000","message":"I think this weirdness is now hidden by the client","commit_id":"72268a3fa1549a35277e3b724f74145438db7afb"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"de464910b8c4d7f4e72b561315416d60972700e3","unresolved":true,"context_lines":[{"line_number":1293,"context_line":"            LOG.debug(\u0027Instance does not have any ports.\u0027, instance\u003dinstance)"},{"line_number":1294,"context_line":"            return {}"},{"line_number":1295,"context_line":""},{"line_number":1296,"context_line":"        client \u003d get_client(context)"},{"line_number":1297,"context_line":""},{"line_number":1298,"context_line":"        bindings_by_port_id \u003d {}"},{"line_number":1299,"context_line":"        for vif in network_info:"}],"source_content_type":"text/x-python","patch_set":10,"id":"4aea1328_49ed2691","line":1296,"updated":"2021-02-18 09:36:09.000000000","message":"do we need admin\u003dTrue here?","commit_id":"9e0c6efd57c6b409144560def9978a88f514e416"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"d8f5a0a6b6f99e00f3521aa77400a53285360d95","unresolved":false,"context_lines":[{"line_number":1293,"context_line":"            LOG.debug(\u0027Instance does not have any ports.\u0027, instance\u003dinstance)"},{"line_number":1294,"context_line":"            return {}"},{"line_number":1295,"context_line":""},{"line_number":1296,"context_line":"        client \u003d get_client(context)"},{"line_number":1297,"context_line":""},{"line_number":1298,"context_line":"        bindings_by_port_id \u003d {}"},{"line_number":1299,"context_line":"        for vif in network_info:"}],"source_content_type":"text/x-python","patch_set":10,"id":"1f163e32_1de0ffc0","line":1296,"in_reply_to":"4aea1328_49ed2691","updated":"2021-02-18 15:16:30.000000000","message":"Oh, good catch. These APIs all default to RULE_ADMIN_ONLY in neutron.\n\nOdd that Tempest didn\u0027t catch this...","commit_id":"9e0c6efd57c6b409144560def9978a88f514e416"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"de464910b8c4d7f4e72b561315416d60972700e3","unresolved":true,"context_lines":[{"line_number":1346,"context_line":"        :raises: nova.exception.PortBindingDeletionFailed if a non-404 error"},{"line_number":1347,"context_line":"            response is received from neutron."},{"line_number":1348,"context_line":"        \"\"\""},{"line_number":1349,"context_line":"        client \u003d get_client(context)"},{"line_number":1350,"context_line":"        try:"},{"line_number":1351,"context_line":"            client.delete_port_binding(port_id, host)"},{"line_number":1352,"context_line":"        except neutron_client_exc.NeutronClientException as exc:"}],"source_content_type":"text/x-python","patch_set":10,"id":"b3080985_8507724b","line":1349,"updated":"2021-02-18 09:36:09.000000000","message":"do we need admin\u003dTrue here?","commit_id":"9e0c6efd57c6b409144560def9978a88f514e416"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"d8f5a0a6b6f99e00f3521aa77400a53285360d95","unresolved":false,"context_lines":[{"line_number":1346,"context_line":"        :raises: nova.exception.PortBindingDeletionFailed if a non-404 error"},{"line_number":1347,"context_line":"            response is received from neutron."},{"line_number":1348,"context_line":"        \"\"\""},{"line_number":1349,"context_line":"        client \u003d get_client(context)"},{"line_number":1350,"context_line":"        try:"},{"line_number":1351,"context_line":"            client.delete_port_binding(port_id, host)"},{"line_number":1352,"context_line":"        except neutron_client_exc.NeutronClientException as exc:"}],"source_content_type":"text/x-python","patch_set":10,"id":"7033a8e4_d2d8224d","line":1349,"in_reply_to":"b3080985_8507724b","updated":"2021-02-18 15:16:30.000000000","message":"Yup. Done","commit_id":"9e0c6efd57c6b409144560def9978a88f514e416"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"de464910b8c4d7f4e72b561315416d60972700e3","unresolved":true,"context_lines":[{"line_number":1355,"context_line":"            if exc.status_code \u003d\u003d 404:"},{"line_number":1356,"context_line":"                LOG.error(\u0027Unexpected error trying to delete binding \u0027"},{"line_number":1357,"context_line":"                          \u0027for port %s and host %s.\u0027,"},{"line_number":1358,"context_line":"                          port_id, host, exc_info\u003dTrue)"},{"line_number":1359,"context_line":"                return"},{"line_number":1360,"context_line":""},{"line_number":1361,"context_line":"            msg \u003d (_(\"Failed to delete binding for port \""}],"source_content_type":"text/x-python","patch_set":10,"id":"3cab468b_dd0f9798","line":1358,"updated":"2021-02-18 09:36:09.000000000","message":"previously this was logged for !\u003d 404 errors and now it is logged for 404 errors. As the comment above and the code consider 404 as not a real error, I don\u0027t think we should log an ERROR for this case.","commit_id":"9e0c6efd57c6b409144560def9978a88f514e416"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"d8f5a0a6b6f99e00f3521aa77400a53285360d95","unresolved":false,"context_lines":[{"line_number":1355,"context_line":"            if exc.status_code \u003d\u003d 404:"},{"line_number":1356,"context_line":"                LOG.error(\u0027Unexpected error trying to delete binding \u0027"},{"line_number":1357,"context_line":"                          \u0027for port %s and host %s.\u0027,"},{"line_number":1358,"context_line":"                          port_id, host, exc_info\u003dTrue)"},{"line_number":1359,"context_line":"                return"},{"line_number":1360,"context_line":""},{"line_number":1361,"context_line":"            msg \u003d (_(\"Failed to delete binding for port \""}],"source_content_type":"text/x-python","patch_set":10,"id":"aae6ec47_7dc69ae0","line":1358,"in_reply_to":"3cab468b_dd0f9798","updated":"2021-02-18 15:16:30.000000000","message":"Yeah, I think this was a merge conflict issue. Done","commit_id":"9e0c6efd57c6b409144560def9978a88f514e416"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"de464910b8c4d7f4e72b561315416d60972700e3","unresolved":true,"context_lines":[{"line_number":2720,"context_line":"                      \u0027updated later.\u0027, instance\u003dinstance)"},{"line_number":2721,"context_line":"            return"},{"line_number":2722,"context_line":""},{"line_number":2723,"context_line":"        client \u003d get_client(context, admin\u003dTrue)"},{"line_number":2724,"context_line":"        dest_host \u003d migration[\u0027dest_compute\u0027]"},{"line_number":2725,"context_line":"        for vif in instance.get_network_info():"},{"line_number":2726,"context_line":"            # Not all compute migration flows use the port binding-extended"}],"source_content_type":"text/x-python","patch_set":10,"id":"1564f5c2_d63f0e06","line":2723,"updated":"2021-02-18 09:36:09.000000000","message":"above the new code does not use admin\u003dTrue. Is this is a special case?","commit_id":"9e0c6efd57c6b409144560def9978a88f514e416"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"d8f5a0a6b6f99e00f3521aa77400a53285360d95","unresolved":false,"context_lines":[{"line_number":2720,"context_line":"                      \u0027updated later.\u0027, instance\u003dinstance)"},{"line_number":2721,"context_line":"            return"},{"line_number":2722,"context_line":""},{"line_number":2723,"context_line":"        client \u003d get_client(context, admin\u003dTrue)"},{"line_number":2724,"context_line":"        dest_host \u003d migration[\u0027dest_compute\u0027]"},{"line_number":2725,"context_line":"        for vif in instance.get_network_info():"},{"line_number":2726,"context_line":"            # Not all compute migration flows use the port binding-extended"}],"source_content_type":"text/x-python","patch_set":10,"id":"40a68e2f_6ce2fb5f","line":2723,"in_reply_to":"1564f5c2_d63f0e06","updated":"2021-02-18 15:16:30.000000000","message":"Nope, we should have used it everywhere","commit_id":"9e0c6efd57c6b409144560def9978a88f514e416"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"de464910b8c4d7f4e72b561315416d60972700e3","unresolved":true,"context_lines":[{"line_number":2747,"context_line":"                return"},{"line_number":2748,"context_line":""},{"line_number":2749,"context_line":"            if binding[\u0027status\u0027] \u003d\u003d \u0027ACTIVE\u0027:"},{"line_number":2750,"context_line":"                continue"},{"line_number":2751,"context_line":""},{"line_number":2752,"context_line":"            try:"},{"line_number":2753,"context_line":"                # This is a bit weird in that we don\u0027t PUT and update the"}],"source_content_type":"text/x-python","patch_set":10,"id":"f8fa5fed_68dfef7f","line":2750,"updated":"2021-02-18 09:36:09.000000000","message":"hm, we had a debug at this point in the old code at L2859","commit_id":"9e0c6efd57c6b409144560def9978a88f514e416"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"d8f5a0a6b6f99e00f3521aa77400a53285360d95","unresolved":false,"context_lines":[{"line_number":2747,"context_line":"                return"},{"line_number":2748,"context_line":""},{"line_number":2749,"context_line":"            if binding[\u0027status\u0027] \u003d\u003d \u0027ACTIVE\u0027:"},{"line_number":2750,"context_line":"                continue"},{"line_number":2751,"context_line":""},{"line_number":2752,"context_line":"            try:"},{"line_number":2753,"context_line":"                # This is a bit weird in that we don\u0027t PUT and update the"}],"source_content_type":"text/x-python","patch_set":10,"id":"15c88ed1_7e8f2c0d","line":2750,"in_reply_to":"f8fa5fed_68dfef7f","updated":"2021-02-18 15:16:30.000000000","message":"Done","commit_id":"9e0c6efd57c6b409144560def9978a88f514e416"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"531bd21fe8ca48acd6f95cb135a5698ff696335d","unresolved":true,"context_lines":[{"line_number":1372,"context_line":"            # We can safely ignore 404s since we\u0027re trying to delete"},{"line_number":1373,"context_line":"            # the thing that wasn\u0027t found anyway."},{"line_number":1374,"context_line":"            if exc.status_code \u003d\u003d 404:"},{"line_number":1375,"context_line":"                return"},{"line_number":1376,"context_line":""},{"line_number":1377,"context_line":"            LOG.error("},{"line_number":1378,"context_line":"                \u0027Unexpected error trying to delete binding for port %s and \u0027"}],"source_content_type":"text/x-python","patch_set":12,"id":"a54a08d1_a8ca1ae9","line":1375,"updated":"2021-06-02 16:36:02.000000000","message":"Not sure why to change this to return instead of !\u003d 404, the latter is fewer lines and clearer.","commit_id":"35e0306570cfd66f6768f501431d5c07d8286896"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"45881648d0c5e60d657725eeef6d70486808dcba","unresolved":false,"context_lines":[{"line_number":1372,"context_line":"            # We can safely ignore 404s since we\u0027re trying to delete"},{"line_number":1373,"context_line":"            # the thing that wasn\u0027t found anyway."},{"line_number":1374,"context_line":"            if exc.status_code \u003d\u003d 404:"},{"line_number":1375,"context_line":"                return"},{"line_number":1376,"context_line":""},{"line_number":1377,"context_line":"            LOG.error("},{"line_number":1378,"context_line":"                \u0027Unexpected error trying to delete binding for port %s and \u0027"}],"source_content_type":"text/x-python","patch_set":12,"id":"ddc053fa_67f2b01f","line":1375,"in_reply_to":"a54a08d1_a8ca1ae9","updated":"2021-07-12 16:25:33.000000000","message":"Done","commit_id":"35e0306570cfd66f6768f501431d5c07d8286896"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"531bd21fe8ca48acd6f95cb135a5698ff696335d","unresolved":true,"context_lines":[{"line_number":1377,"context_line":"            LOG.error("},{"line_number":1378,"context_line":"                \u0027Unexpected error trying to delete binding for port %s and \u0027"},{"line_number":1379,"context_line":"                \u0027host %s.\u0027, port_id, host, exc_info\u003dTrue)"},{"line_number":1380,"context_line":"            msg \u003d _("},{"line_number":1381,"context_line":"                \"Failed to delete binding for port %(port_id)s and host \""},{"line_number":1382,"context_line":"                \"%(host)s.\""},{"line_number":1383,"context_line":"            ) % {\u0027port_id\u0027: port_id, \u0027host\u0027: host}"},{"line_number":1384,"context_line":"            raise exception.PortBindingDeletionFailed(msg)"},{"line_number":1385,"context_line":""},{"line_number":1386,"context_line":"    def _get_pci_device_profile(self, pci_dev):"},{"line_number":1387,"context_line":"        dev_spec \u003d self.pci_whitelist.get_devspec(pci_dev)"},{"line_number":1388,"context_line":"        if dev_spec:"}],"source_content_type":"text/x-python","patch_set":12,"id":"4bf4f5dd_f507d179","line":1385,"range":{"start_line":1380,"start_character":12,"end_line":1385,"end_character":0},"updated":"2021-06-02 16:36:02.000000000","message":"Why do this manually? The message format is already part of the exception class and this is repeating it.","commit_id":"35e0306570cfd66f6768f501431d5c07d8286896"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"45881648d0c5e60d657725eeef6d70486808dcba","unresolved":false,"context_lines":[{"line_number":1377,"context_line":"            LOG.error("},{"line_number":1378,"context_line":"                \u0027Unexpected error trying to delete binding for port %s and \u0027"},{"line_number":1379,"context_line":"                \u0027host %s.\u0027, port_id, host, exc_info\u003dTrue)"},{"line_number":1380,"context_line":"            msg \u003d _("},{"line_number":1381,"context_line":"                \"Failed to delete binding for port %(port_id)s and host \""},{"line_number":1382,"context_line":"                \"%(host)s.\""},{"line_number":1383,"context_line":"            ) % {\u0027port_id\u0027: port_id, \u0027host\u0027: host}"},{"line_number":1384,"context_line":"            raise exception.PortBindingDeletionFailed(msg)"},{"line_number":1385,"context_line":""},{"line_number":1386,"context_line":"    def _get_pci_device_profile(self, pci_dev):"},{"line_number":1387,"context_line":"        dev_spec \u003d self.pci_whitelist.get_devspec(pci_dev)"},{"line_number":1388,"context_line":"        if dev_spec:"}],"source_content_type":"text/x-python","patch_set":12,"id":"6916c22d_f3546b1c","line":1385,"range":{"start_line":1380,"start_character":12,"end_line":1385,"end_character":0},"in_reply_to":"4bf4f5dd_f507d179","updated":"2021-07-12 16:25:33.000000000","message":"Done. I was copying this from [1] above. I have corrected that now too.\n\n[1] https://github.com/openstack/nova/blob/b84787d26a70ee62cba5b1d9376d1d78da388fa1/nova/network/neutron.py#L434-L438","commit_id":"35e0306570cfd66f6768f501431d5c07d8286896"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"510c339ed14fcf28f3ecbf79c85a5cb3070be04a","unresolved":true,"context_lines":[{"line_number":413,"context_line":"                if exc.status_code !\u003d 404:"},{"line_number":414,"context_line":"                    failed_port_ids.append(port[\u0027id\u0027])"},{"line_number":415,"context_line":""},{"line_number":416,"context_line":"                LOG.exception("},{"line_number":417,"context_line":"                    \"Failed to delete binding for port(s) \""},{"line_number":418,"context_line":"                    \"%(port_id)s and host %(host)s.\","},{"line_number":419,"context_line":"                    {\u0027port_ids\u0027: \u0027,\u0027.join(failed_port_ids), \u0027host\u0027: host})"}],"source_content_type":"text/x-python","patch_set":13,"id":"655722e2_569856ae","line":416,"updated":"2021-07-13 09:16:56.000000000","message":"I think the indentation is wrong here. As this logging is now moved under the except branch the code will log the same message for every failure with an ever increasing failed_port_ids list (if the failure was a 404).","commit_id":"9d69e49cc8e0d2ec3725eb770a3997c46e861653"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"ce728147c2899e957190337146bb5399dfae249a","unresolved":false,"context_lines":[{"line_number":413,"context_line":"                if exc.status_code !\u003d 404:"},{"line_number":414,"context_line":"                    failed_port_ids.append(port[\u0027id\u0027])"},{"line_number":415,"context_line":""},{"line_number":416,"context_line":"                LOG.exception("},{"line_number":417,"context_line":"                    \"Failed to delete binding for port(s) \""},{"line_number":418,"context_line":"                    \"%(port_id)s and host %(host)s.\","},{"line_number":419,"context_line":"                    {\u0027port_ids\u0027: \u0027,\u0027.join(failed_port_ids), \u0027host\u0027: host})"}],"source_content_type":"text/x-python","patch_set":13,"id":"6758bc51_3eb38ec6","line":416,"in_reply_to":"655722e2_569856ae","updated":"2021-07-13 09:22:34.000000000","message":"Whoops, indeed","commit_id":"9d69e49cc8e0d2ec3725eb770a3997c46e861653"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"be9b629665400143483f705bf77cdd9b41f33491","unresolved":true,"context_lines":[{"line_number":414,"context_line":""},{"line_number":415,"context_line":"                LOG.exception("},{"line_number":416,"context_line":"                    \"Failed to delete binding for port %(port_id)s on host \""},{"line_number":417,"context_line":"                    \"%(host)s\", {\u0027port_id\u0027: port[\u0027id\u0027], \u0027host\u0027: host})"},{"line_number":418,"context_line":""},{"line_number":419,"context_line":"        if failed_port_ids:"},{"line_number":420,"context_line":"            raise exception.PortBindingDeletionFailed("}],"source_content_type":"text/x-python","patch_set":14,"id":"a224d4e8_699516b2","line":417,"updated":"2021-07-13 23:55:11.000000000","message":"I\u0027m not sure I see an advantage to logging each port_id fail separately instead of putting this on L420 and using the \u0027,\u0027.join(failed_port_ids).\n\n(later) I see now that this is a way to capture which NeutronClientException was raised per port_id. But I wouldn\u0027t have thought we want to log an exception here for a 404. Should this not be indented one more level to log exceptions only if !\u003d 404?","commit_id":"54a9d159f25380ca34e4988fee3b070c95cd31e7"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"59a89959171bed6529156ecfb4db6385a72c0ab4","unresolved":false,"context_lines":[{"line_number":414,"context_line":""},{"line_number":415,"context_line":"                LOG.exception("},{"line_number":416,"context_line":"                    \"Failed to delete binding for port %(port_id)s on host \""},{"line_number":417,"context_line":"                    \"%(host)s\", {\u0027port_id\u0027: port[\u0027id\u0027], \u0027host\u0027: host})"},{"line_number":418,"context_line":""},{"line_number":419,"context_line":"        if failed_port_ids:"},{"line_number":420,"context_line":"            raise exception.PortBindingDeletionFailed("}],"source_content_type":"text/x-python","patch_set":14,"id":"084b48ff_adfac4a0","line":417,"in_reply_to":"a224d4e8_699516b2","updated":"2021-07-14 10:18:48.000000000","message":"Yeah, I wanted to log the exception from neutronclient since it might not be obvious what had failed here otherwise. I don\u0027t think it will spam things since realistically, you\u0027re not going to be deleting 100s of bindings in one go and it seems more likely that only one or two will fail. You\u0027re right that we shouldn\u0027t be logging for HTTP 404 though. Will change.","commit_id":"54a9d159f25380ca34e4988fee3b070c95cd31e7"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"9ac86bf348f0d14f9d4bffdda23297a165553364","unresolved":true,"context_lines":[{"line_number":2794,"context_line":"                # A 409 means the port binding is already active, which"},{"line_number":2795,"context_line":"                # shouldn\u0027t happen if the caller is doing things in the correct"},{"line_number":2796,"context_line":"                # order."},{"line_number":2797,"context_line":"                if exc.status_code \u003d\u003d 409:"},{"line_number":2798,"context_line":"                    LOG.warning("},{"line_number":2799,"context_line":"                        \u0027Binding for port %s and host %s is already active\u0027,"},{"line_number":2800,"context_line":"                        vif[\u0027id\u0027], dest_host, exc_info\u003dTrue)"},{"line_number":2801,"context_line":"                    continue"},{"line_number":2802,"context_line":""},{"line_number":2803,"context_line":"                # Log the details, raise an exception."},{"line_number":2804,"context_line":"                LOG.error("}],"source_content_type":"text/x-python","patch_set":15,"id":"2980b1cb_cfe3ffad","line":2801,"range":{"start_line":2797,"start_character":16,"end_line":2801,"end_character":28},"updated":"2021-07-14 16:59:55.000000000","message":"OK, so here is where we do handle 409 for the port binding activate.","commit_id":"982e2ee02d7b1f1a367081d9d660a1d37505ce05"}],"nova/tests/fixtures.py":[{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"f5f360c9a61468228914ad425b52044d960d09b9","unresolved":false,"context_lines":[{"line_number":1676,"context_line":""},{"line_number":1677,"context_line":"        return data"},{"line_number":1678,"context_line":""},{"line_number":1679,"context_line":"    def _validate_port_binding("},{"line_number":1680,"context_line":"            self, port_id, host):"},{"line_number":1681,"context_line":"        if port_id not in self._ports:"},{"line_number":1682,"context_line":"            raise neutron_client_exc.NeutronClientException(status_code\u003d404)"}],"source_content_type":"text/x-python","patch_set":3,"id":"3fa7e38b_fa83d153","line":1679,"updated":"2020-02-07 15:16:04.000000000","message":"Nice, thanks!","commit_id":"72268a3fa1549a35277e3b724f74145438db7afb"}],"nova/tests/fixtures/neutron.py":[{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"531bd21fe8ca48acd6f95cb135a5698ff696335d","unresolved":true,"context_lines":[{"line_number":706,"context_line":"        # It makes sure that only one binding is active for a port"},{"line_number":707,"context_line":"        for host, binding in self._port_bindings[port_id].items():"},{"line_number":708,"context_line":"            if host \u003d\u003d host_id:"},{"line_number":709,"context_line":"                # NOTE(gibi): neutron returns 409 if this binding is already"},{"line_number":710,"context_line":"                # active but nova does not depend on this behaviour yet."},{"line_number":711,"context_line":"                binding[\u0027status\u0027] \u003d \u0027ACTIVE\u0027"},{"line_number":712,"context_line":"            else:"},{"line_number":713,"context_line":"                binding[\u0027status\u0027] \u003d \u0027INACTIVE\u0027"}],"source_content_type":"text/x-python","patch_set":12,"id":"db71d886_2705efb4","line":710,"range":{"start_line":709,"start_character":16,"end_line":710,"end_character":72},"updated":"2021-06-02 16:36:02.000000000","message":"With this patch, we do handle the 409 right? Can we change the logic here and remove the NOTE to reflect that or do we still need this?","commit_id":"35e0306570cfd66f6768f501431d5c07d8286896"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"be9b629665400143483f705bf77cdd9b41f33491","unresolved":true,"context_lines":[{"line_number":706,"context_line":"        # It makes sure that only one binding is active for a port"},{"line_number":707,"context_line":"        for host, binding in self._port_bindings[port_id].items():"},{"line_number":708,"context_line":"            if host \u003d\u003d host_id:"},{"line_number":709,"context_line":"                # NOTE(gibi): neutron returns 409 if this binding is already"},{"line_number":710,"context_line":"                # active but nova does not depend on this behaviour yet."},{"line_number":711,"context_line":"                binding[\u0027status\u0027] \u003d \u0027ACTIVE\u0027"},{"line_number":712,"context_line":"            else:"},{"line_number":713,"context_line":"                binding[\u0027status\u0027] \u003d \u0027INACTIVE\u0027"}],"source_content_type":"text/x-python","patch_set":14,"id":"a446c4b8_fcd5b7a5","line":710,"range":{"start_line":709,"start_character":16,"end_line":710,"end_character":72},"updated":"2021-07-13 23:55:11.000000000","message":"I still have my question from PS12, isn\u0027t this not true anymore with this change? Does this comment need to be removed and does the fixture need an update of some sort?","commit_id":"54a9d159f25380ca34e4988fee3b070c95cd31e7"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"9ac86bf348f0d14f9d4bffdda23297a165553364","unresolved":false,"context_lines":[{"line_number":706,"context_line":"        # It makes sure that only one binding is active for a port"},{"line_number":707,"context_line":"        for host, binding in self._port_bindings[port_id].items():"},{"line_number":708,"context_line":"            if host \u003d\u003d host_id:"},{"line_number":709,"context_line":"                # NOTE(gibi): neutron returns 409 if this binding is already"},{"line_number":710,"context_line":"                # active but nova does not depend on this behaviour yet."},{"line_number":711,"context_line":"                binding[\u0027status\u0027] \u003d \u0027ACTIVE\u0027"},{"line_number":712,"context_line":"            else:"},{"line_number":713,"context_line":"                binding[\u0027status\u0027] \u003d \u0027INACTIVE\u0027"}],"source_content_type":"text/x-python","patch_set":14,"id":"91f5b5d8_a23bdf38","line":710,"range":{"start_line":709,"start_character":16,"end_line":710,"end_character":72},"in_reply_to":"1bfbe571_7af8b6b5","updated":"2021-07-14 16:59:55.000000000","message":"Yeah OK, I see that now. We are handling a 409 from neutron if the port binding is already active, so I must not understand what this code comment means. :)","commit_id":"54a9d159f25380ca34e4988fee3b070c95cd31e7"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"59a89959171bed6529156ecfb4db6385a72c0ab4","unresolved":false,"context_lines":[{"line_number":706,"context_line":"        # It makes sure that only one binding is active for a port"},{"line_number":707,"context_line":"        for host, binding in self._port_bindings[port_id].items():"},{"line_number":708,"context_line":"            if host \u003d\u003d host_id:"},{"line_number":709,"context_line":"                # NOTE(gibi): neutron returns 409 if this binding is already"},{"line_number":710,"context_line":"                # active but nova does not depend on this behaviour yet."},{"line_number":711,"context_line":"                binding[\u0027status\u0027] \u003d \u0027ACTIVE\u0027"},{"line_number":712,"context_line":"            else:"},{"line_number":713,"context_line":"                binding[\u0027status\u0027] \u003d \u0027INACTIVE\u0027"}],"source_content_type":"text/x-python","patch_set":14,"id":"1bfbe571_7af8b6b5","line":710,"range":{"start_line":709,"start_character":16,"end_line":710,"end_character":72},"in_reply_to":"a446c4b8_fcd5b7a5","updated":"2021-07-14 10:18:48.000000000","message":"Whoops, missed that. I don\u0027t think anything has changed here. The only difference is that where previously we\u0027d have seen an exception raised by keystoneauth, we\u0027ll now see one raised by neutronclient.\n\nWe could certainly improve the fixture to better replicate behavior of the client and raise an exception if this is already active. Let me tackle that in a follow-up since I think it\u0027s unrelated to what I\u0027m doing here.","commit_id":"54a9d159f25380ca34e4988fee3b070c95cd31e7"}]}
