)]}'
{"nova/tests/functional/regressions/test_bug_1914777.py":[{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"85c9adeae0d6357bbd4c87ad3a0dbcbaed311668","unresolved":true,"context_lines":[{"line_number":61,"context_line":"        \"\"\"This tests a scenario where another request has deleted the build"},{"line_number":62,"context_line":"        request record and the instance record ahead of us."},{"line_number":63,"context_line":"        \"\"\""},{"line_number":64,"context_line":"        # Kick off a server create request and move on once it\u0027s in the BUILD"},{"line_number":65,"context_line":"        # state. Since we have no conductor or scheduler service running, the"},{"line_number":66,"context_line":"        # server will \"hang\" in an unscheduled state for testing."},{"line_number":67,"context_line":"        server \u003d self._create_server(expected_state\u003d\u0027BUILD\u0027)"},{"line_number":68,"context_line":"        # Simulate that a different request has deleted the build request"},{"line_number":69,"context_line":"        # record after this delete request has begun processing. (The first"},{"line_number":70,"context_line":"        # lookup of the build request occurs in the servers API to get the"}],"source_content_type":"text/x-python","patch_set":1,"id":"39b762e0_3c882102","line":67,"range":{"start_line":64,"start_character":0,"end_line":67,"end_character":60},"updated":"2021-02-17 16:20:56.000000000","message":"A silly hackaround to creating the instance and then mocking would be to do this in setUp allowing you to move the mocks up to the test method signature.","commit_id":"8eb8168726e1ee0151764895b1bdc62f22e97c9d"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"d4e3985d8f76a489213653fe21db02cab1f37f45","unresolved":true,"context_lines":[{"line_number":61,"context_line":"        \"\"\"This tests a scenario where another request has deleted the build"},{"line_number":62,"context_line":"        request record and the instance record ahead of us."},{"line_number":63,"context_line":"        \"\"\""},{"line_number":64,"context_line":"        # Kick off a server create request and move on once it\u0027s in the BUILD"},{"line_number":65,"context_line":"        # state. Since we have no conductor or scheduler service running, the"},{"line_number":66,"context_line":"        # server will \"hang\" in an unscheduled state for testing."},{"line_number":67,"context_line":"        server \u003d self._create_server(expected_state\u003d\u0027BUILD\u0027)"},{"line_number":68,"context_line":"        # Simulate that a different request has deleted the build request"},{"line_number":69,"context_line":"        # record after this delete request has begun processing. (The first"},{"line_number":70,"context_line":"        # lookup of the build request occurs in the servers API to get the"}],"source_content_type":"text/x-python","patch_set":1,"id":"5f73fa8e_883a9bd2","line":67,"range":{"start_line":64,"start_character":0,"end_line":67,"end_character":60},"in_reply_to":"39b762e0_3c882102","updated":"2021-02-17 16:38:39.000000000","message":"Ah, nice idea, thanks. I\u0027d like to have the mocks on the test method signature.","commit_id":"8eb8168726e1ee0151764895b1bdc62f22e97c9d"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"85c9adeae0d6357bbd4c87ad3a0dbcbaed311668","unresolved":true,"context_lines":[{"line_number":69,"context_line":"        # record after this delete request has begun processing. (The first"},{"line_number":70,"context_line":"        # lookup of the build request occurs in the servers API to get the"},{"line_number":71,"context_line":"        # instance object in order to delete it)."},{"line_number":72,"context_line":"        br \u003d objects.BuildRequest.get_by_instance_uuid(self.ctxt, server[\u0027id\u0027])"},{"line_number":73,"context_line":"        get_br \u003d \u0027nova.objects.build_request.BuildRequest.get_by_instance_uuid\u0027"},{"line_number":74,"context_line":"        with mock.patch(get_br) as mock_get_br:"},{"line_number":75,"context_line":"            # The first lookup at the beginning of the delete request in the"}],"source_content_type":"text/x-python","patch_set":1,"id":"5bbe8aaa_2a51443d","line":72,"range":{"start_line":72,"start_character":8,"end_line":72,"end_character":79},"updated":"2021-02-17 16:20:56.000000000","message":"nit - can you move this alongside br_not_found and just wrap down to the next line?","commit_id":"8eb8168726e1ee0151764895b1bdc62f22e97c9d"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"d4e3985d8f76a489213653fe21db02cab1f37f45","unresolved":true,"context_lines":[{"line_number":69,"context_line":"        # record after this delete request has begun processing. (The first"},{"line_number":70,"context_line":"        # lookup of the build request occurs in the servers API to get the"},{"line_number":71,"context_line":"        # instance object in order to delete it)."},{"line_number":72,"context_line":"        br \u003d objects.BuildRequest.get_by_instance_uuid(self.ctxt, server[\u0027id\u0027])"},{"line_number":73,"context_line":"        get_br \u003d \u0027nova.objects.build_request.BuildRequest.get_by_instance_uuid\u0027"},{"line_number":74,"context_line":"        with mock.patch(get_br) as mock_get_br:"},{"line_number":75,"context_line":"            # The first lookup at the beginning of the delete request in the"}],"source_content_type":"text/x-python","patch_set":1,"id":"f84f63ac_cb8476c9","line":72,"range":{"start_line":72,"start_character":8,"end_line":72,"end_character":79},"in_reply_to":"5bbe8aaa_2a51443d","updated":"2021-02-17 16:38:39.000000000","message":"I actually did this in an earlier local revision and shot myself in the foot 😆\n\nI need to get the build request before I mock BuildRequest.get_by_instance_uuid, else I can\u0027t get the real build request.\n\nWould you prefer if I moved br_not_found up here? Or maybe if I rename br to real_br or something like that?","commit_id":"8eb8168726e1ee0151764895b1bdc62f22e97c9d"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"a19a63d681f957804c4f33b2d282e3fb350fdec9","unresolved":true,"context_lines":[{"line_number":69,"context_line":"        # record after this delete request has begun processing. (The first"},{"line_number":70,"context_line":"        # lookup of the build request occurs in the servers API to get the"},{"line_number":71,"context_line":"        # instance object in order to delete it)."},{"line_number":72,"context_line":"        br \u003d objects.BuildRequest.get_by_instance_uuid(self.ctxt, server[\u0027id\u0027])"},{"line_number":73,"context_line":"        get_br \u003d \u0027nova.objects.build_request.BuildRequest.get_by_instance_uuid\u0027"},{"line_number":74,"context_line":"        with mock.patch(get_br) as mock_get_br:"},{"line_number":75,"context_line":"            # The first lookup at the beginning of the delete request in the"}],"source_content_type":"text/x-python","patch_set":1,"id":"b2ced1e2_e73492a3","line":72,"range":{"start_line":72,"start_character":8,"end_line":72,"end_character":79},"in_reply_to":"f84f63ac_cb8476c9","updated":"2021-02-17 16:56:13.000000000","message":"Ah sorry I\u0027m blind, that also blocks moving the mock up to the test signature unless you fetch it in setUp.","commit_id":"8eb8168726e1ee0151764895b1bdc62f22e97c9d"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"85c9adeae0d6357bbd4c87ad3a0dbcbaed311668","unresolved":true,"context_lines":[{"line_number":101,"context_line":"        # state. Since we have no conductor or scheduler service running, the"},{"line_number":102,"context_line":"        # server will \"hang\" in an unscheduled state for testing."},{"line_number":103,"context_line":"        server \u003d self._create_server(expected_state\u003d\u0027BUILD\u0027)"},{"line_number":104,"context_line":"        uuid \u003d server[\u0027id\u0027]"},{"line_number":105,"context_line":""},{"line_number":106,"context_line":"        # Simulate that a different request has deleted the build request"},{"line_number":107,"context_line":"        # record after this delete request has begun processing. (The first"}],"source_content_type":"text/x-python","patch_set":1,"id":"134216b6_99474dab","line":104,"range":{"start_line":104,"start_character":8,"end_line":104,"end_character":27},"updated":"2021-02-17 16:20:56.000000000","message":"nit - You use a mix of server[\u0027id\u0027] and uuid below, I think we can get away with server[\u0027id\u0027] tbh.","commit_id":"8eb8168726e1ee0151764895b1bdc62f22e97c9d"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"d4e3985d8f76a489213653fe21db02cab1f37f45","unresolved":true,"context_lines":[{"line_number":101,"context_line":"        # state. Since we have no conductor or scheduler service running, the"},{"line_number":102,"context_line":"        # server will \"hang\" in an unscheduled state for testing."},{"line_number":103,"context_line":"        server \u003d self._create_server(expected_state\u003d\u0027BUILD\u0027)"},{"line_number":104,"context_line":"        uuid \u003d server[\u0027id\u0027]"},{"line_number":105,"context_line":""},{"line_number":106,"context_line":"        # Simulate that a different request has deleted the build request"},{"line_number":107,"context_line":"        # record after this delete request has begun processing. (The first"}],"source_content_type":"text/x-python","patch_set":1,"id":"ae17b09a_6cbd38d5","line":104,"range":{"start_line":104,"start_character":8,"end_line":104,"end_character":27},"in_reply_to":"134216b6_99474dab","updated":"2021-02-17 16:38:39.000000000","message":"This was a cheat to avoid line wrapping in certain places later 😓\n\nI\u0027ll revisit this, maybe I don\u0027t need it anymore, but at any rate if I\u0027m going to have it I should use it consistently as you point out. I\u0027ll update.","commit_id":"8eb8168726e1ee0151764895b1bdc62f22e97c9d"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"85c9adeae0d6357bbd4c87ad3a0dbcbaed311668","unresolved":true,"context_lines":[{"line_number":107,"context_line":"        # record after this delete request has begun processing. (The first"},{"line_number":108,"context_line":"        # lookup of the build request occurs in the servers API to get the"},{"line_number":109,"context_line":"        # instance object in order to delete it)."},{"line_number":110,"context_line":"        br \u003d objects.BuildRequest.get_by_instance_uuid(self.ctxt, server[\u0027id\u0027])"},{"line_number":111,"context_line":"        get_br \u003d \u0027nova.objects.build_request.BuildRequest.get_by_instance_uuid\u0027"},{"line_number":112,"context_line":""},{"line_number":113,"context_line":"        @mock.patch(get_br)"}],"source_content_type":"text/x-python","patch_set":1,"id":"9c8e12e9_7cc9952c","line":110,"range":{"start_line":110,"start_character":8,"end_line":110,"end_character":79},"updated":"2021-02-17 16:20:56.000000000","message":"same nit as above.","commit_id":"8eb8168726e1ee0151764895b1bdc62f22e97c9d"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"97a89d27d475401e82e2197cd449545f31500302","unresolved":true,"context_lines":[{"line_number":23,"context_line":""},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"class TestDeleteWhileBooting(test.TestCase,"},{"line_number":26,"context_line":"                             integrated_helpers.InstanceHelperMixin):"},{"line_number":27,"context_line":"    \"\"\"This tests race scenarios where an instance is deleted while booting."},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"    In these scenarios, the nova-api service is racing with nova-conductor"}],"source_content_type":"text/x-python","patch_set":2,"id":"f6f69471_8250365f","line":26,"updated":"2021-02-18 15:34:03.000000000","message":"style nit:\n\n  class TestDeleteWhileBooting(\n      test.TestCase, integrated_helpers.InstanceHelperMixin,\n  ):\n\n(or subclass \u0027_IntegratedTestBase\u0027 which gives you all the fixtures you want, but I think we\u0027ve discussed this before)","commit_id":"f7975d640ce1e9fa06d045d35177f07451716f0c"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"c01d52161b0dbb6aab38e2a4452a80e6e0ea5381","unresolved":false,"context_lines":[{"line_number":23,"context_line":""},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"class TestDeleteWhileBooting(test.TestCase,"},{"line_number":26,"context_line":"                             integrated_helpers.InstanceHelperMixin):"},{"line_number":27,"context_line":"    \"\"\"This tests race scenarios where an instance is deleted while booting."},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"    In these scenarios, the nova-api service is racing with nova-conductor"}],"source_content_type":"text/x-python","patch_set":2,"id":"9fbe2ca4_8ef0cc21","line":26,"in_reply_to":"6a4a1018_30031111","updated":"2021-02-18 16:33:52.000000000","message":"I initially tried to use _IntegratedTestBase and overrode _setup_scheduler_service and _setup_scheduler_service to just pass, but the sticking point ended up being that I need to not use the CastAsCall fixture in this test because I need to let the instance build \"hang\" and move on to the rest of the test. With CastAsCall, the test will block on the server create until it times out and so on.","commit_id":"f7975d640ce1e9fa06d045d35177f07451716f0c"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"52dc26c631127dbf88de7160702fd1ec2731726f","unresolved":false,"context_lines":[{"line_number":23,"context_line":""},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"class TestDeleteWhileBooting(test.TestCase,"},{"line_number":26,"context_line":"                             integrated_helpers.InstanceHelperMixin):"},{"line_number":27,"context_line":"    \"\"\"This tests race scenarios where an instance is deleted while booting."},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"    In these scenarios, the nova-api service is racing with nova-conductor"}],"source_content_type":"text/x-python","patch_set":2,"id":"b7b5d75d_515be724","line":26,"in_reply_to":"9fbe2ca4_8ef0cc21","updated":"2021-02-18 16:44:58.000000000","message":"\u003e I initially tried to use _IntegratedTestBase and overrode _setup_scheduler_service and _setup_scheduler_service to just pass\n\n_setup_scheduler_service and _setup_conductor_service","commit_id":"f7975d640ce1e9fa06d045d35177f07451716f0c"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"7bcd1885bdc02325952a6feb345fecc2abe23fe4","unresolved":false,"context_lines":[{"line_number":23,"context_line":""},{"line_number":24,"context_line":""},{"line_number":25,"context_line":"class TestDeleteWhileBooting(test.TestCase,"},{"line_number":26,"context_line":"                             integrated_helpers.InstanceHelperMixin):"},{"line_number":27,"context_line":"    \"\"\"This tests race scenarios where an instance is deleted while booting."},{"line_number":28,"context_line":""},{"line_number":29,"context_line":"    In these scenarios, the nova-api service is racing with nova-conductor"}],"source_content_type":"text/x-python","patch_set":2,"id":"6a4a1018_30031111","line":26,"in_reply_to":"f6f69471_8250365f","updated":"2021-02-18 15:49:23.000000000","message":"I was about to suggest this before but Mel has noted that we don\u0027t want the conductor or scheduler started here so this is fine.","commit_id":"f7975d640ce1e9fa06d045d35177f07451716f0c"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"97a89d27d475401e82e2197cd449545f31500302","unresolved":true,"context_lines":[{"line_number":71,"context_line":""},{"line_number":72,"context_line":"    @mock.patch(\u0027nova.objects.build_request.BuildRequest.get_by_instance_uuid\u0027)"},{"line_number":73,"context_line":"    def test_build_request_and_instance_not_found(self, mock_get_br):"},{"line_number":74,"context_line":"        \"\"\"This tests a scenario where another request has deleted the build"},{"line_number":75,"context_line":"        request record and the instance record ahead of us."},{"line_number":76,"context_line":"        \"\"\""},{"line_number":77,"context_line":"        # The first lookup at the beginning of the delete request in the"}],"source_content_type":"text/x-python","patch_set":2,"id":"eac51f1a_b28a3c9e","line":74,"range":{"start_line":74,"start_character":39,"end_line":74,"end_character":54},"updated":"2021-02-18 15:34:03.000000000","message":"a delete request ? Or are there other request types that could cause this to happen? The bug report suggests this is confined to deletes during a boot\n\nAs an aside, it\u0027s seems strange that we use a lock on the compute host when doing things like attaching volumes but not when deleting servers (maybe that\u0027s how you\u0027re fixing this, idk yet 😅)","commit_id":"f7975d640ce1e9fa06d045d35177f07451716f0c"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"f382aae549b9d76aa08671907e0b91c2ed1d450f","unresolved":false,"context_lines":[{"line_number":71,"context_line":""},{"line_number":72,"context_line":"    @mock.patch(\u0027nova.objects.build_request.BuildRequest.get_by_instance_uuid\u0027)"},{"line_number":73,"context_line":"    def test_build_request_and_instance_not_found(self, mock_get_br):"},{"line_number":74,"context_line":"        \"\"\"This tests a scenario where another request has deleted the build"},{"line_number":75,"context_line":"        request record and the instance record ahead of us."},{"line_number":76,"context_line":"        \"\"\""},{"line_number":77,"context_line":"        # The first lookup at the beginning of the delete request in the"}],"source_content_type":"text/x-python","patch_set":2,"id":"19d18fad_f32b4b18","line":74,"range":{"start_line":74,"start_character":39,"end_line":74,"end_character":54},"in_reply_to":"121dd194_f8a22e9e","updated":"2021-02-18 17:23:48.000000000","message":"\u003e Re: locks, while we could lock the usual way here (in compute/api), it would only help us if the racing requests happened to land on the same API worker, so it would be limited in how much it helps. We\u0027d need a distributed lock, and with that we\u0027d also need to be able to \"transfer\" ownership of the held lock to another service (nova-conductor), as instance create happens across both nova-api and nova-conductor. (And delete happens across nova-api and nova-compute). It could be done, but it\u0027s a lot more involved than the usual locking we do today.\n\nAha, so we would. That makes sense. Thanks for the thorough clarification, both","commit_id":"f7975d640ce1e9fa06d045d35177f07451716f0c"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"c01d52161b0dbb6aab38e2a4452a80e6e0ea5381","unresolved":false,"context_lines":[{"line_number":71,"context_line":""},{"line_number":72,"context_line":"    @mock.patch(\u0027nova.objects.build_request.BuildRequest.get_by_instance_uuid\u0027)"},{"line_number":73,"context_line":"    def test_build_request_and_instance_not_found(self, mock_get_br):"},{"line_number":74,"context_line":"        \"\"\"This tests a scenario where another request has deleted the build"},{"line_number":75,"context_line":"        request record and the instance record ahead of us."},{"line_number":76,"context_line":"        \"\"\""},{"line_number":77,"context_line":"        # The first lookup at the beginning of the delete request in the"}],"source_content_type":"text/x-python","patch_set":2,"id":"121dd194_f8a22e9e","line":74,"range":{"start_line":74,"start_character":39,"end_line":74,"end_character":54},"in_reply_to":"909ae0c2_be67348d","updated":"2021-02-18 16:33:52.000000000","message":"Based on the code inspection I did, I believe delete request is the only way this code path can be hit. I worded it as \"another request\" in case there\u0027s any other way it could happen. The conductor deletes the build request as part of its usual work, but in the time I spent tracing the code, I couldn\u0027t find a way this path could happen if it was the conductor that deleted the build request. Disclaimer, I could have missed something, so I thought it was safest for me to write \"another request\" in case there\u0027s another way, as the conclusion I came to was based on code inspection by my eyeballs alone.\n\nNote that this code path is *not* the one reported in the bug (that\u0027s the other test, test_deleting_instance_at_the_same_time). I added this test to add coverage for the other \"if not instance:\" case that could raise the AttributeError, here:\n\nhttps://github.com/openstack/nova/blob/e7aa436dc6158a124529bb64b1d98e5c95596236/nova/compute/api.py#L2241-L2244\n\nRe: locks, while we could lock the usual way here (in compute/api), it would only help us if the racing requests happened to land on the same API worker, so it would be limited in how much it helps. We\u0027d need a distributed lock, and with that we\u0027d also need to be able to \"transfer\" ownership of the held lock to another service (nova-conductor), as instance create happens across both nova-api and nova-conductor. (And delete happens across nova-api and nova-compute). It could be done, but it\u0027s a lot more involved than the usual locking we do today.","commit_id":"f7975d640ce1e9fa06d045d35177f07451716f0c"},{"author":{"_account_id":10135,"name":"Lee Yarwood","display_name":"Lee Yarwood","email":"lyarwood@redhat.com","username":"lyarwood"},"change_message_id":"7bcd1885bdc02325952a6feb345fecc2abe23fe4","unresolved":false,"context_lines":[{"line_number":71,"context_line":""},{"line_number":72,"context_line":"    @mock.patch(\u0027nova.objects.build_request.BuildRequest.get_by_instance_uuid\u0027)"},{"line_number":73,"context_line":"    def test_build_request_and_instance_not_found(self, mock_get_br):"},{"line_number":74,"context_line":"        \"\"\"This tests a scenario where another request has deleted the build"},{"line_number":75,"context_line":"        request record and the instance record ahead of us."},{"line_number":76,"context_line":"        \"\"\""},{"line_number":77,"context_line":"        # The first lookup at the beginning of the delete request in the"}],"source_content_type":"text/x-python","patch_set":2,"id":"909ae0c2_be67348d","line":74,"range":{"start_line":74,"start_character":39,"end_line":74,"end_character":54},"in_reply_to":"eac51f1a_b28a3c9e","updated":"2021-02-18 15:49:23.000000000","message":"Delete request right?\n\nWe do actually lock by instance.uuid when deleting the instance on the compute manager side, this is all happening well before that.\n\nhttps://github.com/openstack/nova/blob/e7aa436dc6158a124529bb64b1d98e5c95596236/nova/compute/manager.py#L3018-L3055","commit_id":"f7975d640ce1e9fa06d045d35177f07451716f0c"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"c01d52161b0dbb6aab38e2a4452a80e6e0ea5381","unresolved":true,"context_lines":[{"line_number":92,"context_line":"    @mock.patch(\u0027nova.objects.InstanceMapping.get_by_instance_uuid\u0027)"},{"line_number":93,"context_line":"    @mock.patch(\u0027nova.objects.instance.Instance.get_by_uuid\u0027)"},{"line_number":94,"context_line":"    def test_deleting_instance_at_the_same_time(self, mock_get_i, mock_get_im,"},{"line_number":95,"context_line":"                                                mock_get_br):"},{"line_number":96,"context_line":"        \"\"\"This tests the scenario where another request is trying to delete"},{"line_number":97,"context_line":"        the instance record at the same time we are, while the instance is"},{"line_number":98,"context_line":"        booting. An example of this: while the create and delete are running at"}],"source_content_type":"text/x-python","patch_set":2,"id":"e69cfaa2_b3b66366","line":95,"updated":"2021-02-18 16:33:52.000000000","message":"This test covers the other path:\n\nhttps://github.com/openstack/nova/blob/e7aa436dc6158a124529bb64b1d98e5c95596236/nova/compute/api.py#L2254-L2257","commit_id":"f7975d640ce1e9fa06d045d35177f07451716f0c"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"f382aae549b9d76aa08671907e0b91c2ed1d450f","unresolved":false,"context_lines":[{"line_number":92,"context_line":"    @mock.patch(\u0027nova.objects.InstanceMapping.get_by_instance_uuid\u0027)"},{"line_number":93,"context_line":"    @mock.patch(\u0027nova.objects.instance.Instance.get_by_uuid\u0027)"},{"line_number":94,"context_line":"    def test_deleting_instance_at_the_same_time(self, mock_get_i, mock_get_im,"},{"line_number":95,"context_line":"                                                mock_get_br):"},{"line_number":96,"context_line":"        \"\"\"This tests the scenario where another request is trying to delete"},{"line_number":97,"context_line":"        the instance record at the same time we are, while the instance is"},{"line_number":98,"context_line":"        booting. An example of this: while the create and delete are running at"}],"source_content_type":"text/x-python","patch_set":2,"id":"668de280_4f3e6340","line":95,"in_reply_to":"e69cfaa2_b3b66366","updated":"2021-02-18 17:23:48.000000000","message":"Ack","commit_id":"f7975d640ce1e9fa06d045d35177f07451716f0c"},{"author":{"_account_id":15334,"name":"Stephen Finucane","display_name":"stephenfin","email":"stephenfin@redhat.com","username":"sfinucan"},"change_message_id":"97a89d27d475401e82e2197cd449545f31500302","unresolved":false,"context_lines":[{"line_number":101,"context_line":"        it. The create request deletes the instance record and then delete"},{"line_number":102,"context_line":"        request tries to lookup the instance after it deletes the build"},{"line_number":103,"context_line":"        request. Its attempt to lookup the instance fails because the create"},{"line_number":104,"context_line":"        request already deleted it."},{"line_number":105,"context_line":"        \"\"\""},{"line_number":106,"context_line":"        # First lookup at the beginning of the delete request in the"},{"line_number":107,"context_line":"        # ServersController succeeds, second lookup to handle \"delete while"}],"source_content_type":"text/x-python","patch_set":2,"id":"23ceb744_afe67943","line":104,"updated":"2021-02-18 15:34:03.000000000","message":"mmm, racy","commit_id":"f7975d640ce1e9fa06d045d35177f07451716f0c"}]}
