)]}'
{"nova/compute/manager.py":[{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"b38a48456fb24fb7b6a082ad388369fcad6c814e","unresolved":false,"context_lines":[{"line_number":1052,"context_line":"            # of the expected task states for a hard reboot."},{"line_number":1053,"context_line":"            soft_types \u003d [task_states.REBOOT_STARTED,"},{"line_number":1054,"context_line":"                          task_states.REBOOT_PENDING,"},{"line_number":1055,"context_line":"                          task_states.REBOOTING]"},{"line_number":1056,"context_line":"            if instance.task_state in soft_types and reboot_type \u003d\u003d \u0027HARD\u0027:"},{"line_number":1057,"context_line":"                instance.task_state \u003d task_states.REBOOT_PENDING_HARD"},{"line_number":1058,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"da20952f_fde1a8d0","line":1055,"updated":"2015-09-08 07:02:31.000000000","message":"It will be better we put this into task_states.py like this https://github.com/openstack/nova/blob/master/nova/compute/vm_states.py#L50\n\nMaybe call it as SOFT_REBOOT_STATES, then we can use it in line 2823 also.\n\nAlso we can share something with https://github.com/openstack/nova/blob/master/nova/compute/utils.py#L395\n\nBut this can be done later","commit_id":"22d9e3d2ae7a36ef28ee3b539210e3362f486724"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"707bc4b99bc155c21ebf37ecfe4fe09abfe92f65","unresolved":false,"context_lines":[{"line_number":1052,"context_line":"            # of the expected task states for a hard reboot."},{"line_number":1053,"context_line":"            soft_types \u003d [task_states.REBOOT_STARTED,"},{"line_number":1054,"context_line":"                          task_states.REBOOT_PENDING,"},{"line_number":1055,"context_line":"                          task_states.REBOOTING]"},{"line_number":1056,"context_line":"            if instance.task_state in soft_types and reboot_type \u003d\u003d \u0027HARD\u0027:"},{"line_number":1057,"context_line":"                instance.task_state \u003d task_states.REBOOT_PENDING_HARD"},{"line_number":1058,"context_line":""}],"source_content_type":"text/x-python","patch_set":1,"id":"da20952f_583c62c7","line":1055,"in_reply_to":"da20952f_fde1a8d0","updated":"2015-09-08 07:03:16.000000000","message":"oops, just saw you already did this in next patch.","commit_id":"22d9e3d2ae7a36ef28ee3b539210e3362f486724"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"079346faf117f929a4fe2a709ac1d2ad1a5a4006","unresolved":false,"context_lines":[{"line_number":1054,"context_line":"                          task_states.REBOOT_PENDING,"},{"line_number":1055,"context_line":"                          task_states.REBOOTING]"},{"line_number":1056,"context_line":"            if instance.task_state in soft_types and reboot_type \u003d\u003d \u0027HARD\u0027:"},{"line_number":1057,"context_line":"                instance.task_state \u003d task_states.REBOOT_PENDING_HARD"},{"line_number":1058,"context_line":""},{"line_number":1059,"context_line":"            self.reboot_instance(context, instance, block_device_info\u003dNone,"},{"line_number":1060,"context_line":"                                 reboot_type\u003dreboot_type)"}],"source_content_type":"text/x-python","patch_set":1,"id":"da20952f_3ea1cd46","line":1057,"updated":"2015-09-03 21:14:24.000000000","message":"It seems this isn\u0027t needed since reboot_instance will set it if reboot_type \u003d\u003d \u0027HARD\" right?","commit_id":"22d9e3d2ae7a36ef28ee3b539210e3362f486724"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"85e6c422d13489adca08d0fd3dbdcc1cfc0390d8","unresolved":false,"context_lines":[{"line_number":1054,"context_line":"                          task_states.REBOOT_PENDING,"},{"line_number":1055,"context_line":"                          task_states.REBOOTING]"},{"line_number":1056,"context_line":"            if instance.task_state in soft_types and reboot_type \u003d\u003d \u0027HARD\u0027:"},{"line_number":1057,"context_line":"                instance.task_state \u003d task_states.REBOOT_PENDING_HARD"},{"line_number":1058,"context_line":""},{"line_number":1059,"context_line":"            self.reboot_instance(context, instance, block_device_info\u003dNone,"},{"line_number":1060,"context_line":"                                 reboot_type\u003dreboot_type)"}],"source_content_type":"text/x-python","patch_set":1,"id":"da20952f_181c2165","line":1057,"in_reply_to":"da20952f_35a24bfd","updated":"2015-09-11 00:08:20.000000000","message":"But if reboot_type !\u003d \u0027SOFT\u0027 in reboot_instance below, L2827 sets instance.task_state \u003d task_states.REBOOT_PENDING_HARD, so I don\u0027t see why this was necessary.","commit_id":"22d9e3d2ae7a36ef28ee3b539210e3362f486724"},{"author":{"_account_id":2271,"name":"Michael Still","email":"mikal@stillhq.com","username":"mikalstill"},"change_message_id":"9009dd92414025711e646d976af6ac37a1c72633","unresolved":false,"context_lines":[{"line_number":1054,"context_line":"                          task_states.REBOOT_PENDING,"},{"line_number":1055,"context_line":"                          task_states.REBOOTING]"},{"line_number":1056,"context_line":"            if instance.task_state in soft_types and reboot_type \u003d\u003d \u0027HARD\u0027:"},{"line_number":1057,"context_line":"                instance.task_state \u003d task_states.REBOOT_PENDING_HARD"},{"line_number":1058,"context_line":""},{"line_number":1059,"context_line":"            self.reboot_instance(context, instance, block_device_info\u003dNone,"},{"line_number":1060,"context_line":"                                 reboot_type\u003dreboot_type)"}],"source_content_type":"text/x-python","patch_set":1,"id":"da20952f_35a24bfd","line":1057,"in_reply_to":"da20952f_3ea1cd46","updated":"2015-09-03 21:49:03.000000000","message":"The expected task states for a hard reboot don\u0027t match the task states an instance with a failed soft reboot will be in. So we change the task_state to one that the reboot code is expecting.","commit_id":"22d9e3d2ae7a36ef28ee3b539210e3362f486724"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"079346faf117f929a4fe2a709ac1d2ad1a5a4006","unresolved":false,"context_lines":[{"line_number":2819,"context_line":"        \"\"\"Reboot an instance on this host.\"\"\""},{"line_number":2820,"context_line":"        # acknowledge the request made it to the manager"},{"line_number":2821,"context_line":"        if reboot_type \u003d\u003d \"SOFT\":"},{"line_number":2822,"context_line":"            instance.task_state \u003d task_states.REBOOT_PENDING"},{"line_number":2823,"context_line":"            expected_states \u003d (task_states.REBOOTING,"},{"line_number":2824,"context_line":"                               task_states.REBOOT_PENDING,"},{"line_number":2825,"context_line":"                               task_states.REBOOT_STARTED)"}],"source_content_type":"text/x-python","patch_set":1,"id":"da20952f_3eea2d75","line":2822,"updated":"2015-09-03 21:14:24.000000000","message":"You could get some extra points by pulling this into a common variable that can be used here and above.","commit_id":"22d9e3d2ae7a36ef28ee3b539210e3362f486724"},{"author":{"_account_id":2271,"name":"Michael Still","email":"mikal@stillhq.com","username":"mikalstill"},"change_message_id":"9009dd92414025711e646d976af6ac37a1c72633","unresolved":false,"context_lines":[{"line_number":2819,"context_line":"        \"\"\"Reboot an instance on this host.\"\"\""},{"line_number":2820,"context_line":"        # acknowledge the request made it to the manager"},{"line_number":2821,"context_line":"        if reboot_type \u003d\u003d \"SOFT\":"},{"line_number":2822,"context_line":"            instance.task_state \u003d task_states.REBOOT_PENDING"},{"line_number":2823,"context_line":"            expected_states \u003d (task_states.REBOOTING,"},{"line_number":2824,"context_line":"                               task_states.REBOOT_PENDING,"},{"line_number":2825,"context_line":"                               task_states.REBOOT_STARTED)"}],"source_content_type":"text/x-python","patch_set":1,"id":"da20952f_f5de136c","line":2822,"in_reply_to":"da20952f_3eea2d75","updated":"2015-09-03 21:49:03.000000000","message":"Do you mean the list of states below this line? I\u0027m not sure I grok how line 2822 benefits from a common variable?","commit_id":"22d9e3d2ae7a36ef28ee3b539210e3362f486724"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"69c08f87db265d797c87503ecbd2baee222e9fc9","unresolved":false,"context_lines":[{"line_number":2824,"context_line":"                               task_states.REBOOT_PENDING,"},{"line_number":2825,"context_line":"                               task_states.REBOOT_STARTED)"},{"line_number":2826,"context_line":"        else:"},{"line_number":2827,"context_line":"            instance.task_state \u003d task_states.REBOOT_PENDING_HARD"},{"line_number":2828,"context_line":"            expected_states \u003d (task_states.REBOOTING_HARD,"},{"line_number":2829,"context_line":"                               task_states.REBOOT_PENDING_HARD,"},{"line_number":2830,"context_line":"                               task_states.REBOOT_STARTED_HARD)"}],"source_content_type":"text/x-python","patch_set":1,"id":"ba15a1d1_085148d8","line":2827,"updated":"2015-09-22 17:08:02.000000000","message":"oh, because of this, yeah, you don\u0027t need line 1057, I see that now :(","commit_id":"22d9e3d2ae7a36ef28ee3b539210e3362f486724"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"5a1177895b9446bb777c5150b2fd746407a9b2ef","unresolved":false,"context_lines":[{"line_number":2838,"context_line":""},{"line_number":2839,"context_line":"        self._notify_about_instance_usage(context, instance, \"reboot.start\")"},{"line_number":2840,"context_line":""},{"line_number":2841,"context_line":"        instance.power_state \u003d self._get_power_state(context, instance)"},{"line_number":2842,"context_line":"        instance.save(expected_task_state\u003dexpected_states)"},{"line_number":2843,"context_line":""},{"line_number":2844,"context_line":"        if instance.power_state !\u003d power_state.RUNNING:"}],"source_content_type":"text/x-python","patch_set":1,"id":"da20952f_d872297c","line":2841,"updated":"2015-09-11 00:19:43.000000000","message":"I don\u0027t actually see how we\u0027d ever get an UnexpectedTaskStateError here given the instance.task_state is set above and regardless of soft or hard, the task_state that is set on the instance is in the list of expected_task_states.\n\nAdded here: cc0be157d005c5588fe5db779fc30fefbf22b44d","commit_id":"22d9e3d2ae7a36ef28ee3b539210e3362f486724"}]}
