)]}'
{"nova/compute/manager.py":[{"author":{"_account_id":21813,"name":"Andrey Volkov","email":"m@amadev.ru","username":"avolkov"},"change_message_id":"b4e5c2aa229e6041f50cf3732deeef2e2a0f3ceb","unresolved":false,"context_lines":[{"line_number":6509,"context_line":"            deleted_at \u003d deleted_at.replace(tzinfo\u003dNone)"},{"line_number":6510,"context_line":"        return (not deleted_at or timeutils.is_older_than(deleted_at, timeout))"},{"line_number":6511,"context_line":""},{"line_number":6512,"context_line":"    @contextlib.contextmanager"},{"line_number":6513,"context_line":"    def _resize_rollback(self, context, instance,"},{"line_number":6514,"context_line":"                         instance_state\u003dvm_states.ACTIVE):"},{"line_number":6515,"context_line":"        current_power_state \u003d self._get_power_state(context, instance)"}],"source_content_type":"text/x-python","patch_set":3,"id":"7a8ec9b2_6a7ce720","line":6512,"updated":"2016-09-20 12:47:46.000000000","message":"Do we need this decorator here? There is no yield statement so it causes an error.","commit_id":"6c3bf021af7ff917ac301da6673f3097f19dd628"},{"author":{"_account_id":22771,"name":"Christopher Martin","email":"cm876n@att.com","username":"cm876n"},"change_message_id":"84ef685fc6fe50bfe4c407de68b13b0c12f506e0","unresolved":false,"context_lines":[{"line_number":6509,"context_line":"            deleted_at \u003d deleted_at.replace(tzinfo\u003dNone)"},{"line_number":6510,"context_line":"        return (not deleted_at or timeutils.is_older_than(deleted_at, timeout))"},{"line_number":6511,"context_line":""},{"line_number":6512,"context_line":"    @contextlib.contextmanager"},{"line_number":6513,"context_line":"    def _resize_rollback(self, context, instance,"},{"line_number":6514,"context_line":"                         instance_state\u003dvm_states.ACTIVE):"},{"line_number":6515,"context_line":"        current_power_state \u003d self._get_power_state(context, instance)"}],"source_content_type":"text/x-python","patch_set":3,"id":"7a8ec9b2_6b54e953","line":6512,"in_reply_to":"7a8ec9b2_6a7ce720","updated":"2016-09-20 15:51:11.000000000","message":"Done","commit_id":"6c3bf021af7ff917ac301da6673f3097f19dd628"},{"author":{"_account_id":21813,"name":"Andrey Volkov","email":"m@amadev.ru","username":"avolkov"},"change_message_id":"b4e5c2aa229e6041f50cf3732deeef2e2a0f3ceb","unresolved":false,"context_lines":[{"line_number":6510,"context_line":"        return (not deleted_at or timeutils.is_older_than(deleted_at, timeout))"},{"line_number":6511,"context_line":""},{"line_number":6512,"context_line":"    @contextlib.contextmanager"},{"line_number":6513,"context_line":"    def _resize_rollback(self, context, instance,"},{"line_number":6514,"context_line":"                         instance_state\u003dvm_states.ACTIVE):"},{"line_number":6515,"context_line":"        current_power_state \u003d self._get_power_state(context, instance)"},{"line_number":6516,"context_line":"        if current_power_state \u003d\u003d power_state.NOSTATE:"}],"source_content_type":"text/x-python","patch_set":3,"id":"7a8ec9b2_c515ece5","line":6513,"updated":"2016-09-20 12:47:46.000000000","message":"Don\u0027t sure we cover all possible instance_state e.g. SHELVED_OFFLOADED. Maybe we should think about from which state an instance can be resized?","commit_id":"6c3bf021af7ff917ac301da6673f3097f19dd628"},{"author":{"_account_id":21813,"name":"Andrey Volkov","email":"m@amadev.ru","username":"avolkov"},"change_message_id":"351a7ee8b20380ef45e67719cee2ba3a6afb11b8","unresolved":false,"context_lines":[{"line_number":6510,"context_line":"        return (not deleted_at or timeutils.is_older_than(deleted_at, timeout))"},{"line_number":6511,"context_line":""},{"line_number":6512,"context_line":"    @contextlib.contextmanager"},{"line_number":6513,"context_line":"    def _resize_rollback(self, context, instance,"},{"line_number":6514,"context_line":"                         instance_state\u003dvm_states.ACTIVE):"},{"line_number":6515,"context_line":"        current_power_state \u003d self._get_power_state(context, instance)"},{"line_number":6516,"context_line":"        if current_power_state \u003d\u003d power_state.NOSTATE:"}],"source_content_type":"text/x-python","patch_set":3,"id":"7a8ec9b2_bc252fc3","line":6513,"in_reply_to":"7a8ec9b2_b8847b5d","updated":"2016-09-21 07:42:23.000000000","message":"Ok, good to know.","commit_id":"6c3bf021af7ff917ac301da6673f3097f19dd628"},{"author":{"_account_id":22771,"name":"Christopher Martin","email":"cm876n@att.com","username":"cm876n"},"change_message_id":"84ef685fc6fe50bfe4c407de68b13b0c12f506e0","unresolved":false,"context_lines":[{"line_number":6510,"context_line":"        return (not deleted_at or timeutils.is_older_than(deleted_at, timeout))"},{"line_number":6511,"context_line":""},{"line_number":6512,"context_line":"    @contextlib.contextmanager"},{"line_number":6513,"context_line":"    def _resize_rollback(self, context, instance,"},{"line_number":6514,"context_line":"                         instance_state\u003dvm_states.ACTIVE):"},{"line_number":6515,"context_line":"        current_power_state \u003d self._get_power_state(context, instance)"},{"line_number":6516,"context_line":"        if current_power_state \u003d\u003d power_state.NOSTATE:"}],"source_content_type":"text/x-python","patch_set":3,"id":"7a8ec9b2_b8847b5d","line":6513,"in_reply_to":"7a8ec9b2_c515ece5","updated":"2016-09-20 15:51:11.000000000","message":"I did some testing and this is unnecessary. The reason this is being implemented is so that the state is preserved properly when a resize is failed, thus rolling back a resize. \n\nBefore the state would get set to ACTIVE even though Power_state was shutdown and wasn\u0027t properly rolled back. Whenever the instance is paused or shelved_offloaded, the status and power_state remains correct after the exception stating that we can\u0027t resize the instance because of an incorrect vm_state (HTTP 409). So everything concerning those states is already handled properly and would be redundant and excessive here.","commit_id":"6c3bf021af7ff917ac301da6673f3097f19dd628"},{"author":{"_account_id":21813,"name":"Andrey Volkov","email":"m@amadev.ru","username":"avolkov"},"change_message_id":"b4e5c2aa229e6041f50cf3732deeef2e2a0f3ceb","unresolved":false,"context_lines":[{"line_number":6569,"context_line":"                                      instance_state\u003dinstance_state)"},{"line_number":6570,"context_line":"                LOG.info(_LI(\"Setting instance back to \""},{"line_number":6571,"context_line":"                             \"state: %(state)s, after: %(error)s\"),"},{"line_number":6572,"context_line":"                        {\u0027state\u0027: instance_state, \u0027error\u0027: error},"},{"line_number":6573,"context_line":"                        instance_uuid\u003dinstance_uuid)"},{"line_number":6574,"context_line":"                raise error.inner_exception"},{"line_number":6575,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":3,"id":"7a8ec9b2_2a83bfcd","line":6572,"updated":"2016-09-20 12:47:46.000000000","message":"Possibly, it would be nice to have instance.vm_state instead of instance_state in the log message.","commit_id":"6c3bf021af7ff917ac301da6673f3097f19dd628"},{"author":{"_account_id":22771,"name":"Christopher Martin","email":"cm876n@att.com","username":"cm876n"},"change_message_id":"84ef685fc6fe50bfe4c407de68b13b0c12f506e0","unresolved":false,"context_lines":[{"line_number":6569,"context_line":"                                      instance_state\u003dinstance_state)"},{"line_number":6570,"context_line":"                LOG.info(_LI(\"Setting instance back to \""},{"line_number":6571,"context_line":"                             \"state: %(state)s, after: %(error)s\"),"},{"line_number":6572,"context_line":"                        {\u0027state\u0027: instance_state, \u0027error\u0027: error},"},{"line_number":6573,"context_line":"                        instance_uuid\u003dinstance_uuid)"},{"line_number":6574,"context_line":"                raise error.inner_exception"},{"line_number":6575,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":3,"id":"7a8ec9b2_fd49a08f","line":6572,"in_reply_to":"7a8ec9b2_2a83bfcd","updated":"2016-09-20 15:51:11.000000000","message":"We have to use instance_state here because otherwise there could be discrepancies between what the log message outputs and what the instance state is actually updated to. For example there is a case in _resize_rollback that changes instance_state to vm_states.ERROR which it may not have been before. So to make sure we avoid that we just put instance_state in the log message.","commit_id":"6c3bf021af7ff917ac301da6673f3097f19dd628"},{"author":{"_account_id":21813,"name":"Andrey Volkov","email":"m@amadev.ru","username":"avolkov"},"change_message_id":"351a7ee8b20380ef45e67719cee2ba3a6afb11b8","unresolved":false,"context_lines":[{"line_number":6569,"context_line":"                                      instance_state\u003dinstance_state)"},{"line_number":6570,"context_line":"                LOG.info(_LI(\"Setting instance back to \""},{"line_number":6571,"context_line":"                             \"state: %(state)s, after: %(error)s\"),"},{"line_number":6572,"context_line":"                        {\u0027state\u0027: instance_state, \u0027error\u0027: error},"},{"line_number":6573,"context_line":"                        instance_uuid\u003dinstance_uuid)"},{"line_number":6574,"context_line":"                raise error.inner_exception"},{"line_number":6575,"context_line":"            else:"}],"source_content_type":"text/x-python","patch_set":3,"id":"7a8ec9b2_b7af08e2","line":6572,"in_reply_to":"7a8ec9b2_fd49a08f","updated":"2016-09-21 07:42:23.000000000","message":"That was my point. An operator sees the message \"Setting instance back to state active ...\" but the actual instance state in DB can be \"error\".","commit_id":"6c3bf021af7ff917ac301da6673f3097f19dd628"},{"author":{"_account_id":21813,"name":"Andrey Volkov","email":"m@amadev.ru","username":"avolkov"},"change_message_id":"b4e5c2aa229e6041f50cf3732deeef2e2a0f3ceb","unresolved":false,"context_lines":[{"line_number":6572,"context_line":"                        {\u0027state\u0027: instance_state, \u0027error\u0027: error},"},{"line_number":6573,"context_line":"                        instance_uuid\u003dinstance_uuid)"},{"line_number":6574,"context_line":"                raise error.inner_exception"},{"line_number":6575,"context_line":"            else:"},{"line_number":6576,"context_line":"                LOG.info(_LI(\"Setting instance back to ACTIVE after: %s\"),"},{"line_number":6577,"context_line":"                         error, instance_uuid\u003dinstance_uuid)"},{"line_number":6578,"context_line":"                self._instance_update(context, instance,"}],"source_content_type":"text/x-python","patch_set":3,"id":"7a8ec9b2_0ab9a3cb","line":6575,"updated":"2016-09-20 12:47:46.000000000","message":"It can be done without else.","commit_id":"6c3bf021af7ff917ac301da6673f3097f19dd628"},{"author":{"_account_id":22771,"name":"Christopher Martin","email":"cm876n@att.com","username":"cm876n"},"change_message_id":"84ef685fc6fe50bfe4c407de68b13b0c12f506e0","unresolved":false,"context_lines":[{"line_number":6572,"context_line":"                        {\u0027state\u0027: instance_state, \u0027error\u0027: error},"},{"line_number":6573,"context_line":"                        instance_uuid\u003dinstance_uuid)"},{"line_number":6574,"context_line":"                raise error.inner_exception"},{"line_number":6575,"context_line":"            else:"},{"line_number":6576,"context_line":"                LOG.info(_LI(\"Setting instance back to ACTIVE after: %s\"),"},{"line_number":6577,"context_line":"                         error, instance_uuid\u003dinstance_uuid)"},{"line_number":6578,"context_line":"                self._instance_update(context, instance,"}],"source_content_type":"text/x-python","patch_set":3,"id":"7a8ec9b2_fdb520d0","line":6575,"in_reply_to":"7a8ec9b2_0ab9a3cb","updated":"2016-09-20 15:51:11.000000000","message":"Done","commit_id":"6c3bf021af7ff917ac301da6673f3097f19dd628"},{"author":{"_account_id":20411,"name":"Julian","email":"julian.sy@att.com","username":"syjulian"},"change_message_id":"61832ef4d28792a408d265aa183b60e8e0524559","unresolved":false,"context_lines":[{"line_number":6565,"context_line":"            if instance.task_state \u003d\u003d task_states.RESIZE_MIGRATING:"},{"line_number":6566,"context_line":"                self._resize_rollback(context, instance,"},{"line_number":6567,"context_line":"                                      instance_state\u003dinstance_state)"},{"line_number":6568,"context_line":"                LOG.info(_LI(\"Setting instance back to \""},{"line_number":6569,"context_line":"                             \"state: %(state)s, after: %(error)s\"),"},{"line_number":6570,"context_line":"                        {\u0027state\u0027: instance.vm_state, \u0027error\u0027: error},"},{"line_number":6571,"context_line":"                        instance_uuid\u003dinstance_uuid)"}],"source_content_type":"text/x-python","patch_set":6,"id":"fa6399be_2de3c506","line":6568,"updated":"2016-10-19 14:01:34.000000000","message":"question: should this log happen before _resize_rollback? or maybe during the call?","commit_id":"d617b5be14cc9c58803da5cf6c7c2265b25da030"},{"author":{"_account_id":22771,"name":"Christopher Martin","email":"cm876n@att.com","username":"cm876n"},"change_message_id":"fd019cdb02317b076196437d8c6d13ad5e815346","unresolved":false,"context_lines":[{"line_number":6565,"context_line":"            if instance.task_state \u003d\u003d task_states.RESIZE_MIGRATING:"},{"line_number":6566,"context_line":"                self._resize_rollback(context, instance,"},{"line_number":6567,"context_line":"                                      instance_state\u003dinstance_state)"},{"line_number":6568,"context_line":"                LOG.info(_LI(\"Setting instance back to \""},{"line_number":6569,"context_line":"                             \"state: %(state)s, after: %(error)s\"),"},{"line_number":6570,"context_line":"                        {\u0027state\u0027: instance.vm_state, \u0027error\u0027: error},"},{"line_number":6571,"context_line":"                        instance_uuid\u003dinstance_uuid)"}],"source_content_type":"text/x-python","patch_set":6,"id":"fa6399be_32c4f65d","line":6568,"in_reply_to":"fa6399be_2507591d","updated":"2016-10-19 20:03:59.000000000","message":"not 100%","commit_id":"d617b5be14cc9c58803da5cf6c7c2265b25da030"},{"author":{"_account_id":22771,"name":"Christopher Martin","email":"cm876n@att.com","username":"cm876n"},"change_message_id":"882a9fc272621cc3302899e3d2d6b780c6de841c","unresolved":false,"context_lines":[{"line_number":6565,"context_line":"            if instance.task_state \u003d\u003d task_states.RESIZE_MIGRATING:"},{"line_number":6566,"context_line":"                self._resize_rollback(context, instance,"},{"line_number":6567,"context_line":"                                      instance_state\u003dinstance_state)"},{"line_number":6568,"context_line":"                LOG.info(_LI(\"Setting instance back to \""},{"line_number":6569,"context_line":"                             \"state: %(state)s, after: %(error)s\"),"},{"line_number":6570,"context_line":"                        {\u0027state\u0027: instance.vm_state, \u0027error\u0027: error},"},{"line_number":6571,"context_line":"                        instance_uuid\u003dinstance_uuid)"}],"source_content_type":"text/x-python","patch_set":6,"id":"fa6399be_b8d63525","line":6568,"in_reply_to":"fa6399be_2de3c506","updated":"2016-10-19 14:07:29.000000000","message":"The reason I did it after was because it\u0027s possible for \u0027_resize_rollback\u0027 to change what the \u0027instance.vm_state\u0027 is being set to (that is it could be different than the one passed into the \u0027_error_out_instance_on_exception\u0027 function). So whatever log I set, I want it to reflect that accurately. A potential compromise is having a log before and after that would still reflect that or having a log in each \u0027if\u0027 case in the \u0027_resize_rollback\u0027 function? Not sure which would be better","commit_id":"d617b5be14cc9c58803da5cf6c7c2265b25da030"},{"author":{"_account_id":22771,"name":"Christopher Martin","email":"cm876n@att.com","username":"cm876n"},"change_message_id":"f21e901c27fd8b03394dd6b0ae0e40dc77aca000","unresolved":false,"context_lines":[{"line_number":6565,"context_line":"            if instance.task_state \u003d\u003d task_states.RESIZE_MIGRATING:"},{"line_number":6566,"context_line":"                self._resize_rollback(context, instance,"},{"line_number":6567,"context_line":"                                      instance_state\u003dinstance_state)"},{"line_number":6568,"context_line":"                LOG.info(_LI(\"Setting instance back to \""},{"line_number":6569,"context_line":"                             \"state: %(state)s, after: %(error)s\"),"},{"line_number":6570,"context_line":"                        {\u0027state\u0027: instance.vm_state, \u0027error\u0027: error},"},{"line_number":6571,"context_line":"                        instance_uuid\u003dinstance_uuid)"}],"source_content_type":"text/x-python","patch_set":6,"id":"fa6399be_2507591d","line":6568,"in_reply_to":"fa6399be_a5b449f2","updated":"2016-10-19 14:53:54.000000000","message":"I\u0027m 100% sure but I would assume no, so I should probably move the log before _resize_rollback and then have a log before each _instance_update in the _resize_rollback function just to be sure","commit_id":"d617b5be14cc9c58803da5cf6c7c2265b25da030"},{"author":{"_account_id":20411,"name":"Julian","email":"julian.sy@att.com","username":"syjulian"},"change_message_id":"eb1ed01450c7a5e1bea728c5d1f0035534036769","unresolved":false,"context_lines":[{"line_number":6565,"context_line":"            if instance.task_state \u003d\u003d task_states.RESIZE_MIGRATING:"},{"line_number":6566,"context_line":"                self._resize_rollback(context, instance,"},{"line_number":6567,"context_line":"                                      instance_state\u003dinstance_state)"},{"line_number":6568,"context_line":"                LOG.info(_LI(\"Setting instance back to \""},{"line_number":6569,"context_line":"                             \"state: %(state)s, after: %(error)s\"),"},{"line_number":6570,"context_line":"                        {\u0027state\u0027: instance.vm_state, \u0027error\u0027: error},"},{"line_number":6571,"context_line":"                        instance_uuid\u003dinstance_uuid)"}],"source_content_type":"text/x-python","patch_set":6,"id":"fa6399be_a5b449f2","line":6568,"in_reply_to":"fa6399be_b8d63525","updated":"2016-10-19 14:43:19.000000000","message":"would the log not be called if the _instance_update throws an error?","commit_id":"d617b5be14cc9c58803da5cf6c7c2265b25da030"},{"author":{"_account_id":10224,"name":"Feodor Tersin","email":"ftersin@hotmail.com","username":"ftersin"},"change_message_id":"55db2e9078158b92793f61b9e022982589398187","unresolved":false,"context_lines":[{"line_number":6574,"context_line":"            LOG.info(_LI(\"Setting instance back to ACTIVE after: %s\"),"},{"line_number":6575,"context_line":"                     error, instance_uuid\u003dinstance_uuid)"},{"line_number":6576,"context_line":"            self._instance_update(context, instance,"},{"line_number":6577,"context_line":"                                  vm_state\u003dvm_states.ACTIVE,"},{"line_number":6578,"context_line":"                                  task_state\u003dNone)"},{"line_number":6579,"context_line":"            raise error.inner_exception"},{"line_number":6580,"context_line":"        except Exception:"}],"source_content_type":"text/x-python","patch_set":6,"id":"fa6399be_7372fe4a","line":6577,"updated":"2016-10-19 14:25:23.000000000","message":"Why not just to pass instance_state here?\n\nInstanceFaultRollback is raised in resize case only. So that the code you inserted above always intercepts execution flow and this code never works.\n\nInstanceFaultRollback is raised when nothing has yet done with the instance vm. So that restoring of the vm state with _resize_rollbacke makes no sense at the first glance.\n\nWhat did i miss?","commit_id":"d617b5be14cc9c58803da5cf6c7c2265b25da030"},{"author":{"_account_id":10224,"name":"Feodor Tersin","email":"ftersin@hotmail.com","username":"ftersin"},"change_message_id":"682a2efefa6af6f5e37b43ab7cc8a592e30989da","unresolved":false,"context_lines":[{"line_number":6574,"context_line":"            LOG.info(_LI(\"Setting instance back to ACTIVE after: %s\"),"},{"line_number":6575,"context_line":"                     error, instance_uuid\u003dinstance_uuid)"},{"line_number":6576,"context_line":"            self._instance_update(context, instance,"},{"line_number":6577,"context_line":"                                  vm_state\u003dvm_states.ACTIVE,"},{"line_number":6578,"context_line":"                                  task_state\u003dNone)"},{"line_number":6579,"context_line":"            raise error.inner_exception"},{"line_number":6580,"context_line":"        except Exception:"}],"source_content_type":"text/x-python","patch_set":6,"id":"ba5da102_ae7265ab","line":6577,"in_reply_to":"ba5da102_294779bc","updated":"2016-10-31 20:47:14.000000000","message":"I think yes, since we\u0027ve not found not working case. You may ask reviewers which looked at previous reviews (particularly mriedem). Perhaps they see something different.","commit_id":"d617b5be14cc9c58803da5cf6c7c2265b25da030"},{"author":{"_account_id":22771,"name":"Christopher Martin","email":"cm876n@att.com","username":"cm876n"},"change_message_id":"8a659ca10e510ed2dd3bf1100679de8bf31bc59d","unresolved":false,"context_lines":[{"line_number":6574,"context_line":"            LOG.info(_LI(\"Setting instance back to ACTIVE after: %s\"),"},{"line_number":6575,"context_line":"                     error, instance_uuid\u003dinstance_uuid)"},{"line_number":6576,"context_line":"            self._instance_update(context, instance,"},{"line_number":6577,"context_line":"                                  vm_state\u003dvm_states.ACTIVE,"},{"line_number":6578,"context_line":"                                  task_state\u003dNone)"},{"line_number":6579,"context_line":"            raise error.inner_exception"},{"line_number":6580,"context_line":"        except Exception:"}],"source_content_type":"text/x-python","patch_set":6,"id":"ba5da102_294779bc","line":6577,"in_reply_to":"ba5da102_f8b491d2","updated":"2016-10-27 13:49:30.000000000","message":"so basically, just call an instance update and pass in the vm_state and that should work for all cases for this bug unless I am missing something?","commit_id":"d617b5be14cc9c58803da5cf6c7c2265b25da030"},{"author":{"_account_id":22771,"name":"Christopher Martin","email":"cm876n@att.com","username":"cm876n"},"change_message_id":"b6efe4b1385a3f9f40619608bd26c9014285cb65","unresolved":false,"context_lines":[{"line_number":6574,"context_line":"            LOG.info(_LI(\"Setting instance back to ACTIVE after: %s\"),"},{"line_number":6575,"context_line":"                     error, instance_uuid\u003dinstance_uuid)"},{"line_number":6576,"context_line":"            self._instance_update(context, instance,"},{"line_number":6577,"context_line":"                                  vm_state\u003dvm_states.ACTIVE,"},{"line_number":6578,"context_line":"                                  task_state\u003dNone)"},{"line_number":6579,"context_line":"            raise error.inner_exception"},{"line_number":6580,"context_line":"        except Exception:"}],"source_content_type":"text/x-python","patch_set":6,"id":"da6895a0_d234bcfc","line":6577,"in_reply_to":"da6895a0_2418801d","updated":"2016-10-24 14:09:03.000000000","message":"Yea you are right it can only be called when no physical rollback is required. And yes I assume it may only be thrown before destroying","commit_id":"d617b5be14cc9c58803da5cf6c7c2265b25da030"},{"author":{"_account_id":10224,"name":"Feodor Tersin","email":"ftersin@hotmail.com","username":"ftersin"},"change_message_id":"e7eeed050b3379962627b1d1b8cde2ffac3992c6","unresolved":false,"context_lines":[{"line_number":6574,"context_line":"            LOG.info(_LI(\"Setting instance back to ACTIVE after: %s\"),"},{"line_number":6575,"context_line":"                     error, instance_uuid\u003dinstance_uuid)"},{"line_number":6576,"context_line":"            self._instance_update(context, instance,"},{"line_number":6577,"context_line":"                                  vm_state\u003dvm_states.ACTIVE,"},{"line_number":6578,"context_line":"                                  task_state\u003dNone)"},{"line_number":6579,"context_line":"            raise error.inner_exception"},{"line_number":6580,"context_line":"        except Exception:"}],"source_content_type":"text/x-python","patch_set":6,"id":"da6895a0_fc3b3c36","line":6577,"in_reply_to":"da6895a0_69892c26","updated":"2016-10-25 14:22:22.000000000","message":"But there is no case in which the function might \"rollback\" something. We assume that vm state is synced with db before resize operation is called. We know that vm state is not changed if we\u0027ve caught the exception.\n\nAm i again missing something?","commit_id":"d617b5be14cc9c58803da5cf6c7c2265b25da030"},{"author":{"_account_id":10224,"name":"Feodor Tersin","email":"ftersin@hotmail.com","username":"ftersin"},"change_message_id":"c0e59241c4288f2acee427129f7e8da7ae76c13a","unresolved":false,"context_lines":[{"line_number":6574,"context_line":"            LOG.info(_LI(\"Setting instance back to ACTIVE after: %s\"),"},{"line_number":6575,"context_line":"                     error, instance_uuid\u003dinstance_uuid)"},{"line_number":6576,"context_line":"            self._instance_update(context, instance,"},{"line_number":6577,"context_line":"                                  vm_state\u003dvm_states.ACTIVE,"},{"line_number":6578,"context_line":"                                  task_state\u003dNone)"},{"line_number":6579,"context_line":"            raise error.inner_exception"},{"line_number":6580,"context_line":"        except Exception:"}],"source_content_type":"text/x-python","patch_set":6,"id":"da6895a0_deceb559","line":6577,"in_reply_to":"da6895a0_99e8fb18","updated":"2016-10-21 14:37:24.000000000","message":"InstanceFaultRollback is used from inside migrate_disk_and_power_off methods only. migrate_disk_and_power_off is called from resize_instance method only. So the only usage of _error_out_instance_on_exception can lead to InstanceFaultRollback raising: resizing.","commit_id":"d617b5be14cc9c58803da5cf6c7c2265b25da030"},{"author":{"_account_id":10224,"name":"Feodor Tersin","email":"ftersin@hotmail.com","username":"ftersin"},"change_message_id":"84d6166709a948cc8d32602c30315032d6bc8c7e","unresolved":false,"context_lines":[{"line_number":6574,"context_line":"            LOG.info(_LI(\"Setting instance back to ACTIVE after: %s\"),"},{"line_number":6575,"context_line":"                     error, instance_uuid\u003dinstance_uuid)"},{"line_number":6576,"context_line":"            self._instance_update(context, instance,"},{"line_number":6577,"context_line":"                                  vm_state\u003dvm_states.ACTIVE,"},{"line_number":6578,"context_line":"                                  task_state\u003dNone)"},{"line_number":6579,"context_line":"            raise error.inner_exception"},{"line_number":6580,"context_line":"        except Exception:"}],"source_content_type":"text/x-python","patch_set":6,"id":"da6895a0_2418801d","line":6577,"in_reply_to":"da6895a0_be8901cd","updated":"2016-10-21 15:25:25.000000000","message":"Currently the exception is being thrown before start of any instance modification. The only exception is xenapi, which completely restores the instance, though. Because that we can assume that this is the contract of the exception usage: it can get thrown when no physical rollback is required only. I guess core team will not accept a change which throws the exception with other conditions.\n\nAs for _resize_rollback implementation - it restores guest vm state, but do nothing with volumes and vifs connections. Do you assume that the exception may only be thrown before their destroying?","commit_id":"d617b5be14cc9c58803da5cf6c7c2265b25da030"},{"author":{"_account_id":10224,"name":"Feodor Tersin","email":"ftersin@hotmail.com","username":"ftersin"},"change_message_id":"83d563aaf86fc9bea3522dc2e5b5fc203e8d6032","unresolved":false,"context_lines":[{"line_number":6574,"context_line":"            LOG.info(_LI(\"Setting instance back to ACTIVE after: %s\"),"},{"line_number":6575,"context_line":"                     error, instance_uuid\u003dinstance_uuid)"},{"line_number":6576,"context_line":"            self._instance_update(context, instance,"},{"line_number":6577,"context_line":"                                  vm_state\u003dvm_states.ACTIVE,"},{"line_number":6578,"context_line":"                                  task_state\u003dNone)"},{"line_number":6579,"context_line":"            raise error.inner_exception"},{"line_number":6580,"context_line":"        except Exception:"}],"source_content_type":"text/x-python","patch_set":6,"id":"da6895a0_e38722d5","line":6577,"in_reply_to":"da6895a0_d234bcfc","updated":"2016-10-25 09:33:04.000000000","message":"So, it\u0027s thrown when no rollback is required, and nothing is destroyed yet. Do you still think _resize_rollback has worth to be called here?","commit_id":"d617b5be14cc9c58803da5cf6c7c2265b25da030"},{"author":{"_account_id":22771,"name":"Christopher Martin","email":"cm876n@att.com","username":"cm876n"},"change_message_id":"13046861054fc4565f4d58896af09a2250cbd327","unresolved":false,"context_lines":[{"line_number":6574,"context_line":"            LOG.info(_LI(\"Setting instance back to ACTIVE after: %s\"),"},{"line_number":6575,"context_line":"                     error, instance_uuid\u003dinstance_uuid)"},{"line_number":6576,"context_line":"            self._instance_update(context, instance,"},{"line_number":6577,"context_line":"                                  vm_state\u003dvm_states.ACTIVE,"},{"line_number":6578,"context_line":"                                  task_state\u003dNone)"},{"line_number":6579,"context_line":"            raise error.inner_exception"},{"line_number":6580,"context_line":"        except Exception:"}],"source_content_type":"text/x-python","patch_set":6,"id":"da6895a0_be8901cd","line":6577,"in_reply_to":"da6895a0_deceb559","updated":"2016-10-21 14:41:06.000000000","message":"Yes that\u0027s exactly right, but the exception can get thrown at multiple points in the resize process which means that even if in the case specifically mentioned in the bug report that this patch is addressing there still needs to be some sort of \u0027rollback\u0027 code in relation to this exception and resizing","commit_id":"d617b5be14cc9c58803da5cf6c7c2265b25da030"},{"author":{"_account_id":22771,"name":"Christopher Martin","email":"cm876n@att.com","username":"cm876n"},"change_message_id":"4d280d4a59e0e8afd1c09325c2e3efb50a01dd03","unresolved":false,"context_lines":[{"line_number":6574,"context_line":"            LOG.info(_LI(\"Setting instance back to ACTIVE after: %s\"),"},{"line_number":6575,"context_line":"                     error, instance_uuid\u003dinstance_uuid)"},{"line_number":6576,"context_line":"            self._instance_update(context, instance,"},{"line_number":6577,"context_line":"                                  vm_state\u003dvm_states.ACTIVE,"},{"line_number":6578,"context_line":"                                  task_state\u003dNone)"},{"line_number":6579,"context_line":"            raise error.inner_exception"},{"line_number":6580,"context_line":"        except Exception:"}],"source_content_type":"text/x-python","patch_set":6,"id":"da6895a0_69892c26","line":6577,"in_reply_to":"da6895a0_e38722d5","updated":"2016-10-25 13:47:06.000000000","message":"Well I think what might solve this is if the function got renamed to more accurately reflect what it does then. There is still some \"rollback\" that is required just not in the sense that something got destroyed and needs to be reclaimed or that the instance was changed.\n\nHowever, the instance state still needs to be properly reset to the state before the resize was attempted. So I can probably simplify the function and rename it but it is still needed as it stands now.","commit_id":"d617b5be14cc9c58803da5cf6c7c2265b25da030"},{"author":{"_account_id":10224,"name":"Feodor Tersin","email":"ftersin@hotmail.com","username":"ftersin"},"change_message_id":"d2d0b2215943990bfcca4ef93a353f2fe7bf29f1","unresolved":false,"context_lines":[{"line_number":6574,"context_line":"            LOG.info(_LI(\"Setting instance back to ACTIVE after: %s\"),"},{"line_number":6575,"context_line":"                     error, instance_uuid\u003dinstance_uuid)"},{"line_number":6576,"context_line":"            self._instance_update(context, instance,"},{"line_number":6577,"context_line":"                                  vm_state\u003dvm_states.ACTIVE,"},{"line_number":6578,"context_line":"                                  task_state\u003dNone)"},{"line_number":6579,"context_line":"            raise error.inner_exception"},{"line_number":6580,"context_line":"        except Exception:"}],"source_content_type":"text/x-python","patch_set":6,"id":"ba5da102_f8b491d2","line":6577,"in_reply_to":"da6895a0_fc3b3c36","updated":"2016-10-26 06:32:48.000000000","message":"ps.\n\n\u003e the instance state still needs to be properly reset to the state before the resize was attempted\n\nIf you mean instance.vm_state, it may be restored w/o the function.","commit_id":"d617b5be14cc9c58803da5cf6c7c2265b25da030"},{"author":{"_account_id":22771,"name":"Christopher Martin","email":"cm876n@att.com","username":"cm876n"},"change_message_id":"51587d7c8def515ab3280d66c25c97cded706c57","unresolved":false,"context_lines":[{"line_number":6574,"context_line":"            LOG.info(_LI(\"Setting instance back to ACTIVE after: %s\"),"},{"line_number":6575,"context_line":"                     error, instance_uuid\u003dinstance_uuid)"},{"line_number":6576,"context_line":"            self._instance_update(context, instance,"},{"line_number":6577,"context_line":"                                  vm_state\u003dvm_states.ACTIVE,"},{"line_number":6578,"context_line":"                                  task_state\u003dNone)"},{"line_number":6579,"context_line":"            raise error.inner_exception"},{"line_number":6580,"context_line":"        except Exception:"}],"source_content_type":"text/x-python","patch_set":6,"id":"da6895a0_99e8fb18","line":6577,"in_reply_to":"fa6399be_04715a44","updated":"2016-10-20 18:15:00.000000000","message":"I was looking into it and _error_out_instance_on_exception is called 9 times in manager.py I don\u0027t see how it isn\u0027t possible that InstanceFaultRollback couldn\u0027t raise in other scenarios. Doing spot fixes for each of these scenarios in different places or at an API level maybe (if that would even solve all of the unforeseen bugs) doesn\u0027t make sense either. Here it\u0027s all in one function and covers all scenarios including the one we have now.","commit_id":"d617b5be14cc9c58803da5cf6c7c2265b25da030"},{"author":{"_account_id":22771,"name":"Christopher Martin","email":"cm876n@att.com","username":"cm876n"},"change_message_id":"027b8547b49a3f371b78ba8108f5a60898fbace1","unresolved":false,"context_lines":[{"line_number":6574,"context_line":"            LOG.info(_LI(\"Setting instance back to ACTIVE after: %s\"),"},{"line_number":6575,"context_line":"                     error, instance_uuid\u003dinstance_uuid)"},{"line_number":6576,"context_line":"            self._instance_update(context, instance,"},{"line_number":6577,"context_line":"                                  vm_state\u003dvm_states.ACTIVE,"},{"line_number":6578,"context_line":"                                  task_state\u003dNone)"},{"line_number":6579,"context_line":"            raise error.inner_exception"},{"line_number":6580,"context_line":"        except Exception:"}],"source_content_type":"text/x-python","patch_set":6,"id":"fa6399be_c5b77df3","line":6577,"in_reply_to":"fa6399be_7372fe4a","updated":"2016-10-19 14:43:08.000000000","message":"So to answer the first question you are right I could just take out the code that is never executed and remove the \u0027if\u0027 conditional from above. I didn\u0027t realize honestly that this only caught cases with a task_state of RESIZE_MIGRATING.\n\nTo answer the second question though we are not checking what was done with the instance vm, but instead checking what it was before which is why we pass in the vm_state to _error_out_instance_on_exception. This is so we can check the various cases in _resize_rollback to properly rollback the vm to what it was before the call to resize was made (and failed).\n\ntl;dr Without passing in vm_state, it would always reset to ACTIVE even if it wasn\u0027t active before or after.","commit_id":"d617b5be14cc9c58803da5cf6c7c2265b25da030"},{"author":{"_account_id":22771,"name":"Christopher Martin","email":"cm876n@att.com","username":"cm876n"},"change_message_id":"5e4515a9de774db6abd53193e6284c28c318ec9e","unresolved":false,"context_lines":[{"line_number":6574,"context_line":"            LOG.info(_LI(\"Setting instance back to ACTIVE after: %s\"),"},{"line_number":6575,"context_line":"                     error, instance_uuid\u003dinstance_uuid)"},{"line_number":6576,"context_line":"            self._instance_update(context, instance,"},{"line_number":6577,"context_line":"                                  vm_state\u003dvm_states.ACTIVE,"},{"line_number":6578,"context_line":"                                  task_state\u003dNone)"},{"line_number":6579,"context_line":"            raise error.inner_exception"},{"line_number":6580,"context_line":"        except Exception:"}],"source_content_type":"text/x-python","patch_set":6,"id":"fa6399be_be445a1b","line":6577,"in_reply_to":"fa6399be_7be014cd","updated":"2016-10-19 15:35:27.000000000","message":"The vm of an instance that was status SHUTOFF and power state SHUTDOWN then resized would fail obviously and afterwards the instance would have a status of ACTIVE but a power state of SHUTDOWN. The vm wouldn\u0027t actually be powered on, but would have a status of ACTIVE which is a disconnect and therefore the bug.\n\nThis change not only solves that case, but any other potential cases by properly rolling back both the status and power state, and even start the instance up again if necessary for a proper rollback. \n\nThat is why we can\u0027t just pass instance_state, we don\u0027t know what the power_state was and whether or not we need to start or stop the instance which requires more than just an instance_update. \n\nAlso as a unique case, if we have a power_state of NOSTATE then we have to actually change the instance_state from whatever was passed in to \u0027ERROR\u0027. This is why we can\u0027t just pass in instance_state to instance_update and walk away.\n\nAs far as what I got in my environment, if the vm was SHUTOFF and SHUTDOWN and then failed a resize, it would be reset to SHUTOFF and SHUTDOWN as expected with this change.","commit_id":"d617b5be14cc9c58803da5cf6c7c2265b25da030"},{"author":{"_account_id":10224,"name":"Feodor Tersin","email":"ftersin@hotmail.com","username":"ftersin"},"change_message_id":"83a5d7f9fd666cd66d5565213bb31dcdceaa4269","unresolved":false,"context_lines":[{"line_number":6574,"context_line":"            LOG.info(_LI(\"Setting instance back to ACTIVE after: %s\"),"},{"line_number":6575,"context_line":"                     error, instance_uuid\u003dinstance_uuid)"},{"line_number":6576,"context_line":"            self._instance_update(context, instance,"},{"line_number":6577,"context_line":"                                  vm_state\u003dvm_states.ACTIVE,"},{"line_number":6578,"context_line":"                                  task_state\u003dNone)"},{"line_number":6579,"context_line":"            raise error.inner_exception"},{"line_number":6580,"context_line":"        except Exception:"}],"source_content_type":"text/x-python","patch_set":6,"id":"fa6399be_04715a44","line":6577,"in_reply_to":"fa6399be_99031742","updated":"2016-10-20 09:36:27.000000000","message":"btw, i looked at other drivers and found that xenapi tries to resize disks down and restores state of vm in case of fault. This is the only driver which raises InstanceFaultRollback after doing some operations with the instance. But it rolls the instance back. So no need to do this here for xenapi as well.\n\nHowever i did not find any code changing instance\u0027s vm_state before raising of InstanceFaultRollback. It\u0027s mysteriously...","commit_id":"d617b5be14cc9c58803da5cf6c7c2265b25da030"},{"author":{"_account_id":10224,"name":"Feodor Tersin","email":"ftersin@hotmail.com","username":"ftersin"},"change_message_id":"1cc30650d4997b196cf9c706969d9608e4759bf8","unresolved":false,"context_lines":[{"line_number":6574,"context_line":"            LOG.info(_LI(\"Setting instance back to ACTIVE after: %s\"),"},{"line_number":6575,"context_line":"                     error, instance_uuid\u003dinstance_uuid)"},{"line_number":6576,"context_line":"            self._instance_update(context, instance,"},{"line_number":6577,"context_line":"                                  vm_state\u003dvm_states.ACTIVE,"},{"line_number":6578,"context_line":"                                  task_state\u003dNone)"},{"line_number":6579,"context_line":"            raise error.inner_exception"},{"line_number":6580,"context_line":"        except Exception:"}],"source_content_type":"text/x-python","patch_set":6,"id":"fa6399be_99031742","line":6577,"in_reply_to":"fa6399be_bb20e14a","updated":"2016-10-20 09:10:35.000000000","message":"There is a number of reasons why resize could fail. What i mean is that this fault (InstanceFaultRollback) may occur at resize preparation stage only, when nothing has been happened with the instance itself yet. (It is not very good to do such essentially preliminary checks from inside migrate_disk_and_power_off driver method instead of to do them at api level together with checks of allowed instance state, flavor availability, etc, ... but ... it is a separate question not for this review)\n\nSo yes, i think none of this rollback operations is necessary. Except the vm_state recovery, which might be investigated separately (this code was added... why?)","commit_id":"d617b5be14cc9c58803da5cf6c7c2265b25da030"},{"author":{"_account_id":10224,"name":"Feodor Tersin","email":"ftersin@hotmail.com","username":"ftersin"},"change_message_id":"f26f95de52a41cc4871766489a1d54bd946dc4b6","unresolved":false,"context_lines":[{"line_number":6574,"context_line":"            LOG.info(_LI(\"Setting instance back to ACTIVE after: %s\"),"},{"line_number":6575,"context_line":"                     error, instance_uuid\u003dinstance_uuid)"},{"line_number":6576,"context_line":"            self._instance_update(context, instance,"},{"line_number":6577,"context_line":"                                  vm_state\u003dvm_states.ACTIVE,"},{"line_number":6578,"context_line":"                                  task_state\u003dNone)"},{"line_number":6579,"context_line":"            raise error.inner_exception"},{"line_number":6580,"context_line":"        except Exception:"}],"source_content_type":"text/x-python","patch_set":6,"id":"fa6399be_cf7156aa","line":6577,"in_reply_to":"fa6399be_be445a1b","updated":"2016-10-19 16:36:53.000000000","message":"But the fix does properly rolling back in the case of InstanceFaultRollback only. We know that nothing has been changed in this case.\n\nIf once we get something changed, though, it will be a breaking contract bug. And we eigher fix it, or change the contract.\n\nIf resize is called when vm and db is already not in sync, it is not a deal for resize operation to fix it, because _sync_power_states task exists for that.\n\nDo you know other cases when _resize_rollback is really needed?\n\nWhat i see is the enormous source file (manager.py) with muddy complex logic, which becomes more complex with this fix. But i do not see strong reasons for that. \u0027potential cases\u0027 are not them for me, while they are too potential and abstract.\n\nCurrently i even wonder why we have instance_state parameter for _error_out_instance_on_exception. Why would do not touch vm_state at all in both InstanceFaultRollback and NotImplementedError handlers?","commit_id":"d617b5be14cc9c58803da5cf6c7c2265b25da030"},{"author":{"_account_id":10224,"name":"Feodor Tersin","email":"ftersin@hotmail.com","username":"ftersin"},"change_message_id":"36ad8127bb927312b1abe2288ee01cb7cbd2ef29","unresolved":false,"context_lines":[{"line_number":6574,"context_line":"            LOG.info(_LI(\"Setting instance back to ACTIVE after: %s\"),"},{"line_number":6575,"context_line":"                     error, instance_uuid\u003dinstance_uuid)"},{"line_number":6576,"context_line":"            self._instance_update(context, instance,"},{"line_number":6577,"context_line":"                                  vm_state\u003dvm_states.ACTIVE,"},{"line_number":6578,"context_line":"                                  task_state\u003dNone)"},{"line_number":6579,"context_line":"            raise error.inner_exception"},{"line_number":6580,"context_line":"        except Exception:"}],"source_content_type":"text/x-python","patch_set":6,"id":"fa6399be_7be014cd","line":6577,"in_reply_to":"fa6399be_c5b77df3","updated":"2016-10-19 15:24:32.000000000","message":"You could search for InstanceFaultRollback usages. All they are in migrate_disk_and_power_off, which is called from resize_instance only.\n\nWe are not checking, right. But we could rely on a contract of resize operation, which might say that the exception may be rised when vm state is only not changed yet.\n\nWhat did you get in your environment? Was the vm of a stopped instance powered on in _error_out_instance_on_exception? If not and if we do not see a code changes the vm state before InstanceFaultRollback, then there is probably no reason to have the big complex restore operation having no chances to work.\n\nWhat wrong will happen if you pass instance_state argument here instead of vm_state.ACTIVE, not calling of _resize_rollback?","commit_id":"d617b5be14cc9c58803da5cf6c7c2265b25da030"},{"author":{"_account_id":22771,"name":"Christopher Martin","email":"cm876n@att.com","username":"cm876n"},"change_message_id":"fd019cdb02317b076196437d8c6d13ad5e815346","unresolved":false,"context_lines":[{"line_number":6574,"context_line":"            LOG.info(_LI(\"Setting instance back to ACTIVE after: %s\"),"},{"line_number":6575,"context_line":"                     error, instance_uuid\u003dinstance_uuid)"},{"line_number":6576,"context_line":"            self._instance_update(context, instance,"},{"line_number":6577,"context_line":"                                  vm_state\u003dvm_states.ACTIVE,"},{"line_number":6578,"context_line":"                                  task_state\u003dNone)"},{"line_number":6579,"context_line":"            raise error.inner_exception"},{"line_number":6580,"context_line":"        except Exception:"}],"source_content_type":"text/x-python","patch_set":6,"id":"fa6399be_bb20e14a","line":6577,"in_reply_to":"fa6399be_cf7156aa","updated":"2016-10-19 20:03:59.000000000","message":"So what you are saying then is instead make it so the user can\u0027t even call a resize in situations where it would fail so none of this is even necessary, right?","commit_id":"d617b5be14cc9c58803da5cf6c7c2265b25da030"},{"author":{"_account_id":7634,"name":"Takashi Natsume","email":"takanattie@gmail.com","username":"natsumet"},"change_message_id":"11a2405ed245a11ced763a7288ee0726fc115819","unresolved":false,"context_lines":[{"line_number":6586,"context_line":"        except exception.InstanceFaultRollback as error:"},{"line_number":6587,"context_line":"            if quotas:"},{"line_number":6588,"context_line":"                quotas.rollback()"},{"line_number":6589,"context_line":"            LOG.info(_LI(\"Setting instance back to ACTIVE after: %s\"),"},{"line_number":6590,"context_line":"                     error, instance_uuid\u003dinstance_uuid)"},{"line_number":6591,"context_line":"            self._instance_update(context, instance,"},{"line_number":6592,"context_line":"                                  vm_state\u003dinstance_state,"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a629dbe_fbccf06b","line":6589,"range":{"start_line":6589,"start_character":51,"end_line":6589,"end_character":57},"updated":"2016-11-10 05:59:03.000000000","message":"It should be fixed.","commit_id":"63c49c07d5273cb41b88e74da2c898912fcedfbf"},{"author":{"_account_id":22771,"name":"Christopher Martin","email":"cm876n@att.com","username":"cm876n"},"change_message_id":"ba2d5dc778fa9d3bbf54524db87204bb6eee0eeb","unresolved":false,"context_lines":[{"line_number":6586,"context_line":"        except exception.InstanceFaultRollback as error:"},{"line_number":6587,"context_line":"            if quotas:"},{"line_number":6588,"context_line":"                quotas.rollback()"},{"line_number":6589,"context_line":"            LOG.info(_LI(\"Setting instance back to ACTIVE after: %s\"),"},{"line_number":6590,"context_line":"                     error, instance_uuid\u003dinstance_uuid)"},{"line_number":6591,"context_line":"            self._instance_update(context, instance,"},{"line_number":6592,"context_line":"                                  vm_state\u003dinstance_state,"}],"source_content_type":"text/x-python","patch_set":7,"id":"9a629dbe_c446564e","line":6589,"range":{"start_line":6589,"start_character":51,"end_line":6589,"end_character":57},"in_reply_to":"9a629dbe_fbccf06b","updated":"2016-11-10 14:41:24.000000000","message":"Good catch, I\u0027ll fix that real quick","commit_id":"63c49c07d5273cb41b88e74da2c898912fcedfbf"},{"author":{"_account_id":19298,"name":"Nicolas Bock","email":"nicolas.bock@canonical.com","username":"nicolasbock"},"change_message_id":"3f6e789e96eea24333ae37dcec91b5bcf8ce201b","unresolved":false,"context_lines":[{"line_number":3764,"context_line":"                                                  reservations,"},{"line_number":3765,"context_line":"                                                  instance\u003dinstance)"},{"line_number":3766,"context_line":"        with self._error_out_instance_on_exception(context, instance,"},{"line_number":3767,"context_line":"                            quotas\u003dquotas, instance_state\u003dinstance.vm_state):"},{"line_number":3768,"context_line":"            # TODO(chaochin) Remove this until v5 RPC API"},{"line_number":3769,"context_line":"            # Code downstream may expect extra_specs to be populated since it"},{"line_number":3770,"context_line":"            # is receiving an object, so lookup the flavor to ensure this."}],"source_content_type":"text/x-python","patch_set":8,"id":"9a629dbe_14db1750","line":3767,"updated":"2016-11-10 16:11:39.000000000","message":"According to pep8 this line is underindented. Are we requiring it to be indented according to pep8?","commit_id":"a2ebe2837efe06685c9503e1b5cd49f8472fd63b"},{"author":{"_account_id":22771,"name":"Christopher Martin","email":"cm876n@att.com","username":"cm876n"},"change_message_id":"078d2b1ad1a9fc522a485c50efa1d1e8239803a2","unresolved":false,"context_lines":[{"line_number":3764,"context_line":"                                                  reservations,"},{"line_number":3765,"context_line":"                                                  instance\u003dinstance)"},{"line_number":3766,"context_line":"        with self._error_out_instance_on_exception(context, instance,"},{"line_number":3767,"context_line":"                            quotas\u003dquotas, instance_state\u003dinstance.vm_state):"},{"line_number":3768,"context_line":"            # TODO(chaochin) Remove this until v5 RPC API"},{"line_number":3769,"context_line":"            # Code downstream may expect extra_specs to be populated since it"},{"line_number":3770,"context_line":"            # is receiving an object, so lookup the flavor to ensure this."}],"source_content_type":"text/x-python","patch_set":8,"id":"9a629dbe_f47f83dd","line":3767,"in_reply_to":"9a629dbe_14db1750","updated":"2016-11-10 16:16:03.000000000","message":"When I ran pep8 I didn\u0027t get anything thrown at me, but I could just put quotas\u003dquotas and instance_state on new lines and indent them over to be in line with context?","commit_id":"a2ebe2837efe06685c9503e1b5cd49f8472fd63b"},{"author":{"_account_id":19298,"name":"Nicolas Bock","email":"nicolas.bock@canonical.com","username":"nicolasbock"},"change_message_id":"1ad19206f20d2097f459f73936017dcc127f4047","unresolved":false,"context_lines":[{"line_number":3764,"context_line":"                                                  reservations,"},{"line_number":3765,"context_line":"                                                  instance\u003dinstance)"},{"line_number":3766,"context_line":"        with self._error_out_instance_on_exception(context, instance,"},{"line_number":3767,"context_line":"                            quotas\u003dquotas, instance_state\u003dinstance.vm_state):"},{"line_number":3768,"context_line":"            # TODO(chaochin) Remove this until v5 RPC API"},{"line_number":3769,"context_line":"            # Code downstream may expect extra_specs to be populated since it"},{"line_number":3770,"context_line":"            # is receiving an object, so lookup the flavor to ensure this."}],"source_content_type":"text/x-python","patch_set":8,"id":"9a629dbe_ed889673","line":3767,"in_reply_to":"9a629dbe_f47f83dd","updated":"2016-11-10 17:04:24.000000000","message":"Yes, that would work. Thanks!","commit_id":"a2ebe2837efe06685c9503e1b5cd49f8472fd63b"},{"author":{"_account_id":10224,"name":"Feodor Tersin","email":"ftersin@hotmail.com","username":"ftersin"},"change_message_id":"44d28a4faf83bdd53e6189f86086932dd0d18839","unresolved":false,"context_lines":[{"line_number":3764,"context_line":"                                                  reservations,"},{"line_number":3765,"context_line":"                                                  instance\u003dinstance)"},{"line_number":3766,"context_line":"        with self._error_out_instance_on_exception(context, instance,"},{"line_number":3767,"context_line":"                    quotas\u003dquotas, instance_state\u003dinstance.vm_state):"},{"line_number":3768,"context_line":"            # TODO(chaochin) Remove this until v5 RPC API"},{"line_number":3769,"context_line":"            # Code downstream may expect extra_specs to be populated since it"},{"line_number":3770,"context_line":"            # is receiving an object, so lookup the flavor to ensure this."}],"source_content_type":"text/x-python","patch_set":9,"id":"9a629dbe_033e7627","line":3767,"updated":"2016-11-10 20:51:09.000000000","message":"nit:\n\n with self._error_out_instance_on_exception(\n         context, instance, quotas\u003dquotas,\n         instance_state\u003dinstance.vm_state):\n\nwould be better","commit_id":"0f36cc90dd6161c2fb75db3b04e7728ee94994f6"}],"nova/tests/unit/compute/test_compute_mgr.py":[{"author":{"_account_id":21813,"name":"Andrey Volkov","email":"m@amadev.ru","username":"avolkov"},"change_message_id":"b4e5c2aa229e6041f50cf3732deeef2e2a0f3ceb","unresolved":false,"context_lines":[{"line_number":2840,"context_line":"            raise exception.InstanceFaultRollback("},{"line_number":2841,"context_line":"                inner_exception\u003dtest.TestingException(\u0027test\u0027))"},{"line_number":2842,"context_line":""},{"line_number":2843,"context_line":"    # @mock.patch(\u0027nova.compute.manager.ComputeManager._instance_update\u0027)"},{"line_number":2844,"context_line":"    @mock.patch(\u0027nova.compute.manager.ComputeManager._resize_rollback\u0027)"},{"line_number":2845,"context_line":"    def test_error_out_instance_on_exception_inst_fault_rollback(self,"},{"line_number":2846,"context_line":"                                                        resize_mock):"}],"source_content_type":"text/x-python","patch_set":3,"id":"7a8ec9b2_05f1946a","line":2843,"updated":"2016-09-20 12:47:46.000000000","message":"nit: commented code","commit_id":"6c3bf021af7ff917ac301da6673f3097f19dd628"},{"author":{"_account_id":22771,"name":"Christopher Martin","email":"cm876n@att.com","username":"cm876n"},"change_message_id":"84ef685fc6fe50bfe4c407de68b13b0c12f506e0","unresolved":false,"context_lines":[{"line_number":2840,"context_line":"            raise exception.InstanceFaultRollback("},{"line_number":2841,"context_line":"                inner_exception\u003dtest.TestingException(\u0027test\u0027))"},{"line_number":2842,"context_line":""},{"line_number":2843,"context_line":"    # @mock.patch(\u0027nova.compute.manager.ComputeManager._instance_update\u0027)"},{"line_number":2844,"context_line":"    @mock.patch(\u0027nova.compute.manager.ComputeManager._resize_rollback\u0027)"},{"line_number":2845,"context_line":"    def test_error_out_instance_on_exception_inst_fault_rollback(self,"},{"line_number":2846,"context_line":"                                                        resize_mock):"}],"source_content_type":"text/x-python","patch_set":3,"id":"7a8ec9b2_cb441db9","line":2843,"in_reply_to":"7a8ec9b2_05f1946a","updated":"2016-09-20 15:51:11.000000000","message":"Done","commit_id":"6c3bf021af7ff917ac301da6673f3097f19dd628"}]}
