)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"ea50e244c4eaa6ecf23f6d93ff3c68d433f8e275","unresolved":false,"context_lines":[{"line_number":9,"context_line":"Give following scenario for instance task state"},{"line_number":10,"context_line":"1) start to pause an active instance"},{"line_number":11,"context_line":"2) the nova-compute died because of unexpected situation"},{"line_number":12,"context_line":"3) when nova-compute start again , it\u0027s task state is pausing"},{"line_number":13,"context_line":"it should be changed to None because host restarted"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Also ,for the paused instance and its state is unpausing,"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":24,"id":"5a890539_52291636","line":12,"updated":"2014-12-01 18:48:25.000000000","message":"s/start again , it\u0027s task/starts again, its task/","commit_id":"76fc08e52dfe92b90c8ad47aee25b9d1d34f1cee"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"ea50e244c4eaa6ecf23f6d93ff3c68d433f8e275","unresolved":false,"context_lines":[{"line_number":12,"context_line":"3) when nova-compute start again , it\u0027s task state is pausing"},{"line_number":13,"context_line":"it should be changed to None because host restarted"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Also ,for the paused instance and its state is unpausing,"},{"line_number":16,"context_line":"we need to unpase the instance."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Change-Id: If72a36dafd894ac47c0b255d701a3f9965ff2590"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":24,"id":"5a890539_721ff209","line":15,"updated":"2014-12-01 18:48:25.000000000","message":"s/Also ,for/Also, when/","commit_id":"76fc08e52dfe92b90c8ad47aee25b9d1d34f1cee"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"ea50e244c4eaa6ecf23f6d93ff3c68d433f8e275","unresolved":false,"context_lines":[{"line_number":13,"context_line":"it should be changed to None because host restarted"},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Also ,for the paused instance and its state is unpausing,"},{"line_number":16,"context_line":"we need to unpase the instance."},{"line_number":17,"context_line":""},{"line_number":18,"context_line":"Change-Id: If72a36dafd894ac47c0b255d701a3f9965ff2590"},{"line_number":19,"context_line":"Closes-Bug: #1290639"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":24,"id":"5a890539_921a9e16","line":16,"updated":"2014-12-01 18:48:25.000000000","message":"s/unpase/unpause/","commit_id":"76fc08e52dfe92b90c8ad47aee25b9d1d34f1cee"}],"nova/compute/manager.py":[{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"26096e1054d96fabdfb5be276e3647cc1ed03020","unresolved":false,"context_lines":[{"line_number":978,"context_line":"                LOG.warning(_(\u0027Hypervisor driver does not support \u0027"},{"line_number":979,"context_line":"                              \u0027firewall rules\u0027), instance\u003dinstance)"},{"line_number":980,"context_line":""},{"line_number":981,"context_line":"            if instance.task_state \u003d\u003d task_states.PAUSING:"},{"line_number":982,"context_line":"                LOG.info(_(\u0027Instance found in running state during \u0027"},{"line_number":983,"context_line":"                           \u0027startup. Resetting task_state\u0027),"},{"line_number":984,"context_line":"                           instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":6,"id":"7adec928_46b05bf4","line":981,"updated":"2014-05-13 21:13:48.000000000","message":"any chance of having a utility function. say for example, you could pass the log message as input and then set the task state to None","commit_id":"d6d0adaf9f9db8283d6ce60bfacf21c389a10214"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"f02b418e534f269fccb530bd18c61c7b22d7b8dd","unresolved":false,"context_lines":[{"line_number":950,"context_line":"                  {\u0027drv_state\u0027: drv_state, \u0027db_state\u0027: db_state},"},{"line_number":951,"context_line":"                  instance\u003dinstance)"},{"line_number":952,"context_line":""},{"line_number":953,"context_line":"        def save_state_and_log(instance, msg):"},{"line_number":954,"context_line":"            LOG.info(msg, instance\u003dinstance)"},{"line_number":955,"context_line":"            instance.task_state \u003d None"},{"line_number":956,"context_line":"            instance.save()"}],"source_content_type":"text/x-python","patch_set":7,"id":"7adec928_d2309fa0","line":953,"updated":"2014-05-14 15:03:19.000000000","message":"A few comments:\n1. Can you please prefix this with _ as it is an internal method\n2. would it be better to have this as a internal method and not a nested method. then it can also be tested individually.","commit_id":"77a136c6466a73f567e09a55d8b96ef94c3d5027"},{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"38a9f34f5fb30d73ab8e7dd5049c8b925fc57a29","unresolved":false,"context_lines":[{"line_number":950,"context_line":"                  {\u0027drv_state\u0027: drv_state, \u0027db_state\u0027: db_state},"},{"line_number":951,"context_line":"                  instance\u003dinstance)"},{"line_number":952,"context_line":""},{"line_number":953,"context_line":"        def save_state_and_log(instance, msg):"},{"line_number":954,"context_line":"            LOG.info(msg, instance\u003dinstance)"},{"line_number":955,"context_line":"            instance.task_state \u003d None"},{"line_number":956,"context_line":"            instance.save()"}],"source_content_type":"text/x-python","patch_set":7,"id":"7adec928_b454d8ff","line":953,"in_reply_to":"7adec928_48f4de86","updated":"2014-05-15 05:27:45.000000000","message":"ok, thanks","commit_id":"77a136c6466a73f567e09a55d8b96ef94c3d5027"},{"author":{"_account_id":9847,"name":"ricky.bo","email":"boh.ricky@gmail.com","username":"boh.ricky"},"change_message_id":"a324145263e3d078fba9cabeaa81936b4b01c0f7","unresolved":false,"context_lines":[{"line_number":950,"context_line":"                  {\u0027drv_state\u0027: drv_state, \u0027db_state\u0027: db_state},"},{"line_number":951,"context_line":"                  instance\u003dinstance)"},{"line_number":952,"context_line":""},{"line_number":953,"context_line":"        def save_state_and_log(instance, msg):"},{"line_number":954,"context_line":"            LOG.info(msg, instance\u003dinstance)"},{"line_number":955,"context_line":"            instance.task_state \u003d None"},{"line_number":956,"context_line":"            instance.save()"}],"source_content_type":"text/x-python","patch_set":7,"id":"7adec928_48f4de86","line":953,"in_reply_to":"7adec928_d2309fa0","updated":"2014-05-14 16:43:00.000000000","message":"Agree with garyk. And it seems there are a lot of codes like this in the file.","commit_id":"77a136c6466a73f567e09a55d8b96ef94c3d5027"},{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"38a9f34f5fb30d73ab8e7dd5049c8b925fc57a29","unresolved":false,"context_lines":[{"line_number":950,"context_line":"                  {\u0027drv_state\u0027: drv_state, \u0027db_state\u0027: db_state},"},{"line_number":951,"context_line":"                  instance\u003dinstance)"},{"line_number":952,"context_line":""},{"line_number":953,"context_line":"        def save_state_and_log(instance, msg):"},{"line_number":954,"context_line":"            LOG.info(msg, instance\u003dinstance)"},{"line_number":955,"context_line":"            instance.task_state \u003d None"},{"line_number":956,"context_line":"            instance.save()"}],"source_content_type":"text/x-python","patch_set":7,"id":"7adec928_944fdc6a","line":953,"in_reply_to":"7adec928_d2309fa0","updated":"2014-05-15 05:27:45.000000000","message":"I used to have a _ as prefix for this kind of inline function\nsome reviewers told me that it\u0027s not needed ...\n\nanyway, your suggestion is right, I will move this to upper layer, thanks","commit_id":"77a136c6466a73f567e09a55d8b96ef94c3d5027"},{"author":{"_account_id":1882,"name":"dave-mcnally","email":"dave.mcnally@hpe.com","username":"dave-mcnally"},"change_message_id":"94daabaeef57e205fc966157b494459d2f3dd6b3","unresolved":false,"context_lines":[{"line_number":987,"context_line":"            if instance.task_state \u003d\u003d task_states.PAUSING:"},{"line_number":988,"context_line":"                msg \u003d _(\u0027Instance found in running state during \u0027"},{"line_number":989,"context_line":"                        \u0027startup. Resetting task_state\u0027)"},{"line_number":990,"context_line":"                self._save_state_and_log(instance, msg)"},{"line_number":991,"context_line":"        elif drv_state \u003d\u003d power_state.PAUSED:"},{"line_number":992,"context_line":"            if instance.task_state \u003d\u003d task_states.UNPAUSING:"},{"line_number":993,"context_line":"                msg \u003d _(\u0027Instance found in paused state during \u0027"}],"source_content_type":"text/x-python","patch_set":11,"id":"1ae5cdf2_4ac1f84c","line":990,"updated":"2014-06-19 14:37:18.000000000","message":"If you look earlier on in this function (line 882 in this version) there\u0027s already a conditional checking for RUNNING instances which resets their state if they are at the start of a REBOOT. Rather than add code down here you could add task_states.UNPAUSING to the list of task states which that portion of code checks for.","commit_id":"1cbbc87c87fb9ff09b5b4607dd04cb6572dfbf11"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"578db43f16518b3d50f1e7add1d5c9d7466c8d83","unresolved":false,"context_lines":[{"line_number":887,"context_line":"        elif (current_power_state \u003d\u003d power_state.RUNNING and"},{"line_number":888,"context_line":"           instance.task_state in [task_states.REBOOT_STARTED,"},{"line_number":889,"context_line":"                                   task_states.REBOOT_STARTED_HARD,"},{"line_number":890,"context_line":"                                   task_states.PAUSING]):"},{"line_number":891,"context_line":"            instance.vm_state \u003d vm_states.ACTIVE"},{"line_number":892,"context_line":"            self._save_state_and_log(instance, current_power_state)"},{"line_number":893,"context_line":"        elif (current_power_state \u003d\u003d power_state.PAUSED and"}],"source_content_type":"text/x-python","patch_set":13,"id":"baada198_003ef5b7","line":890,"updated":"2014-07-21 02:58:43.000000000","message":"Looks like we have case for \ncurrent_power_state \u003d\u003d power_state.RUNNING and instance.task_state \u003d task_states.UNPAUSING","commit_id":"edcbe730f774d71888c1e30d3e0a27857cd3ed7c"},{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"04a204f5d1e3d0f501ce874915c1cc16476ae6af","unresolved":false,"context_lines":[{"line_number":887,"context_line":"        elif (current_power_state \u003d\u003d power_state.RUNNING and"},{"line_number":888,"context_line":"           instance.task_state in [task_states.REBOOT_STARTED,"},{"line_number":889,"context_line":"                                   task_states.REBOOT_STARTED_HARD,"},{"line_number":890,"context_line":"                                   task_states.PAUSING]):"},{"line_number":891,"context_line":"            instance.vm_state \u003d vm_states.ACTIVE"},{"line_number":892,"context_line":"            self._save_state_and_log(instance, current_power_state)"},{"line_number":893,"context_line":"        elif (current_power_state \u003d\u003d power_state.PAUSED and"}],"source_content_type":"text/x-python","patch_set":13,"id":"baada198_c2a23d99","line":890,"in_reply_to":"baada198_003ef5b7","updated":"2014-07-21 09:10:22.000000000","message":"@check_instance_state(vm_state\u003d[vm_states.PAUSED])\n    def unpause(self, context, instance):\n\nwill make sure we won\u0027t set state to UNPAUSING if current state is RUNNING... any method to lead to scenario you had?","commit_id":"edcbe730f774d71888c1e30d3e0a27857cd3ed7c"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"f5cbf0d919acfbee8e1c98929a5aa10078df31f3","unresolved":false,"context_lines":[{"line_number":887,"context_line":"        elif (current_power_state \u003d\u003d power_state.RUNNING and"},{"line_number":888,"context_line":"           instance.task_state in [task_states.REBOOT_STARTED,"},{"line_number":889,"context_line":"                                   task_states.REBOOT_STARTED_HARD,"},{"line_number":890,"context_line":"                                   task_states.PAUSING]):"},{"line_number":891,"context_line":"            instance.vm_state \u003d vm_states.ACTIVE"},{"line_number":892,"context_line":"            self._save_state_and_log(instance, current_power_state)"},{"line_number":893,"context_line":"        elif (current_power_state \u003d\u003d power_state.PAUSED and"}],"source_content_type":"text/x-python","patch_set":13,"id":"baada198_f0baa8be","line":890,"in_reply_to":"baada198_c2a23d99","updated":"2014-07-21 09:36:18.000000000","message":"That\u0027s think of if there a crash after this line https://github.com/openstack/nova/blob/master/nova/compute/manager.py#L3774\n\nI didn\u0027t produce in some case, just based on code reading.","commit_id":"edcbe730f774d71888c1e30d3e0a27857cd3ed7c"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"578db43f16518b3d50f1e7add1d5c9d7466c8d83","unresolved":false,"context_lines":[{"line_number":892,"context_line":"            self._save_state_and_log(instance, current_power_state)"},{"line_number":893,"context_line":"        elif (current_power_state \u003d\u003d power_state.PAUSED and"},{"line_number":894,"context_line":"            instance.task_state \u003d\u003d task_states.UNPAUSING):"},{"line_number":895,"context_line":"            self._save_state_and_log(instance, current_power_state)"},{"line_number":896,"context_line":""},{"line_number":897,"context_line":"        if instance.task_state \u003d\u003d task_states.POWERING_OFF:"},{"line_number":898,"context_line":"            try:"}],"source_content_type":"text/x-python","patch_set":13,"id":"baada198_c06f9dc2","line":895,"updated":"2014-07-21 02:58:43.000000000","message":"also have case for current_power_state \u003d\u003d power_state.PAUSED and instance.task_state \u003d\u003d task_states.PAUSING","commit_id":"edcbe730f774d71888c1e30d3e0a27857cd3ed7c"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"f5cbf0d919acfbee8e1c98929a5aa10078df31f3","unresolved":false,"context_lines":[{"line_number":892,"context_line":"            self._save_state_and_log(instance, current_power_state)"},{"line_number":893,"context_line":"        elif (current_power_state \u003d\u003d power_state.PAUSED and"},{"line_number":894,"context_line":"            instance.task_state \u003d\u003d task_states.UNPAUSING):"},{"line_number":895,"context_line":"            self._save_state_and_log(instance, current_power_state)"},{"line_number":896,"context_line":""},{"line_number":897,"context_line":"        if instance.task_state \u003d\u003d task_states.POWERING_OFF:"},{"line_number":898,"context_line":"            try:"}],"source_content_type":"text/x-python","patch_set":13,"id":"baada198_10e55cdb","line":895,"in_reply_to":"baada198_62bb31c4","updated":"2014-07-21 09:36:18.000000000","message":"A crash after this line https://github.com/openstack/nova/blob/master/nova/compute/manager.py#L3757","commit_id":"edcbe730f774d71888c1e30d3e0a27857cd3ed7c"},{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"04a204f5d1e3d0f501ce874915c1cc16476ae6af","unresolved":false,"context_lines":[{"line_number":892,"context_line":"            self._save_state_and_log(instance, current_power_state)"},{"line_number":893,"context_line":"        elif (current_power_state \u003d\u003d power_state.PAUSED and"},{"line_number":894,"context_line":"            instance.task_state \u003d\u003d task_states.UNPAUSING):"},{"line_number":895,"context_line":"            self._save_state_and_log(instance, current_power_state)"},{"line_number":896,"context_line":""},{"line_number":897,"context_line":"        if instance.task_state \u003d\u003d task_states.POWERING_OFF:"},{"line_number":898,"context_line":"            try:"}],"source_content_type":"text/x-python","patch_set":13,"id":"baada198_62bb31c4","line":895,"in_reply_to":"baada198_c06f9dc2","updated":"2014-07-21 09:10:22.000000000","message":"almost same to above\n\n@check_instance_state(vm_state\u003d[vm_states.ACTIVE, vm_states.RESCUED])\n    def pause(self, context, instance):\n        \"\"\"Pause the given instance.\"\"\"\n        instance.task_state \u003d task_states.PAUSING\n\nhow can we make above scenario you mentioned? Thanks","commit_id":"edcbe730f774d71888c1e30d3e0a27857cd3ed7c"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"e1b38cd16c44f53a4b6fabaa5550554f33335b21","unresolved":false,"context_lines":[{"line_number":784,"context_line":""},{"line_number":785,"context_line":"    @staticmethod"},{"line_number":786,"context_line":"    def _save_state_and_log(instance, current_power_state):"},{"line_number":787,"context_line":"        LOG.warning(_(\"Instance in transitional state \""},{"line_number":788,"context_line":"                      \"(%(task_state)s) at start-up and power state \""},{"line_number":789,"context_line":"                      \"is (%(power_state)s), clearing task state\"),"},{"line_number":790,"context_line":"                      {\u0027task_state\u0027: instance[\u0027task_state\u0027],"}],"source_content_type":"text/x-python","patch_set":16,"id":"baada198_0a64f2e4","line":787,"updated":"2014-07-29 16:01:49.000000000","message":"please use the log hint _LW here","commit_id":"bbf2a17f95e54700b1db3f1041bd2292fd476651"},{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"594923a509162b04359c54b436d070e24ecb6487","unresolved":false,"context_lines":[{"line_number":784,"context_line":""},{"line_number":785,"context_line":"    @staticmethod"},{"line_number":786,"context_line":"    def _save_state_and_log(instance, current_power_state):"},{"line_number":787,"context_line":"        LOG.warning(_(\"Instance in transitional state \""},{"line_number":788,"context_line":"                      \"(%(task_state)s) at start-up and power state \""},{"line_number":789,"context_line":"                      \"is (%(power_state)s), clearing task state\"),"},{"line_number":790,"context_line":"                      {\u0027task_state\u0027: instance[\u0027task_state\u0027],"}],"source_content_type":"text/x-python","patch_set":16,"id":"baada198_17ec6b28","line":787,"in_reply_to":"baada198_0a64f2e4","updated":"2014-08-04 01:05:46.000000000","message":"ok, agree","commit_id":"bbf2a17f95e54700b1db3f1041bd2292fd476651"},{"author":{"_account_id":1501,"name":"Phil Day","email":"philip.day@hp.com","username":"philip-day"},"change_message_id":"c3c881b08490ddc713820df706605ecd2b1f8cfd","unresolved":false,"context_lines":[{"line_number":797,"context_line":"                        instance.uuid)"},{"line_number":798,"context_line":""},{"line_number":799,"context_line":"    @staticmethod"},{"line_number":800,"context_line":"    def _save_state_and_log(instance, current_power_state):"},{"line_number":801,"context_line":"        LOG.warn(_LW(\"Instance in transitional state \""},{"line_number":802,"context_line":"                     \"(%(task_state)s) at start-up and power state \""},{"line_number":803,"context_line":"                     \"is (%(power_state)s), clearing task state\"),"}],"source_content_type":"text/x-python","patch_set":17,"id":"fa98f980_a446ec78","line":800,"updated":"2014-09-05 17:07:14.000000000","message":"Since what you\u0027re actually doing is clearing the task state I find the method name a bit misleading.\n\nIt also kind of feels that having a helper method just for this minor step (its only called twice) is a pretty small gain compared to breaking up the flow and hiding the instance save inside a method.   I think I would have preferred in this case to have followed the pattern in the rest of the code here and just kept it as in-line with a very small amount of duplication","commit_id":"906f12556ce7550820662d3b2018898b3fac517f"},{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"e2109e26b4ffc6a25b75f127771645ac74007212","unresolved":false,"context_lines":[{"line_number":797,"context_line":"                        instance.uuid)"},{"line_number":798,"context_line":""},{"line_number":799,"context_line":"    @staticmethod"},{"line_number":800,"context_line":"    def _save_state_and_log(instance, current_power_state):"},{"line_number":801,"context_line":"        LOG.warn(_LW(\"Instance in transitional state \""},{"line_number":802,"context_line":"                     \"(%(task_state)s) at start-up and power state \""},{"line_number":803,"context_line":"                     \"is (%(power_state)s), clearing task state\"),"}],"source_content_type":"text/x-python","patch_set":17,"id":"fa98f980_cefea637","line":800,"in_reply_to":"fa98f980_71c92b25","updated":"2014-09-16 06:31:11.000000000","message":"ok, will update it, thanks","commit_id":"906f12556ce7550820662d3b2018898b3fac517f"},{"author":{"_account_id":1849,"name":"Joe Gordon","email":"joe.gordon0@gmail.com","username":"jogo"},"change_message_id":"98586dcd1f7d03856a167fe21d5ab5fc700e9779","unresolved":false,"context_lines":[{"line_number":797,"context_line":"                        instance.uuid)"},{"line_number":798,"context_line":""},{"line_number":799,"context_line":"    @staticmethod"},{"line_number":800,"context_line":"    def _save_state_and_log(instance, current_power_state):"},{"line_number":801,"context_line":"        LOG.warn(_LW(\"Instance in transitional state \""},{"line_number":802,"context_line":"                     \"(%(task_state)s) at start-up and power state \""},{"line_number":803,"context_line":"                     \"is (%(power_state)s), clearing task state\"),"}],"source_content_type":"text/x-python","patch_set":17,"id":"fa98f980_71c92b25","line":800,"in_reply_to":"fa98f980_a446ec78","updated":"2014-09-15 17:24:53.000000000","message":"I agree with Phil, the name is misleading.","commit_id":"906f12556ce7550820662d3b2018898b3fac517f"},{"author":{"_account_id":1501,"name":"Phil Day","email":"philip.day@hp.com","username":"philip-day"},"change_message_id":"60a5d16db900f8d3275e0a3c0abac15085cb96bb","unresolved":false,"context_lines":[{"line_number":951,"context_line":"                     \"is (%(power_state)s), clearing task state\"),"},{"line_number":952,"context_line":"                     {\u0027task_state\u0027: instance.task_state,"},{"line_number":953,"context_line":"                      \u0027power_state\u0027: current_power_state},"},{"line_number":954,"context_line":"                      instance\u003dinstance)"},{"line_number":955,"context_line":"            instance.task_state \u003d None"},{"line_number":956,"context_line":"            instance.save()"},{"line_number":957,"context_line":"        elif (current_power_state \u003d\u003d power_state.PAUSED and"}],"source_content_type":"text/x-python","patch_set":18,"id":"fa98f980_c38d702c","line":954,"updated":"2014-09-17 13:03:21.000000000","message":"I don\u0027t understand why you needed to move the Log statement down a line - the flow just looks wrong now that the log line is in the middle of the lines that update the instance.","commit_id":"f75089ac206f5181cbd5f2eb95620255a9b76022"},{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"14fab6350d26b09350c00ea25ca0586fce152593","unresolved":false,"context_lines":[{"line_number":951,"context_line":"                     \"is (%(power_state)s), clearing task state\"),"},{"line_number":952,"context_line":"                     {\u0027task_state\u0027: instance.task_state,"},{"line_number":953,"context_line":"                      \u0027power_state\u0027: current_power_state},"},{"line_number":954,"context_line":"                      instance\u003dinstance)"},{"line_number":955,"context_line":"            instance.task_state \u003d None"},{"line_number":956,"context_line":"            instance.save()"},{"line_number":957,"context_line":"        elif (current_power_state \u003d\u003d power_state.PAUSED and"}],"source_content_type":"text/x-python","patch_set":18,"id":"fa98f980_ea194f24","line":954,"in_reply_to":"fa98f980_c38d702c","updated":"2014-09-18 08:54:33.000000000","message":"It\u0027s a copy/paste mistype, thanks for point out","commit_id":"f75089ac206f5181cbd5f2eb95620255a9b76022"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"d8798a22b49ebd70990a8b83d2b981fa06eb9706","unresolved":false,"context_lines":[{"line_number":953,"context_line":"                      instance\u003dinstance)"},{"line_number":954,"context_line":"            instance.vm_state \u003d vm_states.ACTIVE"},{"line_number":955,"context_line":"            instance.task_state \u003d None"},{"line_number":956,"context_line":"            instance.save()"},{"line_number":957,"context_line":"        elif (current_power_state \u003d\u003d power_state.PAUSED and"},{"line_number":958,"context_line":"            instance.task_state \u003d\u003d task_states.UNPAUSING):"},{"line_number":959,"context_line":"            LOG.warn(_LW(\"Instance in transitional state \""}],"source_content_type":"text/x-python","patch_set":19,"id":"fa98f980_73eb9a12","line":956,"updated":"2014-09-18 10:52:44.000000000","message":"2 things:\n\n1) Is it possible to UNPAUSE a machine which is RUNNING!? (I would think that you can only UNPAUSE something that is PAUSED, hidden bug? Why UNPAUSING is being saved to the db if the current state is RUNNING?)\n\n2) I think that for [UN]PAUSING we should take a different approach than this.\n\nAt this point, the real state of the instance is unknown right? We don\u0027t know whether the instance was paused or not, but, we already know the desired state and the current state why we just don\u0027t automate that?\n\nIf before n-cpu crashed the user requested to pause that instance and I assume that the API have returned saying that the requested was accept, why we don\u0027t re-issue the [un]pause_instance() request here?\n\nI mean users would be like: \"fuck yeah automation\"!\n\nInstead of just cleaning up the states, leaving the machine in an unknown state and having the user to reissue the request to [un]pause the machine again.\n\n(And sorry if someone already suggested that, I haven\u0027t looked in all previous patch-sets to see if that\u0027s the case)","commit_id":"2ee1c81ec9667b85ab97a6ba2155073706635198"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"d8798a22b49ebd70990a8b83d2b981fa06eb9706","unresolved":false,"context_lines":[{"line_number":963,"context_line":"                      \u0027power_state\u0027: current_power_state},"},{"line_number":964,"context_line":"                      instance\u003dinstance)"},{"line_number":965,"context_line":"            instance.task_state \u003d None"},{"line_number":966,"context_line":"            instance.save()"},{"line_number":967,"context_line":""},{"line_number":968,"context_line":"        if instance.task_state \u003d\u003d task_states.POWERING_OFF:"},{"line_number":969,"context_line":"            try:"}],"source_content_type":"text/x-python","patch_set":19,"id":"fa98f980_13e6ce44","line":966,"updated":"2014-09-18 10:52:44.000000000","message":"ditto, why not reissue unpause_instance() here?","commit_id":"2ee1c81ec9667b85ab97a6ba2155073706635198"},{"author":{"_account_id":7746,"name":"Dan Genin","email":"daniel.genin@jhuapl.edu","username":"DiG"},"change_message_id":"fa97e4a59a9ed2ffc7047f289cfe4515be2c71b9","unresolved":false,"context_lines":[{"line_number":943,"context_line":"        elif (current_power_state \u003d\u003d power_state.RUNNING and"},{"line_number":944,"context_line":"           # If it\u0027s already running state, we will do nothing"},{"line_number":945,"context_line":"           # except make it ACTIVE state though it might in"},{"line_number":946,"context_line":"           # oausing or unpausing state"},{"line_number":947,"context_line":"           instance.task_state in [task_states.REBOOT_STARTED,"},{"line_number":948,"context_line":"                                   task_states.REBOOT_STARTED_HARD,"},{"line_number":949,"context_line":"                                   task_states.PAUSING,"}],"source_content_type":"text/x-python","patch_set":20,"id":"9aa7fdbe_cd8a981a","line":946,"updated":"2014-10-23 17:11:11.000000000","message":"1. I don\u0027t think it\u0027s a good idea to have comments in the middle of an if clause. Please move it past the end of the clause.\n\n2. Multi-line comments should be prefixed with \"NOTE (\u003cL-pad id\u003e)\", see above.\n\n3. \"oausing\" -\u003e \"pausing\"","commit_id":"7852c563e0799f3108d7d833880d4c73bac84cd0"},{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"d621f53f5d58fa31d68a82b30312a925c17f76ab","unresolved":false,"context_lines":[{"line_number":943,"context_line":"        elif (current_power_state \u003d\u003d power_state.RUNNING and"},{"line_number":944,"context_line":"           # If it\u0027s already running state, we will do nothing"},{"line_number":945,"context_line":"           # except make it ACTIVE state though it might in"},{"line_number":946,"context_line":"           # oausing or unpausing state"},{"line_number":947,"context_line":"           instance.task_state in [task_states.REBOOT_STARTED,"},{"line_number":948,"context_line":"                                   task_states.REBOOT_STARTED_HARD,"},{"line_number":949,"context_line":"                                   task_states.PAUSING,"}],"source_content_type":"text/x-python","patch_set":20,"id":"7a8c0949_bb907eed","line":946,"in_reply_to":"9aa7fdbe_cd8a981a","updated":"2014-11-03 06:38:11.000000000","message":"Done","commit_id":"7852c563e0799f3108d7d833880d4c73bac84cd0"},{"author":{"_account_id":7746,"name":"Dan Genin","email":"daniel.genin@jhuapl.edu","username":"DiG"},"change_message_id":"fa97e4a59a9ed2ffc7047f289cfe4515be2c71b9","unresolved":false,"context_lines":[{"line_number":955,"context_line":"                      \u0027power_state\u0027: current_power_state},"},{"line_number":956,"context_line":"                      instance\u003dinstance)"},{"line_number":957,"context_line":"            instance.vm_state \u003d vm_states.ACTIVE"},{"line_number":958,"context_line":"            instance.task_state \u003d None"},{"line_number":959,"context_line":"            instance.save()"},{"line_number":960,"context_line":"        elif (current_power_state \u003d\u003d power_state.PAUSED and"},{"line_number":961,"context_line":"            instance.task_state \u003d\u003d task_states.UNPAUSING):"}],"source_content_type":"text/x-python","patch_set":20,"id":"9aa7fdbe_ada8f477","line":958,"updated":"2014-10-23 17:11:11.000000000","message":"Why change the order of these statements? It only makes the diff more complicated.","commit_id":"7852c563e0799f3108d7d833880d4c73bac84cd0"},{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"d621f53f5d58fa31d68a82b30312a925c17f76ab","unresolved":false,"context_lines":[{"line_number":955,"context_line":"                      \u0027power_state\u0027: current_power_state},"},{"line_number":956,"context_line":"                      instance\u003dinstance)"},{"line_number":957,"context_line":"            instance.vm_state \u003d vm_states.ACTIVE"},{"line_number":958,"context_line":"            instance.task_state \u003d None"},{"line_number":959,"context_line":"            instance.save()"},{"line_number":960,"context_line":"        elif (current_power_state \u003d\u003d power_state.PAUSED and"},{"line_number":961,"context_line":"            instance.task_state \u003d\u003d task_states.UNPAUSING):"}],"source_content_type":"text/x-python","patch_set":20,"id":"7a8c0949_dbbc6a6f","line":958,"in_reply_to":"9aa7fdbe_ada8f477","updated":"2014-11-03 06:38:11.000000000","message":"yes, I guess I made a wrong action, thanks","commit_id":"7852c563e0799f3108d7d833880d4c73bac84cd0"},{"author":{"_account_id":7746,"name":"Dan Genin","email":"daniel.genin@jhuapl.edu","username":"DiG"},"change_message_id":"fa97e4a59a9ed2ffc7047f289cfe4515be2c71b9","unresolved":false,"context_lines":[{"line_number":961,"context_line":"            instance.task_state \u003d\u003d task_states.UNPAUSING):"},{"line_number":962,"context_line":"            LOG.warn(_LW(\"Instance in transitional state \""},{"line_number":963,"context_line":"                     \"(%(task_state)s) at start-up and power state \""},{"line_number":964,"context_line":"                     \"is (%(power_state)s), clearing task state\"),"},{"line_number":965,"context_line":"                     {\u0027task_state\u0027: instance.task_state,"},{"line_number":966,"context_line":"                      \u0027power_state\u0027: current_power_state},"},{"line_number":967,"context_line":"                      instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":20,"id":"9aa7fdbe_aded54b9","line":964,"updated":"2014-10-23 17:11:11.000000000","message":"I think this log warning needs to be adjusted as it is just a copy of what\u0027s above at the moment.","commit_id":"7852c563e0799f3108d7d833880d4c73bac84cd0"},{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"d621f53f5d58fa31d68a82b30312a925c17f76ab","unresolved":false,"context_lines":[{"line_number":961,"context_line":"            instance.task_state \u003d\u003d task_states.UNPAUSING):"},{"line_number":962,"context_line":"            LOG.warn(_LW(\"Instance in transitional state \""},{"line_number":963,"context_line":"                     \"(%(task_state)s) at start-up and power state \""},{"line_number":964,"context_line":"                     \"is (%(power_state)s), clearing task state\"),"},{"line_number":965,"context_line":"                     {\u0027task_state\u0027: instance.task_state,"},{"line_number":966,"context_line":"                      \u0027power_state\u0027: current_power_state},"},{"line_number":967,"context_line":"                      instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":20,"id":"7a8c0949_fbc126e5","line":964,"in_reply_to":"9aa7fdbe_aded54b9","updated":"2014-11-03 06:38:11.000000000","message":"I was requested to change it (see previous patch)\nAnd the parameter will indicate different state...","commit_id":"7852c563e0799f3108d7d833880d4c73bac84cd0"},{"author":{"_account_id":7746,"name":"Dan Genin","email":"daniel.genin@jhuapl.edu","username":"DiG"},"change_message_id":"fa97e4a59a9ed2ffc7047f289cfe4515be2c71b9","unresolved":false,"context_lines":[{"line_number":968,"context_line":"            try:"},{"line_number":969,"context_line":"                self.unpause_instance(context, instance)"},{"line_number":970,"context_line":"            except Exception:"},{"line_number":971,"context_line":"                msg \u003d _LE(\u0027Failed to unpause instance\u0027)"},{"line_number":972,"context_line":"                LOG.exception(msg, instance\u003dinstance)"},{"line_number":973,"context_line":"            return"},{"line_number":974,"context_line":""}],"source_content_type":"text/x-python","patch_set":20,"id":"9aa7fdbe_edce7c2d","line":971,"updated":"2014-10-23 17:11:11.000000000","message":"This does not look like it should require a variable to hold the error message. Why not simply pass the l-value into the LOG.exception() below.","commit_id":"7852c563e0799f3108d7d833880d4c73bac84cd0"},{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"d621f53f5d58fa31d68a82b30312a925c17f76ab","unresolved":false,"context_lines":[{"line_number":968,"context_line":"            try:"},{"line_number":969,"context_line":"                self.unpause_instance(context, instance)"},{"line_number":970,"context_line":"            except Exception:"},{"line_number":971,"context_line":"                msg \u003d _LE(\u0027Failed to unpause instance\u0027)"},{"line_number":972,"context_line":"                LOG.exception(msg, instance\u003dinstance)"},{"line_number":973,"context_line":"            return"},{"line_number":974,"context_line":""}],"source_content_type":"text/x-python","patch_set":20,"id":"7a8c0949_1bb7d287","line":971,"in_reply_to":"9aa7fdbe_edce7c2d","updated":"2014-11-03 06:38:11.000000000","message":"correct, thanks","commit_id":"7852c563e0799f3108d7d833880d4c73bac84cd0"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"823ecb81015ded550d0bd763dbb05ee5fb645c30","unresolved":false,"context_lines":[{"line_number":946,"context_line":"                                        task_states.PAUSING,"},{"line_number":947,"context_line":"                                        task_states.UNPAUSING]):"},{"line_number":948,"context_line":"            LOG.warn(_LW(\"Instance in transitional state \""},{"line_number":949,"context_line":"                     \"(%(task_state)s) at start-up and power state \""},{"line_number":950,"context_line":"                     \"is (%(power_state)s), clearing task state\"),"},{"line_number":951,"context_line":"                     {\u0027task_state\u0027: instance.task_state,"},{"line_number":952,"context_line":"                      \u0027power_state\u0027: current_power_state},"}],"source_content_type":"text/x-python","patch_set":21,"id":"5a890539_25d8191d","line":949,"updated":"2014-11-10 08:56:57.000000000","message":"indentation here is odd\n\ni think that there is also a path moving all warn \u003d\u003e warning","commit_id":"c912c7d5a5b8280d80f62efba527d7a591dc09bb"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"823ecb81015ded550d0bd763dbb05ee5fb645c30","unresolved":false,"context_lines":[{"line_number":955,"context_line":"            instance.vm_state \u003d vm_states.ACTIVE"},{"line_number":956,"context_line":"            instance.save()"},{"line_number":957,"context_line":"        elif (current_power_state \u003d\u003d power_state.PAUSED and"},{"line_number":958,"context_line":"            instance.task_state \u003d\u003d task_states.UNPAUSING):"},{"line_number":959,"context_line":"            LOG.warn(_LW(\"Instance in transitional state \""},{"line_number":960,"context_line":"                     \"(%(task_state)s) at start-up and power state \""},{"line_number":961,"context_line":"                     \"is (%(power_state)s), clearing task state\"),"}],"source_content_type":"text/x-python","patch_set":21,"id":"5a890539_c5f7558b","line":958,"updated":"2014-11-10 08:56:57.000000000","message":"indentation is also odd here","commit_id":"c912c7d5a5b8280d80f62efba527d7a591dc09bb"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"823ecb81015ded550d0bd763dbb05ee5fb645c30","unresolved":false,"context_lines":[{"line_number":956,"context_line":"            instance.save()"},{"line_number":957,"context_line":"        elif (current_power_state \u003d\u003d power_state.PAUSED and"},{"line_number":958,"context_line":"            instance.task_state \u003d\u003d task_states.UNPAUSING):"},{"line_number":959,"context_line":"            LOG.warn(_LW(\"Instance in transitional state \""},{"line_number":960,"context_line":"                     \"(%(task_state)s) at start-up and power state \""},{"line_number":961,"context_line":"                     \"is (%(power_state)s), clearing task state\"),"},{"line_number":962,"context_line":"                     {\u0027task_state\u0027: instance.task_state,"}],"source_content_type":"text/x-python","patch_set":21,"id":"5a890539_e5f45189","line":959,"updated":"2014-11-10 08:56:57.000000000","message":"same comment as above","commit_id":"c912c7d5a5b8280d80f62efba527d7a591dc09bb"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"823ecb81015ded550d0bd763dbb05ee5fb645c30","unresolved":false,"context_lines":[{"line_number":963,"context_line":"                      \u0027power_state\u0027: current_power_state},"},{"line_number":964,"context_line":"                      instance\u003dinstance)"},{"line_number":965,"context_line":"            try:"},{"line_number":966,"context_line":"                self.unpause_instance(context, instance)"},{"line_number":967,"context_line":"            except Exception:"},{"line_number":968,"context_line":"                LOG.exception(_LE(\u0027Failed to unpause instance\u0027),"},{"line_number":969,"context_line":"                              instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":21,"id":"5a890539_85354d48","line":966,"updated":"2014-11-10 08:56:57.000000000","message":"there are some drivers that do not support pause. i think that we should have a continue here is the exception raised in NotImplemented (essentially) we should not even get here :) as it would not have been able to move to pause state.","commit_id":"c912c7d5a5b8280d80f62efba527d7a591dc09bb"},{"author":{"_account_id":13409,"name":"Andrew Boik","email":"drew.boik@gmail.com","username":"dboik"},"change_message_id":"a1227c443a963625d0f943cc9ece1b4e9476a1c8","unresolved":false,"context_lines":[{"line_number":953,"context_line":"              instance.task_state \u003d\u003d task_states.UNPAUSING):"},{"line_number":954,"context_line":"            LOG.warn(_LW(\"Instance in transitional state \""},{"line_number":955,"context_line":"                         \"(%(task_state)s) at start-up and power state \""},{"line_number":956,"context_line":"                         \"is (%(power_state)s), clearing task state\"),"},{"line_number":957,"context_line":"                         {\u0027task_state\u0027: instance.task_state,"},{"line_number":958,"context_line":"                          \u0027power_state\u0027: current_power_state},"},{"line_number":959,"context_line":"                          instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":23,"id":"5a890539_98c18a56","line":956,"updated":"2014-11-15 18:17:07.000000000","message":"This log message is the same as the one above even though the functionality of the following code is different. Instead of \u0027clearing task state\u0027, can you mention that the instance is being unpaused?","commit_id":"a1590041c06ccdb58e79ac147384a62fe8b4486e"},{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"42f97fe5c792bdbbd4003ae6470be9c2106d2127","unresolved":false,"context_lines":[{"line_number":953,"context_line":"              instance.task_state \u003d\u003d task_states.UNPAUSING):"},{"line_number":954,"context_line":"            LOG.warn(_LW(\"Instance in transitional state \""},{"line_number":955,"context_line":"                         \"(%(task_state)s) at start-up and power state \""},{"line_number":956,"context_line":"                         \"is (%(power_state)s), clearing task state\"),"},{"line_number":957,"context_line":"                         {\u0027task_state\u0027: instance.task_state,"},{"line_number":958,"context_line":"                          \u0027power_state\u0027: current_power_state},"},{"line_number":959,"context_line":"                          instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":23,"id":"5a890539_fea18df8","line":956,"in_reply_to":"5a890539_98c18a56","updated":"2014-11-17 04:19:40.000000000","message":"Done","commit_id":"a1590041c06ccdb58e79ac147384a62fe8b4486e"},{"author":{"_account_id":7,"name":"Jay Pipes","email":"jaypipes@gmail.com","username":"jaypipes"},"change_message_id":"ea50e244c4eaa6ecf23f6d93ff3c68d433f8e275","unresolved":false,"context_lines":[{"line_number":966,"context_line":"            except Exception:"},{"line_number":967,"context_line":"                LOG.exception(_LE(\u0027Failed to unpause instance\u0027),"},{"line_number":968,"context_line":"                              instance\u003dinstance)"},{"line_number":969,"context_line":"            return"},{"line_number":970,"context_line":""},{"line_number":971,"context_line":"        if instance.task_state \u003d\u003d task_states.POWERING_OFF:"},{"line_number":972,"context_line":"            try:"}],"source_content_type":"text/x-python","patch_set":24,"id":"5a890539_32264a69","line":969,"updated":"2014-12-01 18:48:25.000000000","message":"Might be nicer to put this block of code *above* the elif block that ends with instance.save() so that you don\u0027t have a block that returns in between two blocks that don\u0027t return...","commit_id":"76fc08e52dfe92b90c8ad47aee25b9d1d34f1cee"}],"nova/tests/compute/test_compute_mgr.py":[{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"c1c9e3a40c7d1af5bb0fae526bc435cafe884718","unresolved":false,"context_lines":[{"line_number":518,"context_line":"        self._test_init_instance_cleans_task_states(power_state.RUNNING,"},{"line_number":519,"context_line":"                                                    task_states.UNPAUSING)"},{"line_number":520,"context_line":""},{"line_number":521,"context_line":"    def test_init_instance_cleans_unpausing(self):"},{"line_number":522,"context_line":"        self._test_init_instance_cleans_task_states(power_state.PAUSED,"},{"line_number":523,"context_line":"                                                    task_states.UNPAUSING)"},{"line_number":524,"context_line":""}],"source_content_type":"text/x-python","patch_set":15,"id":"baada198_075bce22","line":521,"updated":"2014-07-23 15:11:41.000000000","message":"at line 521 and line 517, those two unittest have same name.","commit_id":"1e0e3f79a4a61313c97c5e37ae78dc7a6168c515"},{"author":{"_account_id":6773,"name":"Lucas Alvares Gomes","email":"lucasagomes@gmail.com","username":"lucasagomes"},"change_message_id":"d8798a22b49ebd70990a8b83d2b981fa06eb9706","unresolved":false,"context_lines":[{"line_number":536,"context_line":"        self.mox.StubOutWithMock(self.compute, \u0027_get_power_state\u0027)"},{"line_number":537,"context_line":"        self.mox.StubOutWithMock(objects.BlockDeviceMappingList,"},{"line_number":538,"context_line":"                                 \u0027get_by_instance_uuid\u0027)"},{"line_number":539,"context_line":"        self.mox.StubOutWithMock(instance, \u0027save\u0027)"},{"line_number":540,"context_line":""},{"line_number":541,"context_line":"        self.compute._get_power_state(mox.IgnoreArg(),"},{"line_number":542,"context_line":"                instance).AndReturn(power_state.RUNNING)"}],"source_content_type":"text/x-python","patch_set":19,"id":"fa98f980_d349a633","line":539,"updated":"2014-09-18 10:52:44.000000000","message":"use mock instead of mox for new tests please","commit_id":"2ee1c81ec9667b85ab97a6ba2155073706635198"},{"author":{"_account_id":7746,"name":"Dan Genin","email":"daniel.genin@jhuapl.edu","username":"DiG"},"change_message_id":"fa97e4a59a9ed2ffc7047f289cfe4515be2c71b9","unresolved":false,"context_lines":[{"line_number":587,"context_line":"        instance \u003d self._test_init_instance_cleans_task_states("},{"line_number":588,"context_line":"            power_state.PAUSED, task_states.UNPAUSING)"},{"line_number":589,"context_line":"        mock_unpause.assert_called_once_with(self.context, instance)"},{"line_number":590,"context_line":""},{"line_number":591,"context_line":"    def test_init_instance_errors_when_not_migrating(self):"},{"line_number":592,"context_line":"        instance \u003d objects.Instance(self.context)"},{"line_number":593,"context_line":"        instance.uuid \u003d \u0027foo\u0027"}],"source_content_type":"text/x-python","patch_set":20,"id":"9aa7fdbe_91718a78","line":590,"updated":"2014-10-23 17:11:11.000000000","message":"These unit tests are not sufficient. You should, at least, be checking instance.task_state and instance.vm_state, which are modified within the manager. The mock boundary should be where control passes out of the manager and the state should be verified up to that point.","commit_id":"7852c563e0799f3108d7d833880d4c73bac84cd0"},{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"d621f53f5d58fa31d68a82b30312a925c17f76ab","unresolved":false,"context_lines":[{"line_number":587,"context_line":"        instance \u003d self._test_init_instance_cleans_task_states("},{"line_number":588,"context_line":"            power_state.PAUSED, task_states.UNPAUSING)"},{"line_number":589,"context_line":"        mock_unpause.assert_called_once_with(self.context, instance)"},{"line_number":590,"context_line":""},{"line_number":591,"context_line":"    def test_init_instance_errors_when_not_migrating(self):"},{"line_number":592,"context_line":"        instance \u003d objects.Instance(self.context)"},{"line_number":593,"context_line":"        instance.uuid \u003d \u0027foo\u0027"}],"source_content_type":"text/x-python","patch_set":20,"id":"7a8c0949_db638a18","line":590,"in_reply_to":"9aa7fdbe_91718a78","updated":"2014-11-03 06:38:11.000000000","message":"ok, will add it","commit_id":"7852c563e0799f3108d7d833880d4c73bac84cd0"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"823ecb81015ded550d0bd763dbb05ee5fb645c30","unresolved":false,"context_lines":[{"line_number":528,"context_line":"    @mock.patch(\u0027nova.compute.manager.ComputeManager._get_power_state\u0027,"},{"line_number":529,"context_line":"                return_value\u003dpower_state.RUNNING)"},{"line_number":530,"context_line":"    @mock.patch.object(objects.BlockDeviceMappingList, \u0027get_by_instance_uuid\u0027)"},{"line_number":531,"context_line":"    def _test_init_instance_cleans_task_states(self, powerstate, state,"},{"line_number":532,"context_line":"            mock_get_uuid, mock_get_power_state):"},{"line_number":533,"context_line":"        instance \u003d objects.Instance(self.context)"},{"line_number":534,"context_line":"        instance.uuid \u003d \u0027fake-uuid\u0027"}],"source_content_type":"text/x-python","patch_set":21,"id":"5a890539_05495dd0","line":531,"updated":"2014-11-10 08:56:57.000000000","message":"can we drop the _test? This is a little misleading as I would have expected that the method actually test something","commit_id":"c912c7d5a5b8280d80f62efba527d7a591dc09bb"}]}
