)]}'
{"nova/compute/api.py":[{"author":{"_account_id":21813,"name":"Andrey Volkov","email":"m@amadev.ru","username":"avolkov"},"change_message_id":"20f6f2239af273f859ef08a3aa5e3c23a5d1166d","unresolved":false,"context_lines":[{"line_number":2117,"context_line":"                    # scheduler response, the only chance to cleanup allocation"},{"line_number":2118,"context_line":"                    # is here."},{"line_number":2119,"context_line":"                    self.placementclient.delete_allocation_for_instance("},{"line_number":2120,"context_line":"                        context, instance_uuid)"},{"line_number":2121,"context_line":"            except exception.InstanceNotFound:"},{"line_number":2122,"context_line":"                pass"},{"line_number":2123,"context_line":"            except exception.AllocationDeleteFailed:"}],"source_content_type":"text/x-python","patch_set":2,"id":"3fa7e38b_5a7b7a79","line":2120,"updated":"2020-01-30 16:36:00.000000000","message":"It looks to me and I maybe wrong, that there are some other places for placementclient.delete_allocation_for_instance. For example, L2176.\nPlacement allocations are cleaned up either on the compute or via _local_delete. It other cases allocations may be left.","commit_id":"178a2353585303b7423784cf5892eb913bd12be8"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"b7040870c6501f65aff39dc11b1a0b54b96ac4be","unresolved":false,"context_lines":[{"line_number":2222,"context_line":"                # do the following lookup. If not, there\u0027s not much we can"},{"line_number":2223,"context_line":"                # do to recover."},{"line_number":2224,"context_line":"                cell, instance \u003d self._lookup_instance(context, instance.uuid)"},{"line_number":2225,"context_line":"                if not instance:"},{"line_number":2226,"context_line":"                    # Instance is already deleted"},{"line_number":2227,"context_line":"                    self._local_delete_cleanup(context, instance)"},{"line_number":2228,"context_line":"                    return"},{"line_number":2229,"context_line":""},{"line_number":2230,"context_line":"        bdms \u003d objects.BlockDeviceMappingList.get_by_instance_uuid("}],"source_content_type":"text/x-python","patch_set":4,"id":"9f560f44_26481a5a","line":2227,"range":{"start_line":2225,"start_character":0,"end_line":2227,"end_character":65},"updated":"2020-08-27 08:45:21.000000000","message":"If instance is None the call to _local_delete_cleanup is going to fail with an attribute error when we reference instance.uuid.\n\nhttps://bugs.launchpad.net/tripleo/+bug/1892837?","commit_id":"f35930eef8fa27ee972e87366abb38596839fdba"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"5a9fb768463edbf67dbdb02c72408194cf3d4752","unresolved":false,"context_lines":[{"line_number":2222,"context_line":"                # do the following lookup. If not, there\u0027s not much we can"},{"line_number":2223,"context_line":"                # do to recover."},{"line_number":2224,"context_line":"                cell, instance \u003d self._lookup_instance(context, instance.uuid)"},{"line_number":2225,"context_line":"                if not instance:"},{"line_number":2226,"context_line":"                    # Instance is already deleted"},{"line_number":2227,"context_line":"                    self._local_delete_cleanup(context, instance)"},{"line_number":2228,"context_line":"                    return"},{"line_number":2229,"context_line":""},{"line_number":2230,"context_line":"        bdms \u003d objects.BlockDeviceMappingList.get_by_instance_uuid("}],"source_content_type":"text/x-python","patch_set":4,"id":"9123e028_12f2d4d6","line":2227,"range":{"start_line":2225,"start_character":0,"end_line":2227,"end_character":65},"in_reply_to":"9f560f44_26481a5a","updated":"2021-02-05 16:10:01.000000000","message":"This is correct -- this patch has caused a regression in our handling of delete racing with build:\n\nhttps://bugs.launchpad.net/tripleo/+bug/1914174\n\n_local_delete_cleanup should not be called if instance \u003d None, so I\u0027m not sure what the rationale was here.","commit_id":"f35930eef8fa27ee972e87366abb38596839fdba"}],"nova/tests/functional/test_servers.py":[{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"28fc7f1c073a936f0aaf935e504c9d335c1d8676","unresolved":false,"context_lines":[{"line_number":3676,"context_line":""},{"line_number":3677,"context_line":"    def test_delete_stuck_build_instance_after_claim(self):"},{"line_number":3678,"context_line":"        \"\"\"Test for bug 1859496 where an instance allocation can leaks after"},{"line_number":3679,"context_line":"        deletion if build process have beed interrupted after resource claim"},{"line_number":3680,"context_line":"        \"\"\""},{"line_number":3681,"context_line":""},{"line_number":3682,"context_line":"        # To reproduce the issue we need to interrupt instance spawn"}],"source_content_type":"text/x-python","patch_set":3,"id":"3fa7e38b_c4c6be6b","line":3679,"range":{"start_line":3679,"start_character":39,"end_line":3679,"end_character":43},"updated":"2020-02-17 12:46:38.000000000","message":"nit: been","commit_id":"d26b55f22caf7d5b7c28f793dbe4cf34bf7fc6db"},{"author":{"_account_id":28332,"name":"Alexandre arents","email":"alexandre.arents@corp.ovh.com","username":"aarents"},"change_message_id":"9950b9857c4b684f05fda188d3c4252d22afce81","unresolved":false,"context_lines":[{"line_number":3676,"context_line":""},{"line_number":3677,"context_line":"    def test_delete_stuck_build_instance_after_claim(self):"},{"line_number":3678,"context_line":"        \"\"\"Test for bug 1859496 where an instance allocation can leaks after"},{"line_number":3679,"context_line":"        deletion if build process have beed interrupted after resource claim"},{"line_number":3680,"context_line":"        \"\"\""},{"line_number":3681,"context_line":""},{"line_number":3682,"context_line":"        # To reproduce the issue we need to interrupt instance spawn"}],"source_content_type":"text/x-python","patch_set":3,"id":"1fa4df85_7893e550","line":3679,"range":{"start_line":3679,"start_character":39,"end_line":3679,"end_character":43},"in_reply_to":"3fa7e38b_c4c6be6b","updated":"2020-02-24 13:30:46.000000000","message":"Done","commit_id":"d26b55f22caf7d5b7c28f793dbe4cf34bf7fc6db"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"28fc7f1c073a936f0aaf935e504c9d335c1d8676","unresolved":false,"context_lines":[{"line_number":3682,"context_line":"        # To reproduce the issue we need to interrupt instance spawn"},{"line_number":3683,"context_line":"        # when build request has already reached the scheduler service,"},{"line_number":3684,"context_line":"        # so that instance resource get claims."},{"line_number":3685,"context_line":"        # Real case issue can typically be a conductor restart during"},{"line_number":3686,"context_line":"        # instance claim."},{"line_number":3687,"context_line":"        # To emulate conductor restart we raise an Exception in"},{"line_number":3688,"context_line":"        # filter_scheduler after instance is claimed and mock"}],"source_content_type":"text/x-python","patch_set":3,"id":"3fa7e38b_04905641","line":3685,"range":{"start_line":3685,"start_character":15,"end_line":3685,"end_character":25},"updated":"2020-02-17 12:46:38.000000000","message":"nit: use one of these words","commit_id":"d26b55f22caf7d5b7c28f793dbe4cf34bf7fc6db"},{"author":{"_account_id":28332,"name":"Alexandre arents","email":"alexandre.arents@corp.ovh.com","username":"aarents"},"change_message_id":"9950b9857c4b684f05fda188d3c4252d22afce81","unresolved":false,"context_lines":[{"line_number":3682,"context_line":"        # To reproduce the issue we need to interrupt instance spawn"},{"line_number":3683,"context_line":"        # when build request has already reached the scheduler service,"},{"line_number":3684,"context_line":"        # so that instance resource get claims."},{"line_number":3685,"context_line":"        # Real case issue can typically be a conductor restart during"},{"line_number":3686,"context_line":"        # instance claim."},{"line_number":3687,"context_line":"        # To emulate conductor restart we raise an Exception in"},{"line_number":3688,"context_line":"        # filter_scheduler after instance is claimed and mock"}],"source_content_type":"text/x-python","patch_set":3,"id":"1fa4df85_f89ef552","line":3685,"range":{"start_line":3685,"start_character":15,"end_line":3685,"end_character":25},"in_reply_to":"3fa7e38b_04905641","updated":"2020-02-24 13:30:46.000000000","message":"Done","commit_id":"d26b55f22caf7d5b7c28f793dbe4cf34bf7fc6db"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"28fc7f1c073a936f0aaf935e504c9d335c1d8676","unresolved":false,"context_lines":[{"line_number":3683,"context_line":"        # when build request has already reached the scheduler service,"},{"line_number":3684,"context_line":"        # so that instance resource get claims."},{"line_number":3685,"context_line":"        # Real case issue can typically be a conductor restart during"},{"line_number":3686,"context_line":"        # instance claim."},{"line_number":3687,"context_line":"        # To emulate conductor restart we raise an Exception in"},{"line_number":3688,"context_line":"        # filter_scheduler after instance is claimed and mock"},{"line_number":3689,"context_line":"        # _bury_in_cell0 in that case conductor thread return."}],"source_content_type":"text/x-python","patch_set":3,"id":"3fa7e38b_e4965a3c","line":3686,"updated":"2020-02-17 12:46:38.000000000","message":"Looking at the code I think you are right. A conductor restart while the scheduler is handling the requests causes the leak.","commit_id":"d26b55f22caf7d5b7c28f793dbe4cf34bf7fc6db"},{"author":{"_account_id":28332,"name":"Alexandre arents","email":"alexandre.arents@corp.ovh.com","username":"aarents"},"change_message_id":"9950b9857c4b684f05fda188d3c4252d22afce81","unresolved":false,"context_lines":[{"line_number":3683,"context_line":"        # when build request has already reached the scheduler service,"},{"line_number":3684,"context_line":"        # so that instance resource get claims."},{"line_number":3685,"context_line":"        # Real case issue can typically be a conductor restart during"},{"line_number":3686,"context_line":"        # instance claim."},{"line_number":3687,"context_line":"        # To emulate conductor restart we raise an Exception in"},{"line_number":3688,"context_line":"        # filter_scheduler after instance is claimed and mock"},{"line_number":3689,"context_line":"        # _bury_in_cell0 in that case conductor thread return."}],"source_content_type":"text/x-python","patch_set":3,"id":"1fa4df85_acb7e23a","line":3686,"in_reply_to":"3fa7e38b_e4965a3c","updated":"2020-02-24 13:30:46.000000000","message":"Thank you for deep review","commit_id":"d26b55f22caf7d5b7c28f793dbe4cf34bf7fc6db"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"28fc7f1c073a936f0aaf935e504c9d335c1d8676","unresolved":false,"context_lines":[{"line_number":3684,"context_line":"        # so that instance resource get claims."},{"line_number":3685,"context_line":"        # Real case issue can typically be a conductor restart during"},{"line_number":3686,"context_line":"        # instance claim."},{"line_number":3687,"context_line":"        # To emulate conductor restart we raise an Exception in"},{"line_number":3688,"context_line":"        # filter_scheduler after instance is claimed and mock"},{"line_number":3689,"context_line":"        # _bury_in_cell0 in that case conductor thread return."},{"line_number":3690,"context_line":"        # Then we delete server after ensuring allocation is made and check"},{"line_number":3691,"context_line":"        # There is no leak."},{"line_number":3692,"context_line":"        # Note that because deletion occurs early, conductor did not populate"}],"source_content_type":"text/x-python","patch_set":3,"id":"3fa7e38b_24e312da","line":3689,"range":{"start_line":3687,"start_character":0,"end_line":3689,"end_character":62},"updated":"2020-02-17 12:46:38.000000000","message":"What a magnificent hack. But I don\u0027t have a better solution. I\u0027ve tried stopping / killing the conductor service when _ensure_sufficient_hosts() is hit but it makes everything hanging. (I guess .kill() waits for RPC to return which waits for scheduler to return from select_destination which waits for _ensure_sufficient_hosts to return. So we have a deadlock)","commit_id":"d26b55f22caf7d5b7c28f793dbe4cf34bf7fc6db"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"7d577ca7ae9c82ce03649f5a83fcc352b5932fb6","unresolved":false,"context_lines":[{"line_number":3684,"context_line":"        # so that instance resource get claims."},{"line_number":3685,"context_line":"        # Real case issue can typically be a conductor restart during"},{"line_number":3686,"context_line":"        # instance claim."},{"line_number":3687,"context_line":"        # To emulate conductor restart we raise an Exception in"},{"line_number":3688,"context_line":"        # filter_scheduler after instance is claimed and mock"},{"line_number":3689,"context_line":"        # _bury_in_cell0 in that case conductor thread return."},{"line_number":3690,"context_line":"        # Then we delete server after ensuring allocation is made and check"},{"line_number":3691,"context_line":"        # There is no leak."},{"line_number":3692,"context_line":"        # Note that because deletion occurs early, conductor did not populate"}],"source_content_type":"text/x-python","patch_set":3,"id":"1fa4df85_3a1d250f","line":3689,"range":{"start_line":3687,"start_character":0,"end_line":3689,"end_character":62},"in_reply_to":"1fa4df85_6c832a58","updated":"2020-02-27 08:31:07.000000000","message":"Sometimes we only have is a hack. at least this hack is in a test not in the production code.","commit_id":"d26b55f22caf7d5b7c28f793dbe4cf34bf7fc6db"},{"author":{"_account_id":28332,"name":"Alexandre arents","email":"alexandre.arents@corp.ovh.com","username":"aarents"},"change_message_id":"9950b9857c4b684f05fda188d3c4252d22afce81","unresolved":false,"context_lines":[{"line_number":3684,"context_line":"        # so that instance resource get claims."},{"line_number":3685,"context_line":"        # Real case issue can typically be a conductor restart during"},{"line_number":3686,"context_line":"        # instance claim."},{"line_number":3687,"context_line":"        # To emulate conductor restart we raise an Exception in"},{"line_number":3688,"context_line":"        # filter_scheduler after instance is claimed and mock"},{"line_number":3689,"context_line":"        # _bury_in_cell0 in that case conductor thread return."},{"line_number":3690,"context_line":"        # Then we delete server after ensuring allocation is made and check"},{"line_number":3691,"context_line":"        # There is no leak."},{"line_number":3692,"context_line":"        # Note that because deletion occurs early, conductor did not populate"}],"source_content_type":"text/x-python","patch_set":3,"id":"1fa4df85_6c832a58","line":3689,"range":{"start_line":3687,"start_character":0,"end_line":3689,"end_character":62},"in_reply_to":"3fa7e38b_24e312da","updated":"2020-02-24 13:30:46.000000000","message":"Yes I also gone into many dead end before this solution","commit_id":"d26b55f22caf7d5b7c28f793dbe4cf34bf7fc6db"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"28fc7f1c073a936f0aaf935e504c9d335c1d8676","unresolved":false,"context_lines":[{"line_number":3693,"context_line":"        # instance DB entries in cells, preventing the compute"},{"line_number":3694,"context_line":"        # update_available_resource periodic task to heal leaked allocations."},{"line_number":3695,"context_line":""},{"line_number":3696,"context_line":"        server_req \u003d self._build_minimal_create_server_request("},{"line_number":3697,"context_line":"            \u0027interrupted-server\u0027, flavor_id\u003dself.flavor1[\u0027id\u0027],"},{"line_number":3698,"context_line":"            image_uuid\u003d\u0027155d900f-4e14-4e4c-a73d-069cbf4541e6\u0027,"},{"line_number":3699,"context_line":"            networks\u003d\u0027none\u0027)"}],"source_content_type":"text/x-python","patch_set":3,"id":"3fa7e38b_c4355e46","line":3696,"range":{"start_line":3696,"start_character":26,"end_line":3696,"end_character":62},"updated":"2020-02-17 12:46:38.000000000","message":"this was renamed to _build_server() in the meantime this is while the functional job now fails for your patch","commit_id":"d26b55f22caf7d5b7c28f793dbe4cf34bf7fc6db"},{"author":{"_account_id":28332,"name":"Alexandre arents","email":"alexandre.arents@corp.ovh.com","username":"aarents"},"change_message_id":"9950b9857c4b684f05fda188d3c4252d22afce81","unresolved":false,"context_lines":[{"line_number":3693,"context_line":"        # instance DB entries in cells, preventing the compute"},{"line_number":3694,"context_line":"        # update_available_resource periodic task to heal leaked allocations."},{"line_number":3695,"context_line":""},{"line_number":3696,"context_line":"        server_req \u003d self._build_minimal_create_server_request("},{"line_number":3697,"context_line":"            \u0027interrupted-server\u0027, flavor_id\u003dself.flavor1[\u0027id\u0027],"},{"line_number":3698,"context_line":"            image_uuid\u003d\u0027155d900f-4e14-4e4c-a73d-069cbf4541e6\u0027,"},{"line_number":3699,"context_line":"            networks\u003d\u0027none\u0027)"}],"source_content_type":"text/x-python","patch_set":3,"id":"1fa4df85_982d81aa","line":3696,"range":{"start_line":3696,"start_character":26,"end_line":3696,"end_character":62},"in_reply_to":"3fa7e38b_c4355e46","updated":"2020-02-24 13:30:46.000000000","message":"My bad, I did not check functional after rebase, nova code is moving so fast! Thank you for pointing this.","commit_id":"d26b55f22caf7d5b7c28f793dbe4cf34bf7fc6db"},{"author":{"_account_id":9708,"name":"Balazs Gibizer","display_name":"gibi","email":"gibizer@gmail.com","username":"gibi"},"change_message_id":"28fc7f1c073a936f0aaf935e504c9d335c1d8676","unresolved":false,"context_lines":[{"line_number":3698,"context_line":"            image_uuid\u003d\u0027155d900f-4e14-4e4c-a73d-069cbf4541e6\u0027,"},{"line_number":3699,"context_line":"            networks\u003d\u0027none\u0027)"},{"line_number":3700,"context_line":""},{"line_number":3701,"context_line":"        with test.nested(mock.patch.object(nova.scheduler.filter_scheduler."},{"line_number":3702,"context_line":"                                           FilterScheduler,"},{"line_number":3703,"context_line":"                                           \u0027_ensure_sufficient_hosts\u0027),"},{"line_number":3704,"context_line":"                         mock.patch.object(nova.conductor.manager."}],"source_content_type":"text/x-python","patch_set":3,"id":"3fa7e38b_eaa2a3f9","line":3701,"range":{"start_line":3701,"start_character":25,"end_line":3701,"end_character":26},"updated":"2020-02-17 12:46:38.000000000","message":"nit: I would wrap the line here (but it is ugly in any way)","commit_id":"d26b55f22caf7d5b7c28f793dbe4cf34bf7fc6db"},{"author":{"_account_id":28332,"name":"Alexandre arents","email":"alexandre.arents@corp.ovh.com","username":"aarents"},"change_message_id":"9950b9857c4b684f05fda188d3c4252d22afce81","unresolved":false,"context_lines":[{"line_number":3698,"context_line":"            image_uuid\u003d\u0027155d900f-4e14-4e4c-a73d-069cbf4541e6\u0027,"},{"line_number":3699,"context_line":"            networks\u003d\u0027none\u0027)"},{"line_number":3700,"context_line":""},{"line_number":3701,"context_line":"        with test.nested(mock.patch.object(nova.scheduler.filter_scheduler."},{"line_number":3702,"context_line":"                                           FilterScheduler,"},{"line_number":3703,"context_line":"                                           \u0027_ensure_sufficient_hosts\u0027),"},{"line_number":3704,"context_line":"                         mock.patch.object(nova.conductor.manager."}],"source_content_type":"text/x-python","patch_set":3,"id":"1fa4df85_ac492261","line":3701,"range":{"start_line":3701,"start_character":25,"end_line":3701,"end_character":26},"in_reply_to":"3fa7e38b_eaa2a3f9","updated":"2020-02-24 13:30:46.000000000","message":"Done","commit_id":"d26b55f22caf7d5b7c28f793dbe4cf34bf7fc6db"}]}
