)]}'
{"nova/compute/manager.py":[{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"503d4ccdc70a9cb500fbc8791ac7cb5f0cd02471","unresolved":false,"context_lines":[{"line_number":959,"context_line":"            return"},{"line_number":960,"context_line":""},{"line_number":961,"context_line":"        if instance.task_state \u003d\u003d task_states.RESIZE_MIGRATING:"},{"line_number":962,"context_line":"            # We crashed during resize/migration, so roll back for safety"},{"line_number":963,"context_line":"            try:"},{"line_number":964,"context_line":"                # NOTE(mriedem): check old_vm_state for STOPPED here, if it\u0027s"},{"line_number":965,"context_line":"                # not in system_metadata we default to True for backwards"},{"line_number":966,"context_line":"                # compatibility"},{"line_number":967,"context_line":"                power_on \u003d (instance.system_metadata.get(\u0027old_vm_state\u0027) !\u003d"},{"line_number":968,"context_line":"                            vm_states.STOPPED)"},{"line_number":969,"context_line":""},{"line_number":970,"context_line":"                block_dev_info \u003d self._get_instance_block_device_info(context,"},{"line_number":971,"context_line":"                                                                      instance)"},{"line_number":972,"context_line":""},{"line_number":973,"context_line":"                self.driver.finish_revert_migration(context,"},{"line_number":974,"context_line":"                    instance, net_info, block_dev_info, power_on)"},{"line_number":975,"context_line":""},{"line_number":976,"context_line":"            except Exception:"},{"line_number":977,"context_line":"                LOG.exception(_LE(\u0027Failed to revert crashed migration\u0027),"},{"line_number":978,"context_line":"                              instance\u003dinstance)"},{"line_number":979,"context_line":"            finally:"},{"line_number":980,"context_line":"                LOG.info(_LI(\u0027Instance found in migrating state during \u0027"},{"line_number":981,"context_line":"                             \u0027startup. Resetting task_state\u0027),"},{"line_number":982,"context_line":"                         instance\u003dinstance)"},{"line_number":983,"context_line":"                instance.task_state \u003d None"},{"line_number":984,"context_line":"                instance.save()"},{"line_number":985,"context_line":"        if instance.task_state \u003d\u003d task_states.MIGRATING:"},{"line_number":986,"context_line":"            # Live migration did not complete, but instance is on this"},{"line_number":987,"context_line":"            # host, so reset the state."}],"source_content_type":"text/x-python","patch_set":3,"id":"fa7ab95a_3f9aa36e","side":"PARENT","line":984,"range":{"start_line":962,"start_character":0,"end_line":984,"end_character":31},"updated":"2016-08-30 08:58:03.000000000","message":"Your pattern is to leave the if blocks behind, I don\u0027t think you should break that pattern here.\n\n_init_instance_pending_resize() might be better name for what you extract here.","commit_id":"1423be58b5e3aa26c85296968146e9d6ed59455a"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"503d4ccdc70a9cb500fbc8791ac7cb5f0cd02471","unresolved":false,"context_lines":[{"line_number":841,"context_line":"            instance.save()"},{"line_number":842,"context_line":""},{"line_number":843,"context_line":"        if instance.task_state \u003d\u003d task_states.DELETING:"},{"line_number":844,"context_line":"            self._resume_delete_instance(context, instance)"},{"line_number":845,"context_line":"            return"},{"line_number":846,"context_line":""},{"line_number":847,"context_line":"        current_power_state \u003d self._get_power_state(context, instance)"}],"source_content_type":"text/x-python","patch_set":3,"id":"fa7ab95a_9f1f2f5a","line":844,"range":{"start_line":844,"start_character":17,"end_line":844,"end_character":40},"updated":"2016-08-30 08:58:03.000000000","message":"_init_instance_deleting seems more descriptive here?\n\nThis don\u0027t resume an instance, it actually completes the delete.","commit_id":"b91c446f47fe702aed72f835845d01f82dd4f64b"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"503d4ccdc70a9cb500fbc8791ac7cb5f0cd02471","unresolved":false,"context_lines":[{"line_number":848,"context_line":"        try_reboot, reboot_type \u003d self._retry_reboot(context, instance,"},{"line_number":849,"context_line":"                                                     current_power_state)"},{"line_number":850,"context_line":"        if try_reboot:"},{"line_number":851,"context_line":"            self._resume_transitional_states(context, instance, try_reboot,"},{"line_number":852,"context_line":"                                             reboot_type, current_power_state)"},{"line_number":853,"context_line":"            return"},{"line_number":854,"context_line":""}],"source_content_type":"text/x-python","patch_set":3,"id":"fa7ab95a_7f642bb8","line":851,"range":{"start_line":851,"start_character":17,"end_line":851,"end_character":44},"updated":"2016-08-30 08:58:03.000000000","message":"Something like _init_instance_retry_reboot would make this clearer for me.","commit_id":"b91c446f47fe702aed72f835845d01f82dd4f64b"},{"author":{"_account_id":24711,"name":"Jackie Truong","email":"jacklyn.truong@jhuapl.edu","username":"jackie-truong"},"change_message_id":"1845fce8d16f763679eb313d5967d70e5d930464","unresolved":false,"context_lines":[{"line_number":841,"context_line":"        try_reboot, reboot_type \u003d self._retry_reboot(context, instance,"},{"line_number":842,"context_line":"                                                     current_power_state)"},{"line_number":843,"context_line":"        if try_reboot:"},{"line_number":844,"context_line":"            self._resume_transitional_states(context, instance, try_reboot,"},{"line_number":845,"context_line":"                                             reboot_type, current_power_state)"},{"line_number":846,"context_line":"            return"},{"line_number":847,"context_line":""},{"line_number":848,"context_line":"        elif (current_power_state \u003d\u003d power_state.RUNNING and"}],"source_content_type":"text/x-python","patch_set":10,"id":"bff0334d_d869bcbe","line":845,"range":{"start_line":844,"start_character":0,"end_line":845,"end_character":78},"updated":"2017-04-06 15:56:46.000000000","message":"I don\u0027t think it makes sense to create a new function to do this work. We\u0027re essentially just logging a debug message and rebooting the instance. If we think that `_init_instance` is too long, it may be worth moving this entire if-elif-elif chunk into a `_handle_transitional_states` method.","commit_id":"26e4de3cdc7b37006051ecc65b8f28bb9901f376"},{"author":{"_account_id":24711,"name":"Jackie Truong","email":"jacklyn.truong@jhuapl.edu","username":"jackie-truong"},"change_message_id":"1845fce8d16f763679eb313d5967d70e5d930464","unresolved":false,"context_lines":[{"line_number":974,"context_line":"                LOG.exception(_LE(\u0027Failed to revert crashed migration\u0027),"},{"line_number":975,"context_line":"                              instance\u003dinstance)"},{"line_number":976,"context_line":"            finally:"},{"line_number":977,"context_line":"                LOG.info(_LI(\u0027Instance found in migrating state during \u0027"},{"line_number":978,"context_line":"                             \u0027startup. Resetting task_state\u0027),"},{"line_number":979,"context_line":"                         instance\u003dinstance)"},{"line_number":980,"context_line":"                instance.task_state \u003d None"},{"line_number":981,"context_line":"                instance.save()"},{"line_number":982,"context_line":"        if instance.task_state \u003d\u003d task_states.MIGRATING:"},{"line_number":983,"context_line":"            # Live migration did not complete, but instance is on this"},{"line_number":984,"context_line":"            # host, so reset the state."},{"line_number":985,"context_line":"            instance.task_state \u003d None"},{"line_number":986,"context_line":"            instance.save(expected_task_state\u003d[task_states.MIGRATING])"},{"line_number":987,"context_line":""},{"line_number":988,"context_line":"    def _resume_transitional_states(self, context, instance,"},{"line_number":989,"context_line":"            try_reboot, reboot_type, current_power_state):"}],"source_content_type":"text/x-python","patch_set":10,"id":"bff0334d_b8915855","line":986,"range":{"start_line":977,"start_character":0,"end_line":986,"end_character":70},"updated":"2017-04-06 15:56:46.000000000","message":"This could be combined, as both chunks of code are doing the same thing. They just save differently, so be sure to account for that.","commit_id":"26e4de3cdc7b37006051ecc65b8f28bb9901f376"},{"author":{"_account_id":24711,"name":"Jackie Truong","email":"jacklyn.truong@jhuapl.edu","username":"jackie-truong"},"change_message_id":"1845fce8d16f763679eb313d5967d70e5d930464","unresolved":false,"context_lines":[{"line_number":986,"context_line":"            instance.save(expected_task_state\u003d[task_states.MIGRATING])"},{"line_number":987,"context_line":""},{"line_number":988,"context_line":"    def _resume_transitional_states(self, context, instance,"},{"line_number":989,"context_line":"            try_reboot, reboot_type, current_power_state):"},{"line_number":990,"context_line":"        LOG.debug(\"Instance in transitional state (%(task_state)s) at \""},{"line_number":991,"context_line":"                  \"start-up and power state is (%(power_state)s), \""},{"line_number":992,"context_line":"                  \"triggering reboot\","}],"source_content_type":"text/x-python","patch_set":10,"id":"bff0334d_b5f5e1cd","line":989,"range":{"start_line":989,"start_character":12,"end_line":989,"end_character":22},"updated":"2017-04-06 15:56:46.000000000","message":"`try_reboot` is never used in this function. Please remove this argument.","commit_id":"26e4de3cdc7b37006051ecc65b8f28bb9901f376"},{"author":{"_account_id":24711,"name":"Jackie Truong","email":"jacklyn.truong@jhuapl.edu","username":"jackie-truong"},"change_message_id":"1845fce8d16f763679eb313d5967d70e5d930464","unresolved":false,"context_lines":[{"line_number":991,"context_line":"                  \"start-up and power state is (%(power_state)s), \""},{"line_number":992,"context_line":"                  \"triggering reboot\","},{"line_number":993,"context_line":"                  {\u0027task_state\u0027: instance.task_state,"},{"line_number":994,"context_line":"                   \u0027power_state\u0027: current_power_state},"},{"line_number":995,"context_line":"                  instance\u003dinstance)"},{"line_number":996,"context_line":""},{"line_number":997,"context_line":"        # NOTE(mikal): if the instance was doing a soft reboot that got as"}],"source_content_type":"text/x-python","patch_set":10,"id":"bff0334d_d5e62517","line":994,"range":{"start_line":994,"start_character":34,"end_line":994,"end_character":53},"updated":"2017-04-06 15:56:46.000000000","message":"`current_power_state` is only used in this logging message. If we move it back up to `_init_instance`, then we won\u0027t need to pass it in as an argument to `_resume_transitional_states`","commit_id":"26e4de3cdc7b37006051ecc65b8f28bb9901f376"},{"author":{"_account_id":24711,"name":"Jackie Truong","email":"jacklyn.truong@jhuapl.edu","username":"jackie-truong"},"change_message_id":"1845fce8d16f763679eb313d5967d70e5d930464","unresolved":false,"context_lines":[{"line_number":1012,"context_line":""},{"line_number":1013,"context_line":"    def _resume_delete_instance(self, context, instance):"},{"line_number":1014,"context_line":"        try:"},{"line_number":1015,"context_line":"            LOG.info(_LI(\u0027Service started deleting the instance during \u0027"},{"line_number":1016,"context_line":"                         \u0027the previous run, but did not finish. Restarting\u0027"},{"line_number":1017,"context_line":"                         \u0027 the deletion now.\u0027), instance\u003dinstance)"},{"line_number":1018,"context_line":"            instance.obj_load_attr(\u0027metadata\u0027)"},{"line_number":1019,"context_line":"            instance.obj_load_attr(\u0027system_metadata\u0027)"},{"line_number":1020,"context_line":"            bdms \u003d objects.BlockDeviceMappingList.get_by_instance_uuid("}],"source_content_type":"text/x-python","patch_set":10,"id":"bff0334d_f5bc896a","line":1017,"range":{"start_line":1015,"start_character":0,"end_line":1017,"end_character":66},"updated":"2017-04-06 15:56:46.000000000","message":"It makes more sense to move this log back up to `_init_instance`, to keep consistent with the way `_init_instance` logs and calls functions.","commit_id":"26e4de3cdc7b37006051ecc65b8f28bb9901f376"},{"author":{"_account_id":18603,"name":"Béla Vancsics","email":"vancsics@inf.u-szeged.hu","username":"vancsics"},"change_message_id":"a96b7ca8f15beb8072e0c160db3cd35a51505f3d","unresolved":false,"context_lines":[{"line_number":969,"context_line":"                        vm_states.STOPPED)"},{"line_number":970,"context_line":""},{"line_number":971,"context_line":"            block_dev_info \u003d self._get_instance_block_device_info("},{"line_number":972,"context_line":"                context,instance)"},{"line_number":973,"context_line":""},{"line_number":974,"context_line":"            self.driver.finish_revert_migration("},{"line_number":975,"context_line":"                context, instance, net_info, block_dev_info, power_on)"}],"source_content_type":"text/x-python","patch_set":11,"id":"3f1d235d_1c2152fc","line":972,"range":{"start_line":972,"start_character":16,"end_line":972,"end_character":33},"updated":"2017-07-11 06:01:21.000000000","message":"Hi!\nMissing whitespace after \u0027,\u0027","commit_id":"edb42e85cac35589053fdcb8acebd5d3fb53935a"},{"author":{"_account_id":6735,"name":"Bob Ball","email":"bob.ball@citrix.com","username":"bob-ball"},"change_message_id":"fa3d58871b16b6f51b4f7b0eae1bc5528427f5c7","unresolved":false,"context_lines":[{"line_number":829,"context_line":"            instance.save()"},{"line_number":830,"context_line":""},{"line_number":831,"context_line":"        if instance.task_state \u003d\u003d task_states.DELETING:"},{"line_number":832,"context_line":"            self._init_instasnce_deleting(context, instance)"},{"line_number":833,"context_line":"            return"},{"line_number":834,"context_line":""},{"line_number":835,"context_line":"        current_power_state \u003d self._get_power_state(context, instance)"}],"source_content_type":"text/x-python","patch_set":12,"id":"1f1a1f67_5f8ce3d5","line":832,"updated":"2017-07-18 16:27:48.000000000","message":"Typo - init_instance_deleting","commit_id":"e512e262cfdb186b68e1349de61c02171bc7116a"},{"author":{"_account_id":6735,"name":"Bob Ball","email":"bob.ball@citrix.com","username":"bob-ball"},"change_message_id":"fa3d58871b16b6f51b4f7b0eae1bc5528427f5c7","unresolved":false,"context_lines":[{"line_number":837,"context_line":"                                                     current_power_state)"},{"line_number":838,"context_line":""},{"line_number":839,"context_line":"        if try_reboot:"},{"line_number":840,"context_line":"            LOG.debug(\"Instance in transitional state (%(task_state)s) at \""},{"line_number":841,"context_line":"                      \"start-up and power state is (%(power_state)s), \""},{"line_number":842,"context_line":"                      \"triggering reboot\","},{"line_number":843,"context_line":"                      {\u0027task_state\u0027: instance.task_state,"},{"line_number":844,"context_line":"                       \u0027power_state\u0027: current_power_state},"},{"line_number":845,"context_line":"                      instance\u003dinstance)"},{"line_number":846,"context_line":"            self._init_instance_retry_reboot(context, instance, reboot_type)"},{"line_number":847,"context_line":"            return"},{"line_number":848,"context_line":""}],"source_content_type":"text/x-python","patch_set":12,"id":"1f1a1f67_df6eb3fe","line":845,"range":{"start_line":840,"start_character":0,"end_line":845,"end_character":40},"updated":"2017-07-18 16:27:48.000000000","message":"Move to helper?","commit_id":"e512e262cfdb186b68e1349de61c02171bc7116a"},{"author":{"_account_id":6735,"name":"Bob Ball","email":"bob.ball@citrix.com","username":"bob-ball"},"change_message_id":"fa3d58871b16b6f51b4f7b0eae1bc5528427f5c7","unresolved":false,"context_lines":[{"line_number":1001,"context_line":"        self.reboot_instance(context, instance, block_device_info\u003dNone,"},{"line_number":1002,"context_line":"                             reboot_type\u003dreboot_type)"},{"line_number":1003,"context_line":""},{"line_number":1004,"context_line":"    def _init_instasnce_deleting(self, context, instance):"},{"line_number":1005,"context_line":"        try:"},{"line_number":1006,"context_line":"            LOG.info(\u0027Service started deleting the instance during \u0027"},{"line_number":1007,"context_line":"                     \u0027the previous run, but did not finish. Restarting\u0027"}],"source_content_type":"text/x-python","patch_set":12,"id":"1f1a1f67_dfb91379","line":1004,"range":{"start_line":1004,"start_character":8,"end_line":1004,"end_character":32},"updated":"2017-07-18 16:27:48.000000000","message":"Other half of typo","commit_id":"e512e262cfdb186b68e1349de61c02171bc7116a"}]}
