)]}'
{"nova/compute/manager.py":[{"author":{"_account_id":25562,"name":"Chen","email":"dstbtgagt@foxmail.com","username":"chenn2"},"change_message_id":"1eabda764bbb27136d59a9babfc113de94ffc2f6","unresolved":false,"context_lines":[{"line_number":3036,"context_line":"                rt.delete_allocation_for_evacuated_instance("},{"line_number":3037,"context_line":"                    context, instance, scheduled_node, node_type\u003d\u0027destination\u0027)"},{"line_number":3038,"context_line":"                self._notify_instance_rebuild_error(context, instance, e, bdms)"},{"line_number":3039,"context_line":"                raise exception.BuildAbortException("},{"line_number":3040,"context_line":"                    instance_uuid\u003dinstance.uuid, reason\u003de.format_message())"},{"line_number":3041,"context_line":"            except (exception.InstanceNotFound,"},{"line_number":3042,"context_line":"                    exception.UnexpectedDeletingTaskStateError) as e:"},{"line_number":3043,"context_line":"                LOG.debug(\u0027Instance was deleted while rebuilding\u0027,"}],"source_content_type":"text/x-python","patch_set":2,"id":"3f79a3b5_9a098232","side":"PARENT","line":3040,"range":{"start_line":3039,"start_character":16,"end_line":3040,"end_character":75},"updated":"2018-09-17 13:31:40.000000000","message":"Or we can just add an if else block here and raise according the class of e, to make the change more clear.","commit_id":"61f854ff6445dd7bc797fdde7361e47f3dc3b1bd"},{"author":{"_account_id":9610,"name":"Tao Li","email":"litao3721@126.com","username":"Litao"},"change_message_id":"40fdbf4a1b9f4eb534eea29325f3d017939e9300","unresolved":false,"context_lines":[{"line_number":3036,"context_line":"                rt.delete_allocation_for_evacuated_instance("},{"line_number":3037,"context_line":"                    context, instance, scheduled_node, node_type\u003d\u0027destination\u0027)"},{"line_number":3038,"context_line":"                self._notify_instance_rebuild_error(context, instance, e, bdms)"},{"line_number":3039,"context_line":"                raise exception.BuildAbortException("},{"line_number":3040,"context_line":"                    instance_uuid\u003dinstance.uuid, reason\u003de.format_message())"},{"line_number":3041,"context_line":"            except (exception.InstanceNotFound,"},{"line_number":3042,"context_line":"                    exception.UnexpectedDeletingTaskStateError) as e:"},{"line_number":3043,"context_line":"                LOG.debug(\u0027Instance was deleted while rebuilding\u0027,"}],"source_content_type":"text/x-python","patch_set":2,"id":"3f79a3b5_461c1712","side":"PARENT","line":3040,"range":{"start_line":3039,"start_character":16,"end_line":3040,"end_character":75},"in_reply_to":"3f79a3b5_665593c1","updated":"2018-09-21 06:15:29.000000000","message":"I think more, we can use another if else block","commit_id":"61f854ff6445dd7bc797fdde7361e47f3dc3b1bd"},{"author":{"_account_id":9610,"name":"Tao Li","email":"litao3721@126.com","username":"Litao"},"change_message_id":"e63bfdfea603cf324908f9f4750a3970fb56b6af","unresolved":false,"context_lines":[{"line_number":3036,"context_line":"                rt.delete_allocation_for_evacuated_instance("},{"line_number":3037,"context_line":"                    context, instance, scheduled_node, node_type\u003d\u0027destination\u0027)"},{"line_number":3038,"context_line":"                self._notify_instance_rebuild_error(context, instance, e, bdms)"},{"line_number":3039,"context_line":"                raise exception.BuildAbortException("},{"line_number":3040,"context_line":"                    instance_uuid\u003dinstance.uuid, reason\u003de.format_message())"},{"line_number":3041,"context_line":"            except (exception.InstanceNotFound,"},{"line_number":3042,"context_line":"                    exception.UnexpectedDeletingTaskStateError) as e:"},{"line_number":3043,"context_line":"                LOG.debug(\u0027Instance was deleted while rebuilding\u0027,"}],"source_content_type":"text/x-python","patch_set":2,"id":"3f79a3b5_665593c1","side":"PARENT","line":3040,"range":{"start_line":3039,"start_character":16,"end_line":3040,"end_character":75},"in_reply_to":"3f79a3b5_9a098232","updated":"2018-09-21 06:06:44.000000000","message":"I think we can use the existing if else block to assign the raised exception.","commit_id":"61f854ff6445dd7bc797fdde7361e47f3dc3b1bd"},{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"c8f65af081274be4509be8b29f3b13b600dd10b0","unresolved":false,"context_lines":[{"line_number":3013,"context_line":"                    migration, request_spec)"},{"line_number":3014,"context_line":"            except (exception.ComputeResourcesUnavailable,"},{"line_number":3015,"context_line":"                    exception.RescheduledException) as e:"},{"line_number":3016,"context_line":"                raised_exception \u003d exception.BuildAbortException("},{"line_number":3017,"context_line":"                    instance_uuid\u003dinstance.uuid, reason\u003de.format_message())"},{"line_number":3018,"context_line":"                if isinstance(e, exception.ComputeResourcesUnavailable):"},{"line_number":3019,"context_line":"                    LOG.debug(\"Could not rebuild instance on this host, not \""},{"line_number":3020,"context_line":"                              \"enough resources available.\", instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":2,"id":"3f79a3b5_09c94857","line":3017,"range":{"start_line":3016,"start_character":16,"end_line":3017,"end_character":75},"updated":"2018-08-16 09:14:04.000000000","message":"Does this change different to previous logic?","commit_id":"7df0b047dc1ef73d137db4ac9309bbcad4247b63"},{"author":{"_account_id":9610,"name":"Tao Li","email":"litao3721@126.com","username":"Litao"},"change_message_id":"86ff0fa3e06037f1a3a843c35717c5e0e240eb82","unresolved":false,"context_lines":[{"line_number":3013,"context_line":"                    migration, request_spec)"},{"line_number":3014,"context_line":"            except (exception.ComputeResourcesUnavailable,"},{"line_number":3015,"context_line":"                    exception.RescheduledException) as e:"},{"line_number":3016,"context_line":"                raised_exception \u003d exception.BuildAbortException("},{"line_number":3017,"context_line":"                    instance_uuid\u003dinstance.uuid, reason\u003de.format_message())"},{"line_number":3018,"context_line":"                if isinstance(e, exception.ComputeResourcesUnavailable):"},{"line_number":3019,"context_line":"                    LOG.debug(\"Could not rebuild instance on this host, not \""},{"line_number":3020,"context_line":"                              \"enough resources available.\", instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":2,"id":"3f79a3b5_4a207c9c","line":3017,"range":{"start_line":3016,"start_character":16,"end_line":3017,"end_character":75},"in_reply_to":"3f79a3b5_09c94857","updated":"2018-08-17 00:53:30.000000000","message":"This difference between this change and original is that it raises ComputeResourcesUnavailable other than BuildAbortException when catching ComputeResourcesUnavailable exception, and this is the place that the patch will fix.","commit_id":"7df0b047dc1ef73d137db4ac9309bbcad4247b63"},{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"c8f65af081274be4509be8b29f3b13b600dd10b0","unresolved":false,"context_lines":[{"line_number":7896,"context_line":"        return (not deleted_at or timeutils.is_older_than(deleted_at, timeout))"},{"line_number":7897,"context_line":""},{"line_number":7898,"context_line":"    @contextlib.contextmanager"},{"line_number":7899,"context_line":"    def _error_out_instance_on_exception(self, context, instance,"},{"line_number":7900,"context_line":"                                         instance_state\u003dvm_states.ACTIVE):"},{"line_number":7901,"context_line":"        instance_uuid \u003d instance.uuid"},{"line_number":7902,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":2,"id":"3f79a3b5_8930f857","line":7899,"range":{"start_line":7899,"start_character":8,"end_line":7899,"end_character":40},"updated":"2018-08-16 09:14:04.000000000","message":"this function is widely used, are we sure \nthe exception we adds will fit for all scenario ?","commit_id":"7df0b047dc1ef73d137db4ac9309bbcad4247b63"},{"author":{"_account_id":9610,"name":"Tao Li","email":"litao3721@126.com","username":"Litao"},"change_message_id":"86ff0fa3e06037f1a3a843c35717c5e0e240eb82","unresolved":false,"context_lines":[{"line_number":7896,"context_line":"        return (not deleted_at or timeutils.is_older_than(deleted_at, timeout))"},{"line_number":7897,"context_line":""},{"line_number":7898,"context_line":"    @contextlib.contextmanager"},{"line_number":7899,"context_line":"    def _error_out_instance_on_exception(self, context, instance,"},{"line_number":7900,"context_line":"                                         instance_state\u003dvm_states.ACTIVE):"},{"line_number":7901,"context_line":"        instance_uuid \u003d instance.uuid"},{"line_number":7902,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":2,"id":"3f79a3b5_ea45c844","line":7899,"range":{"start_line":7899,"start_character":8,"end_line":7899,"end_character":40},"in_reply_to":"3f79a3b5_8930f857","updated":"2018-08-17 00:53:30.000000000","message":"Currently, ComputeResourcesUnavailable will be raised in claim operations,such as rebuild_claim, resize_claim, instance_claim. When the exception is raised，nova just check that whether there are enough resources, and doesn\u0027t do actually operations in hypervisor, so I think we can ignore this exception and rollback instance to its original vm_state.","commit_id":"7df0b047dc1ef73d137db4ac9309bbcad4247b63"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"04d6f82375ee401d821b26b10a3cd9a268ea5f27","unresolved":false,"context_lines":[{"line_number":2887,"context_line":"        if evacuate:"},{"line_number":2888,"context_line":"            detach_block_devices(context, bdms)"},{"line_number":2889,"context_line":"        else:"},{"line_number":2890,"context_line":"            self._power_off_instance(context, instance, clean_shutdown\u003dTrue)"},{"line_number":2891,"context_line":"            detach_block_devices(context, bdms)"},{"line_number":2892,"context_line":"            self.driver.destroy(context, instance,"},{"line_number":2893,"context_line":"                                network_info\u003dnetwork_info,"}],"source_content_type":"text/x-python","patch_set":13,"id":"3fa7e38b_b699b71f","line":2890,"updated":"2019-10-30 16:00:01.000000000","message":"Here also, if we get far enough to stop an ACTIVE instance and then spawn below fails, reverting the status to ACTIVE is wrong since the guest would be STOPPED.\n\nGiven how broad rebuild can fail it\u0027s likely best to just let the instance go to ERROR status. The only way to probably use the errors_out_instance_on_exception context manager properly with rebuild is marking which exceptions can rollback the status using InstanceFaultRollback exceptions, like in _prep_resize.","commit_id":"57abb1084ffd6d3891dcf837f7ce046eb800ffdc"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"04d6f82375ee401d821b26b10a3cd9a268ea5f27","unresolved":false,"context_lines":[{"line_number":3008,"context_line":"                scheduled_node \u003d instance.node"},{"line_number":3009,"context_line":""},{"line_number":3010,"context_line":"        with self._error_out_instance_on_exception(context, instance,"},{"line_number":3011,"context_line":"                                                   instance.vm_state):"},{"line_number":3012,"context_line":"            try:"},{"line_number":3013,"context_line":"                claim_ctxt \u003d rebuild_claim("},{"line_number":3014,"context_line":"                    context, instance, scheduled_node,"}],"source_content_type":"text/x-python","patch_set":13,"id":"3fa7e38b_56cc0333","line":3011,"updated":"2019-10-30 16:00:01.000000000","message":"This may not be correct in all cases. For example, let\u0027s say the instance is ACTIVE when you start the rebuild and we got far enough to destroy it but then spawn failed. It would be incorrect to mark it as ACTIVE again if the guest is dead.","commit_id":"57abb1084ffd6d3891dcf837f7ce046eb800ffdc"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"5c14cdc63501f4778f9889e3e46d6d69fa0159c8","unresolved":false,"context_lines":[{"line_number":3048,"context_line":"                if isinstance(e, exception.ComputeResourcesUnavailable):"},{"line_number":3049,"context_line":"                    raise e"},{"line_number":3050,"context_line":"                else:"},{"line_number":3051,"context_line":"                    raise exception.BuildAbortException("},{"line_number":3052,"context_line":"                        instance_uuid\u003dinstance.uuid, reason\u003de.format_message())"},{"line_number":3053,"context_line":"            except (exception.InstanceNotFound,"},{"line_number":3054,"context_line":"                    exception.UnexpectedDeletingTaskStateError) as e:"},{"line_number":3055,"context_line":"                LOG.debug(\u0027Instance was deleted while rebuilding\u0027,"}],"source_content_type":"text/x-python","patch_set":13,"id":"3f79a3b5_c1efe783","line":3052,"range":{"start_line":3051,"start_character":18,"end_line":3052,"end_character":79},"updated":"2018-11-08 02:53:59.000000000","message":"If it is a RescheduleException, but you conver to a BuildAbortException?","commit_id":"57abb1084ffd6d3891dcf837f7ce046eb800ffdc"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"04d6f82375ee401d821b26b10a3cd9a268ea5f27","unresolved":false,"context_lines":[{"line_number":4214,"context_line":"            node \u003d self._get_nodename(instance, refresh\u003dTrue)"},{"line_number":4215,"context_line":""},{"line_number":4216,"context_line":"        with self._error_out_instance_on_exception("},{"line_number":4217,"context_line":"                context, instance, instance.vm_state), \\"},{"line_number":4218,"context_line":"             errors_out_migration_ctxt(migration):"},{"line_number":4219,"context_line":"            compute_utils.notify_usage_exists(self.notifier, context, instance,"},{"line_number":4220,"context_line":"                                              self.host, current_period\u003dTrue)"}],"source_content_type":"text/x-python","patch_set":13,"id":"3fa7e38b_96611b3c","line":4217,"updated":"2019-10-30 16:00:01.000000000","message":"This is already fixed:\n\nI17543ecb572934ecc7d0bbc7a4ad2f537fa499bc","commit_id":"57abb1084ffd6d3891dcf837f7ce046eb800ffdc"}],"nova/tests/functional/test_servers.py":[{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"59fb88af84a92fc68134631ea491658a102901b8","unresolved":false,"context_lines":[{"line_number":2685,"context_line":"            # evacuate the server"},{"line_number":2686,"context_line":"            self.api.post_server_action(server[\u0027id\u0027], {\u0027evacuate\u0027: {}})"},{"line_number":2687,"context_line":"            # the migration will fail on the dest node and the instance will"},{"line_number":2688,"context_line":"            # go into error state"},{"line_number":2689,"context_line":"            server \u003d self._wait_for_state_change(self.api, server, \u0027ACTIVE\u0027)"},{"line_number":2690,"context_line":""},{"line_number":2691,"context_line":"        # Run the periodics to show those don\u0027t modify allocations."}],"source_content_type":"text/x-python","patch_set":10,"id":"3f79a3b5_8b82e1c6","line":2688,"range":{"start_line":2688,"start_character":14,"end_line":2688,"end_character":33},"updated":"2018-09-26 08:45:29.000000000","message":"this should also be changed","commit_id":"34f18d908851d28c9703ff04c4f5f1e67a983f0d"},{"author":{"_account_id":9610,"name":"Tao Li","email":"litao3721@126.com","username":"Litao"},"change_message_id":"2799da64a393b632dc92510d82511f49d4af887a","unresolved":false,"context_lines":[{"line_number":2685,"context_line":"            # evacuate the server"},{"line_number":2686,"context_line":"            self.api.post_server_action(server[\u0027id\u0027], {\u0027evacuate\u0027: {}})"},{"line_number":2687,"context_line":"            # the migration will fail on the dest node and the instance will"},{"line_number":2688,"context_line":"            # go into error state"},{"line_number":2689,"context_line":"            server \u003d self._wait_for_state_change(self.api, server, \u0027ACTIVE\u0027)"},{"line_number":2690,"context_line":""},{"line_number":2691,"context_line":"        # Run the periodics to show those don\u0027t modify allocations."}],"source_content_type":"text/x-python","patch_set":10,"id":"3f79a3b5_5f59cafa","line":2688,"range":{"start_line":2688,"start_character":14,"end_line":2688,"end_character":33},"in_reply_to":"3f79a3b5_8b82e1c6","updated":"2018-09-27 06:06:53.000000000","message":"Sure, thanks","commit_id":"34f18d908851d28c9703ff04c4f5f1e67a983f0d"}],"nova/tests/unit/compute/test_compute_mgr.py":[{"author":{"_account_id":27621,"name":"Vishakha Agarwal","email":"agarwalvishakha18@gmail.com","username":"Vishakha"},"change_message_id":"46ac1ef77861008f511b4487d579005263acc3fe","unresolved":false,"context_lines":[{"line_number":3930,"context_line":"            self.context, instance,"},{"line_number":3931,"context_line":"            vm_state\u003dvm_states.ACTIVE, task_state\u003dNone)"},{"line_number":3932,"context_line":""},{"line_number":3933,"context_line":"    @mock.patch(\u0027nova.compute.manager.ComputeManager._instance_update\u0027)"},{"line_number":3934,"context_line":"    def test_error_out_instance_on_exception_inst_fault_rollback(self,"},{"line_number":3935,"context_line":"                                                        inst_update_mock):"},{"line_number":3936,"context_line":"        instance \u003d fake_instance.fake_instance_obj(self.context)"}],"source_content_type":"text/x-python","patch_set":1,"id":"3f79a3b5_36fee26a","line":3933,"updated":"2018-08-16 06:01:51.000000000","message":"Same function as in L3917.","commit_id":"08f74a5f08fd7c9110cb2cabbba206bed60830c4"},{"author":{"_account_id":9610,"name":"Tao Li","email":"litao3721@126.com","username":"Litao"},"change_message_id":"764fe900a263258c203e75c56a17cc15bcd44d98","unresolved":false,"context_lines":[{"line_number":3930,"context_line":"            self.context, instance,"},{"line_number":3931,"context_line":"            vm_state\u003dvm_states.ACTIVE, task_state\u003dNone)"},{"line_number":3932,"context_line":""},{"line_number":3933,"context_line":"    @mock.patch(\u0027nova.compute.manager.ComputeManager._instance_update\u0027)"},{"line_number":3934,"context_line":"    def test_error_out_instance_on_exception_inst_fault_rollback(self,"},{"line_number":3935,"context_line":"                                                        inst_update_mock):"},{"line_number":3936,"context_line":"        instance \u003d fake_instance.fake_instance_obj(self.context)"}],"source_content_type":"text/x-python","patch_set":1,"id":"3f79a3b5_7191c446","line":3933,"in_reply_to":"3f79a3b5_36fee26a","updated":"2018-08-16 07:04:21.000000000","message":"Thanks, I will fix it.","commit_id":"08f74a5f08fd7c9110cb2cabbba206bed60830c4"}]}
