)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"d6ff5b2909f14d8c5e55de6594b1589580a54142","unresolved":false,"context_lines":[{"line_number":11,"context_line":"to delete an instance in ERROR state that was in cell0,"},{"line_number":12,"context_line":"the quota usage was decremented."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"This is because we are committed the quota reservation"},{"line_number":15,"context_line":"to decrement the usage before actually attempting to destroy"},{"line_number":16,"context_line":"the instance, rather than upon successful deletion."},{"line_number":17,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"dfeb2761_9f768106","line":14,"range":{"start_line":14,"start_character":19,"end_line":14,"end_character":32},"updated":"2017-04-01 01:41:38.000000000","message":"committed","commit_id":"47fce8d0a4309df39fa70e6573b1e6d7002f7a42"}],"nova/compute/api.py":[{"author":{"_account_id":17814,"name":"fengzhr","email":"fengzhr@awcloud.com","username":"space"},"change_message_id":"01082eb6b7088f319e9a8d506bd029deaece9529","unresolved":false,"context_lines":[{"line_number":1890,"context_line":"                        with nova_context.target_cell(context, None):"},{"line_number":1891,"context_line":"                            quotas.rollback()"},{"line_number":1892,"context_line":"                            # Instance is already deleted."},{"line_number":1893,"context_line":"                            return"},{"line_number":1894,"context_line":"                if not instance:"},{"line_number":1895,"context_line":"                    # Instance is already deleted."},{"line_number":1896,"context_line":"                    return"}],"source_content_type":"text/x-python","patch_set":4,"id":"dfeb2761_ba94b38c","line":1893,"range":{"start_line":1893,"start_character":28,"end_line":1893,"end_character":34},"updated":"2017-04-01 02:20:50.000000000","message":"Is this necessary?","commit_id":"d91ac3528028878ba727b0c734e9a397328c41d1"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"59658dbcaede800b376557032a0f545a542c0c6e","unresolved":false,"context_lines":[{"line_number":1890,"context_line":"                        with nova_context.target_cell(context, None):"},{"line_number":1891,"context_line":"                            quotas.rollback()"},{"line_number":1892,"context_line":"                            # Instance is already deleted."},{"line_number":1893,"context_line":"                            return"},{"line_number":1894,"context_line":"                if not instance:"},{"line_number":1895,"context_line":"                    # Instance is already deleted."},{"line_number":1896,"context_line":"                    return"}],"source_content_type":"text/x-python","patch_set":4,"id":"bff0334d_b5d74824","line":1893,"range":{"start_line":1893,"start_character":28,"end_line":1893,"end_character":34},"in_reply_to":"dfeb2761_0846b07d","updated":"2017-04-05 18:52:50.000000000","message":"To be clear, without this the functional test fails because I\u0027m not running the consoleauth service, so when this code falls through it fails with a 500 on L1953. So I can undo this change and fix the functional test, but it also seems correct to short-circuit if we already got an InstanceNotFound.","commit_id":"d91ac3528028878ba727b0c734e9a397328c41d1"},{"author":{"_account_id":17814,"name":"fengzhr","email":"fengzhr@awcloud.com","username":"space"},"change_message_id":"95f5e5f58c7d68be0b2418db789102b1a070745f","unresolved":false,"context_lines":[{"line_number":1890,"context_line":"                        with nova_context.target_cell(context, None):"},{"line_number":1891,"context_line":"                            quotas.rollback()"},{"line_number":1892,"context_line":"                            # Instance is already deleted."},{"line_number":1893,"context_line":"                            return"},{"line_number":1894,"context_line":"                if not instance:"},{"line_number":1895,"context_line":"                    # Instance is already deleted."},{"line_number":1896,"context_line":"                    return"}],"source_content_type":"text/x-python","patch_set":4,"id":"dfeb2761_baaef32b","line":1893,"range":{"start_line":1893,"start_character":28,"end_line":1893,"end_character":34},"in_reply_to":"dfeb2761_1ab6fffb","updated":"2017-04-01 03:08:57.000000000","message":"I ran the test cases and I know what\u0027s going on. I had a bitof misconception.","commit_id":"d91ac3528028878ba727b0c734e9a397328c41d1"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"563508eed62a97bf3d7c3333575aec9fb66ea426","unresolved":false,"context_lines":[{"line_number":1890,"context_line":"                        with nova_context.target_cell(context, None):"},{"line_number":1891,"context_line":"                            quotas.rollback()"},{"line_number":1892,"context_line":"                            # Instance is already deleted."},{"line_number":1893,"context_line":"                            return"},{"line_number":1894,"context_line":"                if not instance:"},{"line_number":1895,"context_line":"                    # Instance is already deleted."},{"line_number":1896,"context_line":"                    return"}],"source_content_type":"text/x-python","patch_set":4,"id":"dfeb2761_1ab6fffb","line":1893,"range":{"start_line":1893,"start_character":28,"end_line":1893,"end_character":34},"in_reply_to":"dfeb2761_ba94b38c","updated":"2017-04-01 02:34:18.000000000","message":"Yes, if you remove this the functional test fails because it goes on to the other delete path code below, which we don\u0027t actually want to be doing, that\u0027s why we\u0027re in this block to begin with.","commit_id":"d91ac3528028878ba727b0c734e9a397328c41d1"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"dec371301ccbc28346f349db72504b9793023d83","unresolved":false,"context_lines":[{"line_number":1890,"context_line":"                        with nova_context.target_cell(context, None):"},{"line_number":1891,"context_line":"                            quotas.rollback()"},{"line_number":1892,"context_line":"                            # Instance is already deleted."},{"line_number":1893,"context_line":"                            return"},{"line_number":1894,"context_line":"                if not instance:"},{"line_number":1895,"context_line":"                    # Instance is already deleted."},{"line_number":1896,"context_line":"                    return"}],"source_content_type":"text/x-python","patch_set":4,"id":"dfeb2761_0846b07d","line":1893,"range":{"start_line":1893,"start_character":28,"end_line":1893,"end_character":34},"in_reply_to":"dfeb2761_baaef32b","updated":"2017-04-01 15:27:41.000000000","message":"Cool. Yeah, this is really ugly code with way too many conditions. My plan is that once this bug and another bug in this same area are fixed and backported to stable/ocata, I\u0027m going to spend some time trying to consolidate and remove as much of this duplicate code as possible so we\u0027re back to a single \u0027local delete\u0027 path in the API.","commit_id":"d91ac3528028878ba727b0c734e9a397328c41d1"},{"author":{"_account_id":17814,"name":"fengzhr","email":"fengzhr@awcloud.com","username":"space"},"change_message_id":"01082eb6b7088f319e9a8d506bd029deaece9529","unresolved":false,"context_lines":[{"line_number":1893,"context_line":"                            return"},{"line_number":1894,"context_line":"                if not instance:"},{"line_number":1895,"context_line":"                    # Instance is already deleted."},{"line_number":1896,"context_line":"                    return"},{"line_number":1897,"context_line":"            except exception.ObjectActionError:"},{"line_number":1898,"context_line":"                # NOTE(melwitt): This means the instance.host changed"},{"line_number":1899,"context_line":"                # under us indicating the instance became scheduled"}],"source_content_type":"text/x-python","patch_set":4,"id":"dfeb2761_dadc1776","line":1896,"range":{"start_line":1896,"start_character":20,"end_line":1896,"end_character":26},"updated":"2017-04-01 02:20:50.000000000","message":"If instance is already deleted, this will execute.","commit_id":"d91ac3528028878ba727b0c734e9a397328c41d1"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"563508eed62a97bf3d7c3333575aec9fb66ea426","unresolved":false,"context_lines":[{"line_number":1893,"context_line":"                            return"},{"line_number":1894,"context_line":"                if not instance:"},{"line_number":1895,"context_line":"                    # Instance is already deleted."},{"line_number":1896,"context_line":"                    return"},{"line_number":1897,"context_line":"            except exception.ObjectActionError:"},{"line_number":1898,"context_line":"                # NOTE(melwitt): This means the instance.host changed"},{"line_number":1899,"context_line":"                # under us indicating the instance became scheduled"}],"source_content_type":"text/x-python","patch_set":4,"id":"dfeb2761_5aa127a9","line":1896,"range":{"start_line":1896,"start_character":20,"end_line":1896,"end_character":26},"in_reply_to":"dfeb2761_dadc1776","updated":"2017-04-01 02:34:18.000000000","message":"This is if there is no cell, i.e. the condition above:\n\n  if cell and instance:\n\nEvaluates to False, then we get here. But that\u0027s not the problem from the bug. The instance is in a cell (cell0) and it\u0027s not already deleted.","commit_id":"d91ac3528028878ba727b0c734e9a397328c41d1"}],"nova/tests/functional/regressions/test_bug_1678326.py":[{"author":{"_account_id":4393,"name":"Dan Smith","email":"dms@danplanet.com","username":"danms"},"change_message_id":"b278d1ced047f9476be8b423430e42d4718fca86","unresolved":false,"context_lines":[{"line_number":77,"context_line":""},{"line_number":78,"context_line":"        # Reset the stub so we can actually delete the instance on tearDown."},{"line_number":79,"context_line":"        self.stub_out(\u0027nova.objects.instance.Instance.destroy\u0027,"},{"line_number":80,"context_line":"                      original_instance_destroy)"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"        # Now check the quota again. Until the bug is fixed, quota usage will"},{"line_number":83,"context_line":"        # have been decremented even though we failed to delete the instance."}],"source_content_type":"text/x-python","patch_set":5,"id":"bff0334d_f8c14730","line":80,"updated":"2017-04-05 19:32:32.000000000","message":"Probably better to use mock and start/stop the patcher, but ..","commit_id":"032937ce51c64e0f5292ca3149e3b244863fffca"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b65a6b4177ed84347330e966d30e17c1177db99d","unresolved":false,"context_lines":[{"line_number":77,"context_line":""},{"line_number":78,"context_line":"        # Reset the stub so we can actually delete the instance on tearDown."},{"line_number":79,"context_line":"        self.stub_out(\u0027nova.objects.instance.Instance.destroy\u0027,"},{"line_number":80,"context_line":"                      original_instance_destroy)"},{"line_number":81,"context_line":""},{"line_number":82,"context_line":"        # Now check the quota again. Until the bug is fixed, quota usage will"},{"line_number":83,"context_line":"        # have been decremented even though we failed to delete the instance."}],"source_content_type":"text/x-python","patch_set":5,"id":"bff0334d_f844a7b9","line":80,"in_reply_to":"bff0334d_f8c14730","updated":"2017-04-05 19:34:55.000000000","message":"Hadn\u0027t even thought of it. I haven\u0027t used the mock start/stop stuff enough to think about it.","commit_id":"032937ce51c64e0f5292ca3149e3b244863fffca"}],"nova/tests/unit/compute/test_compute_api.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"13f758cd2e117321e34cd2cd4e24567d2abaf483","unresolved":false,"context_lines":[{"line_number":1560,"context_line":"    @mock.patch(\u0027nova.context.target_cell\u0027)"},{"line_number":1561,"context_line":"    @mock.patch(\u0027nova.compute.utils.notify_about_instance_delete\u0027)"},{"line_number":1562,"context_line":"    @mock.patch(\u0027nova.objects.Instance.destroy\u0027)"},{"line_number":1563,"context_line":"    @mock.patch(\u0027nova.objects.BlockDeviceMappingList.get_by_instance_uuid\u0027,"},{"line_number":1564,"context_line":"                # This just lets us exit the test early."},{"line_number":1565,"context_line":"                side_effect\u003dtest.TestingException)"},{"line_number":1566,"context_line":"    def test_delete_instance_from_cell0_rollback_quota("},{"line_number":1567,"context_line":"            self, bdms_get_by_instance_uuid, destroy_mock, notify_mock,"},{"line_number":1568,"context_line":"            target_cell_mock):"}],"source_content_type":"text/x-python","patch_set":4,"id":"bff0334d_15acb48a","side":"PARENT","line":1565,"range":{"start_line":1563,"start_character":4,"end_line":1565,"end_character":50},"updated":"2017-04-05 18:56:27.000000000","message":"Rather than remove this, we can turn it into an assert_not_called() to make sure the new return is in place.","commit_id":"88bc8dc5ce32748452c9d3acda9f35e77fedb6ce"}]}
