)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"875b4856b94ecc621180f0069ad726c1a550c66e","unresolved":false,"context_lines":[{"line_number":10,"context_line":"the instance vm_state will be set to ACTIVE instead of its"},{"line_number":11,"context_line":"initial state."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"This patch fix it."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Change-Id: I19f718ff84012c70e8549125e4a7dfdab1762763"},{"line_number":16,"context_line":"Closes-Bug: #1475112"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"9a41bdd9_78b8612a","line":13,"updated":"2015-07-16 06:02:23.000000000","message":"You do not need this line :)\n\nPlease add in a unit test","commit_id":"55971a9f8b141cbee82399d18a8e0013bbfb2a53"},{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"637b304bc05f9054147378f66922fdfb4cd797eb","unresolved":false,"context_lines":[{"line_number":12,"context_line":"set back to instances\u0027 initial vm_state befor resizing."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Change-Id: I19f718ff84012c70e8549125e4a7dfdab1762763"},{"line_number":15,"context_line":"Closes-Bug: #bug/1475112"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":9,"id":"3a50d1a3_062ce948","line":15,"updated":"2015-07-27 06:44:50.000000000","message":"http://docs.openstack.org/infra/manual/developers.html\n\nCloses-Bug: xxxxxxx","commit_id":"a3f3fff9d3c99fb507002bfb33454b23269133a6"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"877612c075f3db4476c8ebb80ef665116d8df08e","unresolved":false,"context_lines":[{"line_number":12,"context_line":"set back to instances\u0027 initial vm_state befor resizing."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Change-Id: I19f718ff84012c70e8549125e4a7dfdab1762763"},{"line_number":15,"context_line":"Closes-Bug: bug/1475112"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":11,"id":"3a50d1a3_d9567729","line":15,"updated":"2015-07-29 01:26:07.000000000","message":"This link doesn\u0027t work, drop the bug/ part.","commit_id":"5f51dbc72f984e95fc5e08049d90759873dbe91f"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"19e6db9487be8c30bf048781e8b1db850a6e05cb","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Resize: Return to initial state instead of ACTIVE when resize fails"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Currently, when instance faild to resize due to down resize,"},{"line_number":10,"context_line":"the instance vm_state will be set to ACTIVE instead of its"},{"line_number":11,"context_line":"initial state. This patch fix it and the vm_state will be"},{"line_number":12,"context_line":"set back to instances\u0027 initial vm_state befor resizing."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":12,"id":"3a50d1a3_06018239","line":9,"updated":"2015-07-30 14:30:00.000000000","message":"type: failed","commit_id":"d3a7201ffbe8c3e32e6fb04adf39487604b2e46d"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"19e6db9487be8c30bf048781e8b1db850a6e05cb","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Currently, when instance faild to resize due to down resize,"},{"line_number":10,"context_line":"the instance vm_state will be set to ACTIVE instead of its"},{"line_number":11,"context_line":"initial state. This patch fix it and the vm_state will be"},{"line_number":12,"context_line":"set back to instances\u0027 initial vm_state befor resizing."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Change-Id: I19f718ff84012c70e8549125e4a7dfdab1762763"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":12,"id":"3a50d1a3_a698ce1c","line":11,"updated":"2015-07-30 14:30:00.000000000","message":"typo: fixes","commit_id":"d3a7201ffbe8c3e32e6fb04adf39487604b2e46d"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"19e6db9487be8c30bf048781e8b1db850a6e05cb","unresolved":false,"context_lines":[{"line_number":9,"context_line":"Currently, when instance faild to resize due to down resize,"},{"line_number":10,"context_line":"the instance vm_state will be set to ACTIVE instead of its"},{"line_number":11,"context_line":"initial state. This patch fix it and the vm_state will be"},{"line_number":12,"context_line":"set back to instances\u0027 initial vm_state befor resizing."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Change-Id: I19f718ff84012c70e8549125e4a7dfdab1762763"},{"line_number":15,"context_line":"Closes-Bug: 1475112"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":12,"id":"3a50d1a3_66eba679","line":12,"updated":"2015-07-30 14:30:00.000000000","message":"typo: before","commit_id":"d3a7201ffbe8c3e32e6fb04adf39487604b2e46d"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"2917d3c13b895a306f4079e86beebc0fe13921d4","unresolved":false,"context_lines":[{"line_number":9,"context_line":"Currently, when instance failed to resize due to down resize,"},{"line_number":10,"context_line":"the instance vm_state will be set to ACTIVE instead of its"},{"line_number":11,"context_line":"initial state. This patch fixes it and the vm_state will be"},{"line_number":12,"context_line":"set back to instances\u0027 initial vm_state before resizing."},{"line_number":13,"context_line":""},{"line_number":14,"context_line":"Co-Authored-By: wangxiyuan \u003cwangxiyuan@huawei.com\u003e"},{"line_number":15,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":28,"id":"fa1b9901_66c9beab","line":12,"updated":"2015-08-20 16:48:56.000000000","message":"This change doesn\u0027t quite do that any more, can we please update this?","commit_id":"99899b81001ba35d4fadf0548a2d4e815caabc23"},{"author":{"_account_id":12898,"name":"Tony Breeds","email":"tony@bakeyournoodle.com","username":"tonyb"},"change_message_id":"bbf33ab1a27f9e3bebac8f553a8668b347ccaa29","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Resize: Return to initial state instead of ACTIVE when resize fails"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Currently, when instance failed to resize due to down resize,"},{"line_number":10,"context_line":"the instance vm_state will be set to ACTIVE instead of its"},{"line_number":11,"context_line":"initial state. This patch fixes it and the vm_state will be"},{"line_number":12,"context_line":"set both the vm_state and power_state to the correct state"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":30,"id":"fa1b9901_1b53666c","line":9,"updated":"2015-08-21 03:55:24.000000000","message":"I think something like:\n\"Currently, when an instance fails to resize\" ....\nreads slightly better.","commit_id":"d641b1081c2f163907c82f490b1549a52cb9afd5"},{"author":{"_account_id":12898,"name":"Tony Breeds","email":"tony@bakeyournoodle.com","username":"tonyb"},"change_message_id":"be9b693f7e8b545bcaac22fb45d5ad8bbfb79f0c","unresolved":false,"context_lines":[{"line_number":11,"context_line":"This patch fixes it and the vm_state will be set both the"},{"line_number":12,"context_line":"vm_state and power_state to the correct state according to"},{"line_number":13,"context_line":"different scenario."},{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Co-Authored-By: wangxiyuan \u003cwangxiyuan@huawei.com\u003e"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"Change-Id: I19f718ff84012c70e8549125e4a7dfdab1762763"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":33,"id":"da20952f_2852a067","line":14,"updated":"2015-09-07 06:57:51.000000000","message":"Needs DocImpact","commit_id":"fc06aa7915bb8b9e405efe09c286b9394879b4b9"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"65aefd0bdda6f53127f32c42d5545a1530c4e486","unresolved":false,"context_lines":[{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Co-Authored-By: wangxiyuan \u003cwangxiyuan@huawei.com\u003e"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"DocImpact:"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"Change-Id: I19f718ff84012c70e8549125e4a7dfdab1762763"},{"line_number":20,"context_line":"Closes-Bug: #1475112"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":39,"id":"da20952f_8d50480c","line":17,"updated":"2015-09-09 06:11:49.000000000","message":"Thanks","commit_id":"cca1f3109fcb7933575882b12b3ead2f8dc15069"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"7f83322f8de761ab39fb4e2ccb1f2322fbf9d32c","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Zhenyu Zheng \u003czhengzhenyu@huawei.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2015-10-15 01:36:09 +0000"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Resize: Return to initial state instead of ACTIVE when resize fails"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Currently, when an instance fails to resize, the instance"},{"line_number":10,"context_line":"vm_state will be set to ACTIVE instead of its initial state."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":54,"id":"fa80f949_67d94283","line":7,"updated":"2015-11-05 02:25:05.000000000","message":"This is really doing more than just resetting the vm_state (which from what I can tell from the bug report was just to revert back to stopped if you started the resize from stopped) - it\u0027s now also trying to recover, which is more complicated.\n\nI think the title and commit message needs more detail about why we\u0027re attempting a recovery here now rather than just resetting the instance.vm_state.","commit_id":"c68921cba270c7973a5982bd149cb82897526a4a"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"7f83322f8de761ab39fb4e2ccb1f2322fbf9d32c","unresolved":false,"context_lines":[{"line_number":14,"context_line":""},{"line_number":15,"context_line":"Co-Authored-By: wangxiyuan \u003cwangxiyuan@huawei.com\u003e"},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"DocImpact:"},{"line_number":18,"context_line":""},{"line_number":19,"context_line":"Change-Id: I19f718ff84012c70e8549125e4a7dfdab1762763"},{"line_number":20,"context_line":"Closes-Bug: #1475112"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":54,"id":"fa80f949_8cb6cd88","line":17,"updated":"2015-11-05 02:25:05.000000000","message":"What is the doc impact? This tag creates a bug against the documentation project so you\u0027re supposed to provide information here about what the impact is for the docs writers (which is not the nova team).","commit_id":"c68921cba270c7973a5982bd149cb82897526a4a"}],"nova/compute/manager.py":[{"author":{"_account_id":14101,"name":"yapeng Yang","email":"a394954369@gmail.com","username":"yapeng"},"change_message_id":"2b743503451b1f7fa10cf7b054d2f3445c7a7f51","unresolved":false,"context_lines":[{"line_number":6098,"context_line":"            if quotas:"},{"line_number":6099,"context_line":"                quotas.rollback()"},{"line_number":6100,"context_line":"                old_state \u003d instance.system_metadata.get(\u0027old_vm_state\u0027)"},{"line_number":6101,"context_line":"                if old_state \u003d\u003d \u0027stopped\u0027:"},{"line_number":6102,"context_line":"                    vm_state \u003d vm_states.STOPPED"},{"line_number":6103,"context_line":"                else:"},{"line_number":6104,"context_line":"                    vm_state \u003d vm_states.ACTIVE"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a41bdd9_1ef49358","line":6101,"updated":"2015-07-16 10:47:42.000000000","message":"this shoud be shutoff,i think.","commit_id":"55971a9f8b141cbee82399d18a8e0013bbfb2a53"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"81fbfdd4344ea72647fa52faf09e55ef1091f493","unresolved":false,"context_lines":[{"line_number":6098,"context_line":"            if quotas:"},{"line_number":6099,"context_line":"                quotas.rollback()"},{"line_number":6100,"context_line":"                old_state \u003d instance.system_metadata.get(\u0027old_vm_state\u0027)"},{"line_number":6101,"context_line":"                if old_state \u003d\u003d \u0027stopped\u0027:"},{"line_number":6102,"context_line":"                    vm_state \u003d vm_states.STOPPED"},{"line_number":6103,"context_line":"                else:"},{"line_number":6104,"context_line":"                    vm_state \u003d vm_states.ACTIVE"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a41bdd9_9f9b9472","line":6101,"in_reply_to":"9a41bdd9_1ef49358","updated":"2015-07-17 02:41:30.000000000","message":"Thank your for your review, the state shows as SHUTOFF when using nova-list, but the actual vm_state is stopped, you can check using nova show, and also in vm_state.py .","commit_id":"55971a9f8b141cbee82399d18a8e0013bbfb2a53"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"875b4856b94ecc621180f0069ad726c1a550c66e","unresolved":false,"context_lines":[{"line_number":6103,"context_line":"                else:"},{"line_number":6104,"context_line":"                    vm_state \u003d vm_states.ACTIVE"},{"line_number":6105,"context_line":"            LOG.info(_LI(\"Setting instance back to it\u0027s initial \""},{"line_number":6106,"context_line":"                         \"state after: %s\"),"},{"line_number":6107,"context_line":"                     error, instance_uuid\u003dinstance_uuid)"},{"line_number":6108,"context_line":"            self._instance_update(context, instance_uuid,"},{"line_number":6109,"context_line":"                                  vm_state\u003dvm_state,"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a41bdd9_58a1ddf6","line":6106,"updated":"2015-07-16 06:02:23.000000000","message":"Can you please add the current state and the new state. That would at least let the admin know the state changes","commit_id":"55971a9f8b141cbee82399d18a8e0013bbfb2a53"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"81fbfdd4344ea72647fa52faf09e55ef1091f493","unresolved":false,"context_lines":[{"line_number":6103,"context_line":"                else:"},{"line_number":6104,"context_line":"                    vm_state \u003d vm_states.ACTIVE"},{"line_number":6105,"context_line":"            LOG.info(_LI(\"Setting instance back to it\u0027s initial \""},{"line_number":6106,"context_line":"                         \"state after: %s\"),"},{"line_number":6107,"context_line":"                     error, instance_uuid\u003dinstance_uuid)"},{"line_number":6108,"context_line":"            self._instance_update(context, instance_uuid,"},{"line_number":6109,"context_line":"                                  vm_state\u003dvm_state,"}],"source_content_type":"text/x-python","patch_set":2,"id":"9a41bdd9_ffb2e005","line":6106,"in_reply_to":"9a41bdd9_58a1ddf6","updated":"2015-07-17 02:41:30.000000000","message":"Done","commit_id":"55971a9f8b141cbee82399d18a8e0013bbfb2a53"},{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"637b304bc05f9054147378f66922fdfb4cd797eb","unresolved":false,"context_lines":[{"line_number":6122,"context_line":"                         \"state: %(state)s, after: %(error)s\"),"},{"line_number":6123,"context_line":"                    {\u0027state\u0027: init_state, \u0027error\u0027: error},"},{"line_number":6124,"context_line":"                    instance_uuid\u003dinstance_uuid)"},{"line_number":6125,"context_line":"            if init_state \u003d\u003d \u0027stopped\u0027:"},{"line_number":6126,"context_line":"                self._instance_update(context, instance_uuid,"},{"line_number":6127,"context_line":"                                    vm_state\u003dvm_states.STOPPED,"},{"line_number":6128,"context_line":"                                    task_state\u003dNone)"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a50d1a3_46fc313e","line":6125,"updated":"2015-07-27 06:44:50.000000000","message":"I think we\u0027d better use vm_states.STOPPED","commit_id":"a3f3fff9d3c99fb507002bfb33454b23269133a6"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"7876474bb4f71ba18e18d1097960011f721e3f0b","unresolved":false,"context_lines":[{"line_number":6122,"context_line":"                         \"state: %(state)s, after: %(error)s\"),"},{"line_number":6123,"context_line":"                    {\u0027state\u0027: init_state, \u0027error\u0027: error},"},{"line_number":6124,"context_line":"                    instance_uuid\u003dinstance_uuid)"},{"line_number":6125,"context_line":"            if init_state \u003d\u003d \u0027stopped\u0027:"},{"line_number":6126,"context_line":"                self._instance_update(context, instance_uuid,"},{"line_number":6127,"context_line":"                                    vm_state\u003dvm_states.STOPPED,"},{"line_number":6128,"context_line":"                                    task_state\u003dNone)"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a50d1a3_c1258b5c","line":6125,"in_reply_to":"3a50d1a3_46fc313e","updated":"2015-07-27 07:02:14.000000000","message":"Done","commit_id":"a3f3fff9d3c99fb507002bfb33454b23269133a6"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"877612c075f3db4476c8ebb80ef665116d8df08e","unresolved":false,"context_lines":[{"line_number":6142,"context_line":""},{"line_number":6143,"context_line":"    @contextlib.contextmanager"},{"line_number":6144,"context_line":"    def _error_out_instance_on_exception(self, context, instance,"},{"line_number":6145,"context_line":"                                         quotas\u003dNone,"},{"line_number":6146,"context_line":"                                         instance_state\u003dvm_states.ACTIVE):"},{"line_number":6147,"context_line":"        instance_uuid \u003d instance.uuid"},{"line_number":6148,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":11,"id":"3a50d1a3_2b3dc2c3","line":6145,"updated":"2015-07-29 01:26:07.000000000","message":"This method is called from more than just the resize operations, which is why this kwarg is here.  So in the case of resize ops, pass in instance_state from the initial vm_state, then this method won\u0027t need to assume that instance.system_metadata has \u0027old_vm_state\u0027 in it, since that wouldn\u0027t be the case for suspend/resume/rebuild operations.","commit_id":"5f51dbc72f984e95fc5e08049d90759873dbe91f"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"877612c075f3db4476c8ebb80ef665116d8df08e","unresolved":false,"context_lines":[{"line_number":6161,"context_line":"        except exception.InstanceFaultRollback as error:"},{"line_number":6162,"context_line":"            if quotas:"},{"line_number":6163,"context_line":"                quotas.rollback()"},{"line_number":6164,"context_line":"            init_state \u003d instance.system_metadata.get(\u0027old_vm_state\u0027)"},{"line_number":6165,"context_line":"            LOG.info(_LI(\"Setting instance back to it\u0027s initial \""},{"line_number":6166,"context_line":"                         \"state: %(state)s, after: %(error)s\"),"},{"line_number":6167,"context_line":"                    {\u0027state\u0027: init_state, \u0027error\u0027: error},"}],"source_content_type":"text/x-python","patch_set":11,"id":"3a50d1a3_ab4f9269","line":6164,"updated":"2015-07-29 01:26:07.000000000","message":"Just use the instance_state kwarg here like the block above.","commit_id":"5f51dbc72f984e95fc5e08049d90759873dbe91f"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"e73f7e3e22b78e13f76bb91fe12639bd1900a668","unresolved":false,"context_lines":[{"line_number":6161,"context_line":"        except exception.InstanceFaultRollback as error:"},{"line_number":6162,"context_line":"            if quotas:"},{"line_number":6163,"context_line":"                quotas.rollback()"},{"line_number":6164,"context_line":"            init_state \u003d instance.system_metadata.get(\u0027old_vm_state\u0027)"},{"line_number":6165,"context_line":"            LOG.info(_LI(\"Setting instance back to it\u0027s initial \""},{"line_number":6166,"context_line":"                         \"state: %(state)s, after: %(error)s\"),"},{"line_number":6167,"context_line":"                    {\u0027state\u0027: init_state, \u0027error\u0027: error},"}],"source_content_type":"text/x-python","patch_set":11,"id":"3a50d1a3_5fc80455","line":6164,"in_reply_to":"3a50d1a3_ab4f9269","updated":"2015-07-29 04:00:40.000000000","message":"Done","commit_id":"5f51dbc72f984e95fc5e08049d90759873dbe91f"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"5b19fa10180f1f59ca46f670fe0ee2cad75af8d0","unresolved":false,"context_lines":[{"line_number":3617,"context_line":"        quotas \u003d objects.Quotas.from_reservations(context,"},{"line_number":3618,"context_line":"                                                  reservations,"},{"line_number":3619,"context_line":"                                                  instance\u003dinstance)"},{"line_number":3620,"context_line":"        old_state \u003d instance.system_metadata.get(\u0027old_vm_state\u0027)"},{"line_number":3621,"context_line":"        with self._error_out_instance_on_exception(context, instance,"},{"line_number":3622,"context_line":"                                                   quotas\u003dquotas,"},{"line_number":3623,"context_line":"                                                   init_state\u003dold_state):"}],"source_content_type":"text/x-python","patch_set":12,"id":"3a50d1a3_669c065e","line":3620,"updated":"2015-07-30 14:28:41.000000000","message":"what if old_vm_state hasn\u0027t been stashed? we\u0027ll end up with setting None here\n\nwhy not just use instance.vm_state? AFAIU, it hasn\u0027t been changed by this point yet","commit_id":"d3a7201ffbe8c3e32e6fb04adf39487604b2e46d"},{"author":{"_account_id":6849,"name":"Roman Podoliaka","email":"roman.podoliaka@gmail.com","username":"rpodolyaka"},"change_message_id":"5b19fa10180f1f59ca46f670fe0ee2cad75af8d0","unresolved":false,"context_lines":[{"line_number":6106,"context_line":"                    instance_uuid\u003dinstance_uuid)"},{"line_number":6107,"context_line":""},{"line_number":6108,"context_line":"            self._instance_update(context, instance_uuid,"},{"line_number":6109,"context_line":"                                    vm_state\u003dinit_state,"},{"line_number":6110,"context_line":"                                    task_state\u003dNone)"},{"line_number":6111,"context_line":""},{"line_number":6112,"context_line":"            raise error.inner_exception"}],"source_content_type":"text/x-python","patch_set":12,"id":"3a50d1a3_a6e0cecd","line":6109,"updated":"2015-07-30 14:28:41.000000000","message":"nit: please restore the original indentation","commit_id":"d3a7201ffbe8c3e32e6fb04adf39487604b2e46d"},{"author":{"_account_id":10224,"name":"Feodor Tersin","email":"ftersin@hotmail.com","username":"ftersin"},"change_message_id":"6c0b9ea045ff3690b49060d7765d73693c18c68f","unresolved":false,"context_lines":[{"line_number":6158,"context_line":"    def _error_out_instance_on_exception(self, context, instance,"},{"line_number":6159,"context_line":"                                         quotas\u003dNone,"},{"line_number":6160,"context_line":"                                         instance_state\u003dvm_states.ACTIVE,"},{"line_number":6161,"context_line":"                                         init_state\u003dvm_states.ACTIVE):"},{"line_number":6162,"context_line":"        instance_uuid \u003d instance.uuid"},{"line_number":6163,"context_line":"        try:"},{"line_number":6164,"context_line":"            yield"}],"source_content_type":"text/x-python","patch_set":16,"id":"1a4dcd0f_98a99692","line":6161,"updated":"2015-08-07 15:27:16.000000000","message":"Why not to use instance_state arg as Matt suggested on PS11? Is there any case when custom instance_state is passed in, but we need exactly ACTIVE state to be set on InstanceFaultRollback?","commit_id":"1b964aee451a2ef6b5ee39f8fe718e238a8d84fe"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"8c1bbc2a0ad0e3ff0c22278c5206057541912bab","unresolved":false,"context_lines":[{"line_number":6158,"context_line":"    def _error_out_instance_on_exception(self, context, instance,"},{"line_number":6159,"context_line":"                                         quotas\u003dNone,"},{"line_number":6160,"context_line":"                                         instance_state\u003dvm_states.ACTIVE,"},{"line_number":6161,"context_line":"                                         init_state\u003dvm_states.ACTIVE):"},{"line_number":6162,"context_line":"        instance_uuid \u003d instance.uuid"},{"line_number":6163,"context_line":"        try:"},{"line_number":6164,"context_line":"            yield"}],"source_content_type":"text/x-python","patch_set":16,"id":"1a4dcd0f_c82ba293","line":6161,"in_reply_to":"1a4dcd0f_98a99692","updated":"2015-08-10 02:16:41.000000000","message":"Done","commit_id":"1b964aee451a2ef6b5ee39f8fe718e238a8d84fe"},{"author":{"_account_id":10224,"name":"Feodor Tersin","email":"ftersin@hotmail.com","username":"ftersin"},"change_message_id":"6c0b9ea045ff3690b49060d7765d73693c18c68f","unresolved":false,"context_lines":[{"line_number":6178,"context_line":"                quotas.rollback()"},{"line_number":6179,"context_line":"            LOG.info(_LI(\"Setting instance back to it\u0027s initial \""},{"line_number":6180,"context_line":"                         \"state: %(state)s, after: %(error)s\"),"},{"line_number":6181,"context_line":"                    {\u0027state\u0027: init_state, \u0027error\u0027: error},"},{"line_number":6182,"context_line":"                    instance_uuid\u003dinstance_uuid)"},{"line_number":6183,"context_line":""},{"line_number":6184,"context_line":"            self._instance_update(context, instance_uuid,"}],"source_content_type":"text/x-python","patch_set":16,"id":"1a4dcd0f_5898ee77","line":6181,"updated":"2015-08-07 15:27:16.000000000","message":"nit: add space","commit_id":"1b964aee451a2ef6b5ee39f8fe718e238a8d84fe"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"8c1bbc2a0ad0e3ff0c22278c5206057541912bab","unresolved":false,"context_lines":[{"line_number":6178,"context_line":"                quotas.rollback()"},{"line_number":6179,"context_line":"            LOG.info(_LI(\"Setting instance back to it\u0027s initial \""},{"line_number":6180,"context_line":"                         \"state: %(state)s, after: %(error)s\"),"},{"line_number":6181,"context_line":"                    {\u0027state\u0027: init_state, \u0027error\u0027: error},"},{"line_number":6182,"context_line":"                    instance_uuid\u003dinstance_uuid)"},{"line_number":6183,"context_line":""},{"line_number":6184,"context_line":"            self._instance_update(context, instance_uuid,"}],"source_content_type":"text/x-python","patch_set":16,"id":"1a4dcd0f_6817ee54","line":6181,"in_reply_to":"1a4dcd0f_5898ee77","updated":"2015-08-10 02:16:41.000000000","message":"Done","commit_id":"1b964aee451a2ef6b5ee39f8fe718e238a8d84fe"},{"author":{"_account_id":10224,"name":"Feodor Tersin","email":"ftersin@hotmail.com","username":"ftersin"},"change_message_id":"6c0b9ea045ff3690b49060d7765d73693c18c68f","unresolved":false,"context_lines":[{"line_number":6182,"context_line":"                    instance_uuid\u003dinstance_uuid)"},{"line_number":6183,"context_line":""},{"line_number":6184,"context_line":"            self._instance_update(context, instance_uuid,"},{"line_number":6185,"context_line":"                                    vm_state\u003dinit_state,"},{"line_number":6186,"context_line":"                                    task_state\u003dNone)"},{"line_number":6187,"context_line":""},{"line_number":6188,"context_line":"            raise error.inner_exception"}],"source_content_type":"text/x-python","patch_set":16,"id":"1a4dcd0f_78936a5b","line":6185,"updated":"2015-08-07 15:27:16.000000000","message":"nit: remove spaces","commit_id":"1b964aee451a2ef6b5ee39f8fe718e238a8d84fe"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"8c1bbc2a0ad0e3ff0c22278c5206057541912bab","unresolved":false,"context_lines":[{"line_number":6182,"context_line":"                    instance_uuid\u003dinstance_uuid)"},{"line_number":6183,"context_line":""},{"line_number":6184,"context_line":"            self._instance_update(context, instance_uuid,"},{"line_number":6185,"context_line":"                                    vm_state\u003dinit_state,"},{"line_number":6186,"context_line":"                                    task_state\u003dNone)"},{"line_number":6187,"context_line":""},{"line_number":6188,"context_line":"            raise error.inner_exception"}],"source_content_type":"text/x-python","patch_set":16,"id":"1a4dcd0f_881cba78","line":6185,"in_reply_to":"1a4dcd0f_78936a5b","updated":"2015-08-10 02:16:41.000000000","message":"Done","commit_id":"1b964aee451a2ef6b5ee39f8fe718e238a8d84fe"},{"author":{"_account_id":10224,"name":"Feodor Tersin","email":"ftersin@hotmail.com","username":"ftersin"},"change_message_id":"755e5dc2ecd97c96c6609fbcdb28862b42e87524","unresolved":false,"context_lines":[{"line_number":6097,"context_line":"        except exception.InstanceFaultRollback as error:"},{"line_number":6098,"context_line":"            if quotas:"},{"line_number":6099,"context_line":"                quotas.rollback()"},{"line_number":6100,"context_line":"            init_state \u003d instance.vm_state"},{"line_number":6101,"context_line":"            LOG.info(_LI(\"Setting instance back to it\u0027s initial \""},{"line_number":6102,"context_line":"                         \"state: %(state)s, after: %(error)s\"),"},{"line_number":6103,"context_line":"                        {\u0027state\u0027: init_state, \u0027error\u0027: error},"}],"source_content_type":"text/x-python","patch_set":17,"id":"1a4dcd0f_fe6e5495","line":6100,"updated":"2015-08-10 03:21:59.000000000","message":"But instance state is undeterminated here. I meant to get is in resize_instance, pass in by instance_state arg, and there use instance_state arg instead of inst_state arg which you introduced in PS16","commit_id":"7a751c22d6a2fd6f5c786afeb55a90765c0150ea"},{"author":{"_account_id":10224,"name":"Feodor Tersin","email":"ftersin@hotmail.com","username":"ftersin"},"change_message_id":"efe7ae029e42304377cd138dc2d7bd3b72535ab3","unresolved":false,"context_lines":[{"line_number":6177,"context_line":"                quotas.rollback()"},{"line_number":6178,"context_line":"            LOG.info(_LI(\"Setting instance back to it\u0027s initial \""},{"line_number":6179,"context_line":"                         \"state: %(state)s, after: %(error)s\"),"},{"line_number":6180,"context_line":"                        {\u0027state\u0027: instance_state, \u0027error\u0027: error},"},{"line_number":6181,"context_line":"                        instance_uuid\u003dinstance_uuid)"},{"line_number":6182,"context_line":""},{"line_number":6183,"context_line":"            self._instance_update(context, instance_uuid,"}],"source_content_type":"text/x-python","patch_set":20,"id":"1a4dcd0f_933a94cc","line":6180,"updated":"2015-08-10 13:11:24.000000000","message":"nit: { should be under _","commit_id":"8537b474e3a88b0a682d7f1b9c5990a8c3a1a5b5"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"14089c228648becd278e64a1f5d7991639baa6c1","unresolved":false,"context_lines":[{"line_number":6099,"context_line":"        except exception.InstanceFaultRollback as error:"},{"line_number":6100,"context_line":"            if quotas:"},{"line_number":6101,"context_line":"                quotas.rollback()"},{"line_number":6102,"context_line":"            LOG.info(_LI(\"Setting instance back to it\u0027s initial \""},{"line_number":6103,"context_line":"                         \"state: %(state)s, after: %(error)s\"),"},{"line_number":6104,"context_line":"                     {\u0027state\u0027: instance_state, \u0027error\u0027: error},"},{"line_number":6105,"context_line":"                     instance_uuid\u003dinstance_uuid)"}],"source_content_type":"text/x-python","patch_set":23,"id":"1a4dcd0f_5066702a","line":6102,"range":{"start_line":6102,"start_character":51,"end_line":6102,"end_character":55},"updated":"2015-08-13 22:24:52.000000000","message":"Grammar, this should be \"its\"","commit_id":"b3e410a4de43382eb172b876c8c264a1017090f7"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"fd29ffb8b53cbdc402e2d3063a4dac1cbe9b994d","unresolved":false,"context_lines":[{"line_number":6107,"context_line":"            self._instance_update(context, instance_uuid,"},{"line_number":6108,"context_line":"                                  vm_state\u003dinstance_state,"},{"line_number":6109,"context_line":"                                  task_state\u003dNone)"},{"line_number":6110,"context_line":""},{"line_number":6111,"context_line":"            raise error.inner_exception"},{"line_number":6112,"context_line":"        except Exception:"},{"line_number":6113,"context_line":"            LOG.exception(_LE(\u0027Setting instance vm_state to ERROR\u0027),"}],"source_content_type":"text/x-python","patch_set":23,"id":"1a4dcd0f_90715847","line":6110,"updated":"2015-08-13 22:13:44.000000000","message":"You should avoid unnecessary whitespace changes.","commit_id":"b3e410a4de43382eb172b876c8c264a1017090f7"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"456ec23b81b86c099d55d983ef02c8a591b104c0","unresolved":false,"context_lines":[{"line_number":6107,"context_line":"            self._instance_update(context, instance_uuid,"},{"line_number":6108,"context_line":"                                  vm_state\u003dinstance_state,"},{"line_number":6109,"context_line":"                                  task_state\u003dNone)"},{"line_number":6110,"context_line":""},{"line_number":6111,"context_line":"            raise error.inner_exception"},{"line_number":6112,"context_line":"        except Exception:"},{"line_number":6113,"context_line":"            LOG.exception(_LE(\u0027Setting instance vm_state to ERROR\u0027),"}],"source_content_type":"text/x-python","patch_set":23,"id":"1a4dcd0f_e2232e57","line":6110,"in_reply_to":"1a4dcd0f_90715847","updated":"2015-08-14 01:22:29.000000000","message":"Thanks, I will be more careful in future patches","commit_id":"b3e410a4de43382eb172b876c8c264a1017090f7"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"e1c81cc60c8d56fe453fbd5793a49a47ed1aa739","unresolved":false,"context_lines":[{"line_number":6096,"context_line":"                self._instance_update(context, instance_uuid,"},{"line_number":6097,"context_line":"                                      vm_state\u003dinstance_state,"},{"line_number":6098,"context_line":"                                      task_state\u003dNone)"},{"line_number":6099,"context_line":"        except exception.InstanceFaultRollback as error:"},{"line_number":6100,"context_line":"            if quotas:"},{"line_number":6101,"context_line":"                quotas.rollback()"},{"line_number":6102,"context_line":"            LOG.info(_LI(\"Setting instance back to its initial \""}],"source_content_type":"text/x-python","patch_set":24,"id":"1a4dcd0f_5993f400","line":6099,"updated":"2015-08-14 03:02:19.000000000","message":"So, this exception is raised by virt drivers when certain things fail. I was thinking maybe this was set to ACTIVE because we can\u0027t be sure what the instance state is after the error. The word \"rollback\" implies that we should be in the state we were initially though.","commit_id":"ff995ceb96f5f01708da44d51927925492806582"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"60bc7a2fb522b45cf9b82b9475a6f3c9b8dab16e","unresolved":false,"context_lines":[{"line_number":6096,"context_line":"                self._instance_update(context, instance_uuid,"},{"line_number":6097,"context_line":"                                      vm_state\u003dinstance_state,"},{"line_number":6098,"context_line":"                                      task_state\u003dNone)"},{"line_number":6099,"context_line":"        except exception.InstanceFaultRollback as error:"},{"line_number":6100,"context_line":"            if quotas:"},{"line_number":6101,"context_line":"                quotas.rollback()"},{"line_number":6102,"context_line":"            LOG.info(_LI(\"Setting instance back to its initial \""}],"source_content_type":"text/x-python","patch_set":24,"id":"1a4dcd0f_992dfcaa","line":6099,"in_reply_to":"1a4dcd0f_5993f400","updated":"2015-08-14 03:08:11.000000000","message":"Yes, that\u0027s what I\u0027m fixing, before this fix, the instance_state will return to ACTIVE no matter what state it is in before resize. If the vm_state is stopped, it will return to ACTIVE after this roll back, this patch fixed that for ACTIVE vm it will return to ACTIVE and for STOPPED vm it will return to STOPPED.","commit_id":"ff995ceb96f5f01708da44d51927925492806582"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"d843fae300ec4314f412f913e06addd70ae103e7","unresolved":false,"context_lines":[{"line_number":6096,"context_line":"                self._instance_update(context, instance_uuid,"},{"line_number":6097,"context_line":"                                      vm_state\u003dinstance_state,"},{"line_number":6098,"context_line":"                                      task_state\u003dNone)"},{"line_number":6099,"context_line":"        except exception.InstanceFaultRollback as error:"},{"line_number":6100,"context_line":"            if quotas:"},{"line_number":6101,"context_line":"                quotas.rollback()"},{"line_number":6102,"context_line":"            LOG.info(_LI(\"Setting instance back to its initial \""}],"source_content_type":"text/x-python","patch_set":24,"id":"1a4dcd0f_acec38f4","line":6099,"in_reply_to":"1a4dcd0f_992dfcaa","updated":"2015-08-14 03:28:51.000000000","message":"Yeah. What I\u0027m saying is that if the driver gets halfway through an action before failing, the instance may not be STOPPED anymore. Scenario: instance is STOPPED, action is issued for instance and driver starts instance, then action fails part way through, instance isn\u0027t STOPPED anymore and this would return it to STOPPED.\n\nBut, this might be more correct than setting it to ACTIVE. We won\u0027t know exactly what state it\u0027s in. I\u0027m actually not sure why the state isn\u0027t just left as whatever it was when the error occurred.","commit_id":"ff995ceb96f5f01708da44d51927925492806582"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"55716bb02818ae99949f497f49f2c4f42b36fa47","unresolved":false,"context_lines":[{"line_number":6096,"context_line":"                self._instance_update(context, instance_uuid,"},{"line_number":6097,"context_line":"                                      vm_state\u003dinstance_state,"},{"line_number":6098,"context_line":"                                      task_state\u003dNone)"},{"line_number":6099,"context_line":"        except exception.InstanceFaultRollback as error:"},{"line_number":6100,"context_line":"            if quotas:"},{"line_number":6101,"context_line":"                quotas.rollback()"},{"line_number":6102,"context_line":"            LOG.info(_LI(\"Setting instance back to its initial \""}],"source_content_type":"text/x-python","patch_set":24,"id":"1a4dcd0f_8c7ffcaa","line":6099,"in_reply_to":"1a4dcd0f_acec38f4","updated":"2015-08-14 03:52:28.000000000","message":"Yes, this is some how same as just let it be the same as it is when error occurred. We can even drop the code instance_update. Actually, this exception is only used in resize and the only raise for this action is due to particular checks, before those checks passes, nothing will actually done by the driver, so the instance state won\u0027t change. I think this fix is quite OK, as you said, it will be more understandable than return anything to ACTIVE for users.","commit_id":"ff995ceb96f5f01708da44d51927925492806582"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"2917d3c13b895a306f4079e86beebc0fe13921d4","unresolved":false,"context_lines":[{"line_number":6231,"context_line":"                     instance_uuid\u003dinstance_uuid)"},{"line_number":6232,"context_line":""},{"line_number":6233,"context_line":"            self._instance_update(context, instance_uuid,"},{"line_number":6234,"context_line":"                                  vm_state\u003dinstance_state,"},{"line_number":6235,"context_line":"                                  task_state\u003dNone)"},{"line_number":6236,"context_line":"            raise error.inner_exception"},{"line_number":6237,"context_line":"        except Exception:"}],"source_content_type":"text/x-python","patch_set":28,"id":"fa1b9901_c6ef6a1c","line":6234,"updated":"2015-08-20 16:48:56.000000000","message":"Thanks, I think this is much more accurate.","commit_id":"99899b81001ba35d4fadf0548a2d4e815caabc23"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"27b231bd379168e5e0abb8f5e4f0d6e3af575ad8","unresolved":false,"context_lines":[{"line_number":6218,"context_line":"            new_instance_state \u003d self._get_power_state(context, instance)"},{"line_number":6219,"context_line":"            if new_instance_state \u003d\u003d power_state.NOSTATE:"},{"line_number":6220,"context_line":"                instance_state \u003d vm_states.ERROR"},{"line_number":6221,"context_line":"            elif (instance_state \u003d\u003d \u0027active\u0027 and"},{"line_number":6222,"context_line":"                    new_instance_state \u003d\u003d power_state.SHUTDOWN):"},{"line_number":6223,"context_line":"                self.start_instance(context, instance)"},{"line_number":6224,"context_line":"            elif (instance_state \u003d\u003d \u0027stopped\u0027 and"}],"source_content_type":"text/x-python","patch_set":29,"id":"fa1b9901_5d11d602","line":6221,"updated":"2015-08-21 02:48:07.000000000","message":"why not vm_states.ACTIVE?","commit_id":"393269e10ec14d457f30e3819fa544fac03df4f2"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"c259fdd1c65399e2bdb3b93e7c683308498745de","unresolved":false,"context_lines":[{"line_number":6218,"context_line":"            new_instance_state \u003d self._get_power_state(context, instance)"},{"line_number":6219,"context_line":"            if new_instance_state \u003d\u003d power_state.NOSTATE:"},{"line_number":6220,"context_line":"                instance_state \u003d vm_states.ERROR"},{"line_number":6221,"context_line":"            elif (instance_state \u003d\u003d \u0027active\u0027 and"},{"line_number":6222,"context_line":"                    new_instance_state \u003d\u003d power_state.SHUTDOWN):"},{"line_number":6223,"context_line":"                self.start_instance(context, instance)"},{"line_number":6224,"context_line":"            elif (instance_state \u003d\u003d \u0027stopped\u0027 and"}],"source_content_type":"text/x-python","patch_set":29,"id":"fa1b9901_80a4e1b9","line":6221,"in_reply_to":"fa1b9901_5d11d602","updated":"2015-08-21 03:20:04.000000000","message":"Done","commit_id":"393269e10ec14d457f30e3819fa544fac03df4f2"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"27b231bd379168e5e0abb8f5e4f0d6e3af575ad8","unresolved":false,"context_lines":[{"line_number":6220,"context_line":"                instance_state \u003d vm_states.ERROR"},{"line_number":6221,"context_line":"            elif (instance_state \u003d\u003d \u0027active\u0027 and"},{"line_number":6222,"context_line":"                    new_instance_state \u003d\u003d power_state.SHUTDOWN):"},{"line_number":6223,"context_line":"                self.start_instance(context, instance)"},{"line_number":6224,"context_line":"            elif (instance_state \u003d\u003d \u0027stopped\u0027 and"},{"line_number":6225,"context_line":"                    new_instance_state \u003d\u003d power_state.RUNNING):"},{"line_number":6226,"context_line":"                self.stop_instance(context, instance, True)"}],"source_content_type":"text/x-python","patch_set":29,"id":"fa1b9901_fdfc6ab9","line":6223,"updated":"2015-08-21 02:48:07.000000000","message":"ditto","commit_id":"393269e10ec14d457f30e3819fa544fac03df4f2"},{"author":{"_account_id":12898,"name":"Tony Breeds","email":"tony@bakeyournoodle.com","username":"tonyb"},"change_message_id":"bbf33ab1a27f9e3bebac8f553a8668b347ccaa29","unresolved":false,"context_lines":[{"line_number":3648,"context_line":"        quotas \u003d objects.Quotas.from_reservations(context,"},{"line_number":3649,"context_line":"                                                  reservations,"},{"line_number":3650,"context_line":"                                                  instance\u003dinstance)"},{"line_number":3651,"context_line":"        old_state \u003d instance.vm_state"},{"line_number":3652,"context_line":"        with self._error_out_instance_on_exception(context, instance,"},{"line_number":3653,"context_line":"                                                   quotas\u003dquotas,"},{"line_number":3654,"context_line":"                                                   instance_state\u003dold_state):"}],"source_content_type":"text/x-python","patch_set":30,"id":"fa1b9901_3b82eac8","line":3651,"updated":"2015-08-21 03:55:24.000000000","message":"Perhaps initial_state (that\u0027s how you refer to it in your commit message) or restore_state.  old_state just seems odd to me.","commit_id":"d641b1081c2f163907c82f490b1549a52cb9afd5"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"ef473666b0e9949cae4f12d143657d65327b2de3","unresolved":false,"context_lines":[{"line_number":3648,"context_line":"        quotas \u003d objects.Quotas.from_reservations(context,"},{"line_number":3649,"context_line":"                                                  reservations,"},{"line_number":3650,"context_line":"                                                  instance\u003dinstance)"},{"line_number":3651,"context_line":"        old_state \u003d instance.vm_state"},{"line_number":3652,"context_line":"        with self._error_out_instance_on_exception(context, instance,"},{"line_number":3653,"context_line":"                                                   quotas\u003dquotas,"},{"line_number":3654,"context_line":"                                                   instance_state\u003dold_state):"}],"source_content_type":"text/x-python","patch_set":30,"id":"fa1b9901_4cdfe239","line":3651,"in_reply_to":"fa1b9901_3b82eac8","updated":"2015-08-21 05:39:07.000000000","message":"Thanks a lot","commit_id":"d641b1081c2f163907c82f490b1549a52cb9afd5"},{"author":{"_account_id":8276,"name":"kiwik","email":"chenrui.momo@gmail.com","username":"kiwik"},"change_message_id":"9eeca9388d1c12e4854c94c5a2489e4bc95834e2","unresolved":false,"context_lines":[{"line_number":6223,"context_line":"                self.start_instance(context, instance)"},{"line_number":6224,"context_line":"            elif (instance_state \u003d\u003d vm_states.STOPPED and"},{"line_number":6225,"context_line":"                    new_instance_state \u003d\u003d power_state.RUNNING):"},{"line_number":6226,"context_line":"                self.stop_instance(context, instance, True)"},{"line_number":6227,"context_line":""},{"line_number":6228,"context_line":"            LOG.info(_LI(\"Setting instance back to its initial \""},{"line_number":6229,"context_line":"                         \"state: %(state)s, after: %(error)s\"),"}],"source_content_type":"text/x-python","patch_set":31,"id":"fa1b9901_c8d437ed","line":6226,"updated":"2015-08-21 08:30:30.000000000","message":"the instance task_state would be checked as expected state when instance.save() execute in self.stop_instance() and self.start_instance(), so I think start/stop instance should\u0027t success in the resizing failed process.","commit_id":"f7caec973e5d84fb82c85c73bbffe7c6617ed88e"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"3126033ed318bab177bff1299084c32304d73df2","unresolved":false,"context_lines":[{"line_number":3682,"context_line":"        quotas \u003d objects.Quotas.from_reservations(context,"},{"line_number":3683,"context_line":"                                                  reservations,"},{"line_number":3684,"context_line":"                                                  instance\u003dinstance)"},{"line_number":3685,"context_line":"        init_state \u003d instance.vm_state"},{"line_number":3686,"context_line":"        with self._error_out_instance_on_exception(context, instance,"},{"line_number":3687,"context_line":"                                                   quotas\u003dquotas,"},{"line_number":3688,"context_line":"                                                   instance_state\u003dinit_state):"}],"source_content_type":"text/x-python","patch_set":33,"id":"da20952f_70cf3129","line":3685,"updated":"2015-09-06 09:02:53.000000000","message":"consider init_state \u003d\u003e current_state or even vm_state","commit_id":"fc06aa7915bb8b9e405efe09c286b9394879b4b9"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"3126033ed318bab177bff1299084c32304d73df2","unresolved":false,"context_lines":[{"line_number":6265,"context_line":"        except exception.InstanceFaultRollback as error:"},{"line_number":6266,"context_line":"            if quotas:"},{"line_number":6267,"context_line":"                quotas.rollback()"},{"line_number":6268,"context_line":"            new_instance_state \u003d self._get_power_state(context, instance)"},{"line_number":6269,"context_line":"            if new_instance_state \u003d\u003d power_state.NOSTATE:"},{"line_number":6270,"context_line":"                instance_state \u003d vm_states.ERROR"},{"line_number":6271,"context_line":"                self._instance_update(context, instance_uuid,"}],"source_content_type":"text/x-python","patch_set":33,"id":"da20952f_f0e341a2","line":6268,"updated":"2015-09-06 09:02:53.000000000","message":"i think that this change should be done in a separate patch set. my concerns here are that this changes the existing functionality and behaviors in the even that there is an error. which may be a good thing :)\n\nBut i think that the commit message requires a DocImpact flag, UpgradeImpact flag, and we need to explain what is going to happen when there are the changes in the error states","commit_id":"fc06aa7915bb8b9e405efe09c286b9394879b4b9"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"2ba71ba4e8ac83115f060e63968c0742b0feb824","unresolved":false,"context_lines":[{"line_number":6265,"context_line":"        except exception.InstanceFaultRollback as error:"},{"line_number":6266,"context_line":"            if quotas:"},{"line_number":6267,"context_line":"                quotas.rollback()"},{"line_number":6268,"context_line":"            new_instance_state \u003d self._get_power_state(context, instance)"},{"line_number":6269,"context_line":"            if new_instance_state \u003d\u003d power_state.NOSTATE:"},{"line_number":6270,"context_line":"                instance_state \u003d vm_states.ERROR"},{"line_number":6271,"context_line":"                self._instance_update(context, instance_uuid,"}],"source_content_type":"text/x-python","patch_set":33,"id":"da20952f_de471ea1","line":6268,"in_reply_to":"da20952f_e870280a","updated":"2015-09-07 08:06:58.000000000","message":"Thanks, that makes sence","commit_id":"fc06aa7915bb8b9e405efe09c286b9394879b4b9"},{"author":{"_account_id":12898,"name":"Tony Breeds","email":"tony@bakeyournoodle.com","username":"tonyb"},"change_message_id":"be9b693f7e8b545bcaac22fb45d5ad8bbfb79f0c","unresolved":false,"context_lines":[{"line_number":6265,"context_line":"        except exception.InstanceFaultRollback as error:"},{"line_number":6266,"context_line":"            if quotas:"},{"line_number":6267,"context_line":"                quotas.rollback()"},{"line_number":6268,"context_line":"            new_instance_state \u003d self._get_power_state(context, instance)"},{"line_number":6269,"context_line":"            if new_instance_state \u003d\u003d power_state.NOSTATE:"},{"line_number":6270,"context_line":"                instance_state \u003d vm_states.ERROR"},{"line_number":6271,"context_line":"                self._instance_update(context, instance_uuid,"}],"source_content_type":"text/x-python","patch_set":33,"id":"da20952f_e870280a","line":6268,"in_reply_to":"da20952f_f07fc1a8","updated":"2015-09-07 06:57:51.000000000","message":"new_instance_state is confusing because it\u0027s inconsistent with instance_state. new_instance_state is really a power_state and instance_state is a vm_state.\n\nPlease consider power_state or current_power_state as alternate names.","commit_id":"fc06aa7915bb8b9e405efe09c286b9394879b4b9"},{"author":{"_account_id":14101,"name":"yapeng Yang","email":"a394954369@gmail.com","username":"yapeng"},"change_message_id":"52b5da3d324645acde38a890382f5d1a1b8a91a5","unresolved":false,"context_lines":[{"line_number":6265,"context_line":"        except exception.InstanceFaultRollback as error:"},{"line_number":6266,"context_line":"            if quotas:"},{"line_number":6267,"context_line":"                quotas.rollback()"},{"line_number":6268,"context_line":"            new_instance_state \u003d self._get_power_state(context, instance)"},{"line_number":6269,"context_line":"            if new_instance_state \u003d\u003d power_state.NOSTATE:"},{"line_number":6270,"context_line":"                instance_state \u003d vm_states.ERROR"},{"line_number":6271,"context_line":"                self._instance_update(context, instance_uuid,"}],"source_content_type":"text/x-python","patch_set":33,"id":"da20952f_308c59d9","line":6268,"in_reply_to":"da20952f_f0e341a2","updated":"2015-09-06 09:07:45.000000000","message":"Done","commit_id":"fc06aa7915bb8b9e405efe09c286b9394879b4b9"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"2ba5794f76689881c96a47523f0aec97c5b9ef22","unresolved":false,"context_lines":[{"line_number":6265,"context_line":"        except exception.InstanceFaultRollback as error:"},{"line_number":6266,"context_line":"            if quotas:"},{"line_number":6267,"context_line":"                quotas.rollback()"},{"line_number":6268,"context_line":"            new_instance_state \u003d self._get_power_state(context, instance)"},{"line_number":6269,"context_line":"            if new_instance_state \u003d\u003d power_state.NOSTATE:"},{"line_number":6270,"context_line":"                instance_state \u003d vm_states.ERROR"},{"line_number":6271,"context_line":"                self._instance_update(context, instance_uuid,"}],"source_content_type":"text/x-python","patch_set":33,"id":"da20952f_f07fc1a8","line":6268,"in_reply_to":"da20952f_f0e341a2","updated":"2015-09-06 09:15:03.000000000","message":"I think it is ok to do it like the current way, and adding those tags you mentioned.Otherwise I don\u0027t know how to split.","commit_id":"fc06aa7915bb8b9e405efe09c286b9394879b4b9"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"65e489739c3e61cf5db2eb753141169bd1de435f","unresolved":false,"context_lines":[{"line_number":3682,"context_line":"        quotas \u003d objects.Quotas.from_reservations(context,"},{"line_number":3683,"context_line":"                                                  reservations,"},{"line_number":3684,"context_line":"                                                  instance\u003dinstance)"},{"line_number":3685,"context_line":"        vm_state \u003d instance.vm_state"},{"line_number":3686,"context_line":"        with self._error_out_instance_on_exception(context, instance,"},{"line_number":3687,"context_line":"                                                   quotas\u003dquotas,"},{"line_number":3688,"context_line":"                                                   instance_state\u003dvm_state):"}],"source_content_type":"text/x-python","patch_set":38,"id":"da20952f_785b6654","line":3685,"updated":"2015-09-08 08:03:46.000000000","message":"Actually we already store the old state in system_metadata https://github.com/openstack/nova/blob/master/nova/compute/manager.py#L3558\n\nBut looks fine","commit_id":"435fa1b3ea48028ddd765f9cd8ae1ef309a0d14f"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"65e489739c3e61cf5db2eb753141169bd1de435f","unresolved":false,"context_lines":[{"line_number":6276,"context_line":"                self._instance_update(context, instance_uuid,"},{"line_number":6277,"context_line":"                                      vm_state\u003dinstance_state,"},{"line_number":6278,"context_line":"                                      task_state\u003dtask_states.POWERING_ON)"},{"line_number":6279,"context_line":"                self.start_instance(context, instance)"},{"line_number":6280,"context_line":"            elif (instance_state \u003d\u003d vm_states.STOPPED and"},{"line_number":6281,"context_line":"                    current_power_state \u003d\u003d power_state.RUNNING):"},{"line_number":6282,"context_line":"                self._instance_update(context, instance_uuid,"}],"source_content_type":"text/x-python","patch_set":38,"id":"da20952f_73ce295b","line":6279,"updated":"2015-09-08 08:03:46.000000000","message":"Looks like you only fix for the resize case.\n\nActually _error_out_instance_on_exception  is used by suspend and rebuild/evacuate instance \n\nhttps://github.com/openstack/nova/blob/master/nova/compute/manager.py#L4011\n\nhttps://github.com/openstack/nova/blob/master/nova/compute/manager.py#L2627\n\nSo this should be wrong for other case.","commit_id":"435fa1b3ea48028ddd765f9cd8ae1ef309a0d14f"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"629ecb5a9af640dc254a8da279b433dc9ac83be8","unresolved":false,"context_lines":[{"line_number":6276,"context_line":"                self._instance_update(context, instance_uuid,"},{"line_number":6277,"context_line":"                                      vm_state\u003dinstance_state,"},{"line_number":6278,"context_line":"                                      task_state\u003dtask_states.POWERING_ON)"},{"line_number":6279,"context_line":"                self.start_instance(context, instance)"},{"line_number":6280,"context_line":"            elif (instance_state \u003d\u003d vm_states.STOPPED and"},{"line_number":6281,"context_line":"                    current_power_state \u003d\u003d power_state.RUNNING):"},{"line_number":6282,"context_line":"                self._instance_update(context, instance_uuid,"}],"source_content_type":"text/x-python","patch_set":38,"id":"da20952f_4129a136","line":6279,"in_reply_to":"da20952f_2a3d67bb","updated":"2015-09-09 02:55:17.000000000","message":"Done","commit_id":"435fa1b3ea48028ddd765f9cd8ae1ef309a0d14f"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"0a24721729b980b192db266158d4ffb78c1552fb","unresolved":false,"context_lines":[{"line_number":6276,"context_line":"                self._instance_update(context, instance_uuid,"},{"line_number":6277,"context_line":"                                      vm_state\u003dinstance_state,"},{"line_number":6278,"context_line":"                                      task_state\u003dtask_states.POWERING_ON)"},{"line_number":6279,"context_line":"                self.start_instance(context, instance)"},{"line_number":6280,"context_line":"            elif (instance_state \u003d\u003d vm_states.STOPPED and"},{"line_number":6281,"context_line":"                    current_power_state \u003d\u003d power_state.RUNNING):"},{"line_number":6282,"context_line":"                self._instance_update(context, instance_uuid,"}],"source_content_type":"text/x-python","patch_set":38,"id":"da20952f_d902b3ba","line":6279,"in_reply_to":"da20952f_73ce295b","updated":"2015-09-08 09:09:05.000000000","message":"Hi, Thanks for your review, but I think you miss the point, yes, _error_out_instance_on_exception is used in those cases, but I have only made changes in the InstanceFaultRollback exception, this exception is only used in resize, other operation will not be affected.","commit_id":"435fa1b3ea48028ddd765f9cd8ae1ef309a0d14f"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"9f15029345f3c253efa2416dbf72b413a44af2e6","unresolved":false,"context_lines":[{"line_number":6276,"context_line":"                self._instance_update(context, instance_uuid,"},{"line_number":6277,"context_line":"                                      vm_state\u003dinstance_state,"},{"line_number":6278,"context_line":"                                      task_state\u003dtask_states.POWERING_ON)"},{"line_number":6279,"context_line":"                self.start_instance(context, instance)"},{"line_number":6280,"context_line":"            elif (instance_state \u003d\u003d vm_states.STOPPED and"},{"line_number":6281,"context_line":"                    current_power_state \u003d\u003d power_state.RUNNING):"},{"line_number":6282,"context_line":"                self._instance_update(context, instance_uuid,"}],"source_content_type":"text/x-python","patch_set":38,"id":"da20952f_2a3d67bb","line":6279,"in_reply_to":"da20952f_d902b3ba","updated":"2015-09-09 01:19:27.000000000","message":"Hi, Zhengyu, thanks, indeed, I missed that point. But I still kind of think this isn\u0027t good enough.\n\nInstanceFaultRollback and _error_out_instance_on_exception really kind of generic stuff, but we implicit use it only for resize.\n\nWhen other people coding like this, they may don\u0027t know this is only for resize.\n\nAt this point, maybe we can fix it first, then improve it later.  But at least I think there should be comment to say this only for resize rollback.","commit_id":"435fa1b3ea48028ddd765f9cd8ae1ef309a0d14f"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"65aefd0bdda6f53127f32c42d5545a1530c4e486","unresolved":false,"context_lines":[{"line_number":6285,"context_line":"                self._instance_update(context, instance_uuid,"},{"line_number":6286,"context_line":"                                      vm_state\u003dinstance_state,"},{"line_number":6287,"context_line":"                                      task_state\u003dtask_states.POWERING_OFF)"},{"line_number":6288,"context_line":"                self.stop_instance(context, instance, True)"},{"line_number":6289,"context_line":""},{"line_number":6290,"context_line":"            LOG.info(_LI(\"Setting instance back to its initial \""},{"line_number":6291,"context_line":"                         \"state: %(state)s, after: %(error)s\"),"}],"source_content_type":"text/x-python","patch_set":39,"id":"da20952f_cd2f2087","line":6288,"updated":"2015-09-09 06:11:49.000000000","message":"i think that if we do go with this approach then we need to have a LOG info here that the instance is stopped.\n\nThis is actually doing a change on the backend","commit_id":"cca1f3109fcb7933575882b12b3ead2f8dc15069"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"082d65d7bb12b86a96d686110caf4511c506777e","unresolved":false,"context_lines":[{"line_number":6285,"context_line":"                self._instance_update(context, instance_uuid,"},{"line_number":6286,"context_line":"                                      vm_state\u003dinstance_state,"},{"line_number":6287,"context_line":"                                      task_state\u003dtask_states.POWERING_OFF)"},{"line_number":6288,"context_line":"                self.stop_instance(context, instance, True)"},{"line_number":6289,"context_line":""},{"line_number":6290,"context_line":"            LOG.info(_LI(\"Setting instance back to its initial \""},{"line_number":6291,"context_line":"                         \"state: %(state)s, after: %(error)s\"),"}],"source_content_type":"text/x-python","patch_set":39,"id":"da20952f_237a6d78","line":6288,"in_reply_to":"da20952f_cd2f2087","updated":"2015-09-09 07:27:33.000000000","message":"Thanks for your review, do you mean logging that we are going to stop the instance? There is a log in self.stop_instance()\nand also the line 6290 to 6294 will log that we have stopped the instance.","commit_id":"cca1f3109fcb7933575882b12b3ead2f8dc15069"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"e3a6e22d64afd4dea8a114acb7502916bf47087c","unresolved":false,"context_lines":[{"line_number":6296,"context_line":"                self._instance_update(context, instance_uuid,"},{"line_number":6297,"context_line":"                                      vm_state\u003dinstance_state,"},{"line_number":6298,"context_line":"                                      task_state\u003dtask_states.POWERING_OFF)"},{"line_number":6299,"context_line":"                self.stop_instance(context, instance, True)"},{"line_number":6300,"context_line":""},{"line_number":6301,"context_line":"            LOG.info(_LI(\"Setting instance back to its initial \""},{"line_number":6302,"context_line":"                         \"state: %(state)s, after: %(error)s\"),"}],"source_content_type":"text/x-python","patch_set":41,"id":"ba15a1d1_280a5727","line":6299,"updated":"2015-09-14 15:07:44.000000000","message":"So I think you are missing the basic case, where instance_state is Active and power_state \u003d Running?","commit_id":"b242de353915a4cf2c5d4b1ba4f51b0465b90c1e"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"f21906c97c43ebc52329f4f857aebc68e49d68eb","unresolved":false,"context_lines":[{"line_number":6296,"context_line":"                self._instance_update(context, instance_uuid,"},{"line_number":6297,"context_line":"                                      vm_state\u003dinstance_state,"},{"line_number":6298,"context_line":"                                      task_state\u003dtask_states.POWERING_OFF)"},{"line_number":6299,"context_line":"                self.stop_instance(context, instance, True)"},{"line_number":6300,"context_line":""},{"line_number":6301,"context_line":"            LOG.info(_LI(\"Setting instance back to its initial \""},{"line_number":6302,"context_line":"                         \"state: %(state)s, after: %(error)s\"),"}],"source_content_type":"text/x-python","patch_set":41,"id":"ba15a1d1_e9576500","line":6299,"in_reply_to":"ba15a1d1_280a5727","updated":"2015-09-15 07:46:18.000000000","message":"I think in that case, we don\u0027t have to do anything, just print the log, but I think it will be better if I add an else fork to all other cases.","commit_id":"b242de353915a4cf2c5d4b1ba4f51b0465b90c1e"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"e119ab87b5a2aa1f2c2d75925ae8ad03de3caba2","unresolved":false,"context_lines":[{"line_number":6296,"context_line":"                self._instance_update(context, instance_uuid,"},{"line_number":6297,"context_line":"                                      vm_state\u003dinstance_state,"},{"line_number":6298,"context_line":"                                      task_state\u003dtask_states.POWERING_OFF)"},{"line_number":6299,"context_line":"                self.stop_instance(context, instance, True)"},{"line_number":6300,"context_line":""},{"line_number":6301,"context_line":"            LOG.info(_LI(\"Setting instance back to its initial \""},{"line_number":6302,"context_line":"                         \"state: %(state)s, after: %(error)s\"),"}],"source_content_type":"text/x-python","patch_set":41,"id":"ba15a1d1_db7d7c1d","line":6299,"in_reply_to":"ba15a1d1_e9576500","updated":"2015-09-15 10:31:32.000000000","message":"In that case you really have to do what we did before:\n\nself._instance_update(context, instance,\n                                  vm_state\u003dvm_states.ACTIVE,\n                                  task_state\u003dNone)","commit_id":"b242de353915a4cf2c5d4b1ba4f51b0465b90c1e"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"0525dc2a56f3d4c2dc76a047e73c67021e198f5c","unresolved":false,"context_lines":[{"line_number":6298,"context_line":"                                      task_state\u003dtask_states.POWERING_OFF)"},{"line_number":6299,"context_line":"                self.stop_instance(context, instance, True)"},{"line_number":6300,"context_line":"            else:"},{"line_number":6301,"context_line":"                self._instance_update(context, instance_uuid,"},{"line_number":6302,"context_line":"                                      vm_state\u003dvm_states.ACTIVE,"},{"line_number":6303,"context_line":"                                      task_state\u003dNone)"},{"line_number":6304,"context_line":"            LOG.info(_LI(\"Setting instance back to its initial \""}],"source_content_type":"text/x-python","patch_set":42,"id":"ba15a1d1_bbc0c82b","line":6301,"updated":"2015-09-15 10:33:17.000000000","message":"this looks like its needed to me.","commit_id":"6fd68759a66039200c44be8b083ccad8ed5cbb9f"},{"author":{"_account_id":14819,"name":"Timofey Durakov","email":"timofei.nd@gmail.com","username":"tdurakov"},"change_message_id":"91877033113a78bfcd0cb38992a516d058d6d9e3","unresolved":false,"context_lines":[{"line_number":6280,"context_line":"            if quotas:"},{"line_number":6281,"context_line":"                quotas.rollback()"},{"line_number":6282,"context_line":"            current_power_state \u003d self._get_power_state(context, instance)"},{"line_number":6283,"context_line":"            if current_power_state \u003d\u003d power_state.NOSTATE:"},{"line_number":6284,"context_line":"                instance_state \u003d vm_states.ERROR"},{"line_number":6285,"context_line":"                self._instance_update(context, instance_uuid,"},{"line_number":6286,"context_line":"                                      vm_state\u003dinstance_state,"}],"source_content_type":"text/x-python","patch_set":43,"id":"ba15a1d1_16ac299f","line":6283,"updated":"2015-09-15 10:52:24.000000000","message":"What about some refactoring? Code became too heavy IMO.\nMaybe move this if/elif/else into separate method?","commit_id":"7887925ebf84b581514240cd3706bc304d02f67f"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"7feb93ed098885ae77cce94d90c565986e875a49","unresolved":false,"context_lines":[{"line_number":6280,"context_line":"            if quotas:"},{"line_number":6281,"context_line":"                quotas.rollback()"},{"line_number":6282,"context_line":"            current_power_state \u003d self._get_power_state(context, instance)"},{"line_number":6283,"context_line":"            if current_power_state \u003d\u003d power_state.NOSTATE:"},{"line_number":6284,"context_line":"                instance_state \u003d vm_states.ERROR"},{"line_number":6285,"context_line":"                self._instance_update(context, instance_uuid,"},{"line_number":6286,"context_line":"                                      vm_state\u003dinstance_state,"}],"source_content_type":"text/x-python","patch_set":43,"id":"ba15a1d1_51c86b22","line":6283,"in_reply_to":"ba15a1d1_16ac299f","updated":"2015-09-15 11:27:10.000000000","message":"let\u0027s first get the functionality correct","commit_id":"7887925ebf84b581514240cd3706bc304d02f67f"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"8ddb9645eb3917f17fa074f0d83f0ca533a3b6df","unresolved":false,"context_lines":[{"line_number":6296,"context_line":"                self._instance_update(context, instance_uuid,"},{"line_number":6297,"context_line":"                                      vm_state\u003dinstance_state,"},{"line_number":6298,"context_line":"                                      task_state\u003dtask_states.POWERING_OFF)"},{"line_number":6299,"context_line":"                self.stop_instance(context, instance, True)"},{"line_number":6300,"context_line":""},{"line_number":6301,"context_line":"            LOG.info(_LI(\"Setting instance back to its initial \""},{"line_number":6302,"context_line":"                         \"state: %(state)s, after: %(error)s\"),"}],"source_content_type":"text/x-python","patch_set":43,"id":"ba15a1d1_fbf40088","line":6299,"updated":"2015-09-15 10:34:17.000000000","message":"Sorry, I am confused, why did you drop that extra clause here?","commit_id":"7887925ebf84b581514240cd3706bc304d02f67f"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"54a649b551ac8fd8c802a678e13c8f31cdfcf051","unresolved":false,"context_lines":[{"line_number":6296,"context_line":"                self._instance_update(context, instance_uuid,"},{"line_number":6297,"context_line":"                                      vm_state\u003dinstance_state,"},{"line_number":6298,"context_line":"                                      task_state\u003dtask_states.POWERING_OFF)"},{"line_number":6299,"context_line":"                self.stop_instance(context, instance, True)"},{"line_number":6300,"context_line":""},{"line_number":6301,"context_line":"            LOG.info(_LI(\"Setting instance back to its initial \""},{"line_number":6302,"context_line":"                         \"state: %(state)s, after: %(error)s\"),"}],"source_content_type":"text/x-python","patch_set":43,"id":"ba15a1d1_d14c7b44","line":6299,"in_reply_to":"ba15a1d1_fbf40088","updated":"2015-09-15 11:15:21.000000000","message":"Hi, I have tried adding the else branch here, it somehow fails the test: nova/tests/unit/compute/test_compute.py:test_resize_instance_driver_rollback","commit_id":"7887925ebf84b581514240cd3706bc304d02f67f"},{"author":{"_account_id":12898,"name":"Tony Breeds","email":"tony@bakeyournoodle.com","username":"tonyb"},"change_message_id":"90010ca0c52eb841be1dc13cc1aeb217e47d3e92","unresolved":false,"context_lines":[{"line_number":6376,"context_line":"                self._instance_update(context, instance,"},{"line_number":6377,"context_line":"                                      vm_state\u003dinstance_state,"},{"line_number":6378,"context_line":"                                      task_state\u003dNone)"},{"line_number":6379,"context_line":"        # NOTE(Zheng Zhenyu): This exception is currently designed and"},{"line_number":6380,"context_line":"        # only used by resize, when consider using this exception for"},{"line_number":6381,"context_line":"        # other actions, please make modifications according to the usecase."},{"line_number":6382,"context_line":"        except exception.InstanceFaultRollback as error:"}],"source_content_type":"text/x-python","patch_set":54,"id":"5a2ca52d_503fbf23","line":6379,"updated":"2015-10-16 03:04:27.000000000","message":"If you need to address other feedback please consider something like:\n\n # NOTE(Zheng Zhenyu): This exception is currently only raised by resize.  When\n # adding code that generates that exception please adjust this code\n # appropriately","commit_id":"c68921cba270c7973a5982bd149cb82897526a4a"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"7f83322f8de761ab39fb4e2ccb1f2322fbf9d32c","unresolved":false,"context_lines":[{"line_number":6393,"context_line":"                self._instance_update(context, instance,"},{"line_number":6394,"context_line":"                                      vm_state\u003dinstance_state,"},{"line_number":6395,"context_line":"                                      task_state\u003dtask_states.POWERING_ON)"},{"line_number":6396,"context_line":"                self.start_instance(context, instance)"},{"line_number":6397,"context_line":"            elif (instance_state \u003d\u003d vm_states.STOPPED and"},{"line_number":6398,"context_line":"                    current_power_state \u003d\u003d power_state.RUNNING):"},{"line_number":6399,"context_line":"                self._instance_update(context, instance,"}],"source_content_type":"text/x-python","patch_set":54,"id":"fa80f949_ec1bd97e","line":6396,"updated":"2015-11-05 02:25:05.000000000","message":"I\u0027m not in love with this approach - not only because it\u0027s embedding failed resize rollback logic in a different method, but also because it sort of steps on how the _sync_power_states periodic task works.  Is there a way that _sync_instance_power_state could be integrated?  Or could this error handler method take a callback rollback method, like what we have for failed live migrations when we rollback.  Then the callback method could embed the logic for the operation it was performing.\n\nAlthough _sync_instance_power_state is probably not a great example since it assumes things went wrong in the hypervisor and tries to align them to the nova database, so it\u0027ll stop a running instance.","commit_id":"c68921cba270c7973a5982bd149cb82897526a4a"},{"author":{"_account_id":5754,"name":"Alex Xu","email":"hejie.xu@intel.com","username":"xuhj"},"change_message_id":"9d37eae931f84f871749436367c2d6a981220e21","unresolved":false,"context_lines":[{"line_number":6393,"context_line":"                self._instance_update(context, instance,"},{"line_number":6394,"context_line":"                                      vm_state\u003dinstance_state,"},{"line_number":6395,"context_line":"                                      task_state\u003dtask_states.POWERING_ON)"},{"line_number":6396,"context_line":"                self.start_instance(context, instance)"},{"line_number":6397,"context_line":"            elif (instance_state \u003d\u003d vm_states.STOPPED and"},{"line_number":6398,"context_line":"                    current_power_state \u003d\u003d power_state.RUNNING):"},{"line_number":6399,"context_line":"                self._instance_update(context, instance,"}],"source_content_type":"text/x-python","patch_set":54,"id":"5aef4532_a964e6e4","line":6396,"in_reply_to":"da85f559_f11edb6e","updated":"2016-03-09 07:43:59.000000000","message":"I agree with Matt at here","commit_id":"c68921cba270c7973a5982bd149cb82897526a4a"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"82fc8bd02db3a9a63fe579844c3d53022a47fc19","unresolved":false,"context_lines":[{"line_number":6393,"context_line":"                self._instance_update(context, instance,"},{"line_number":6394,"context_line":"                                      vm_state\u003dinstance_state,"},{"line_number":6395,"context_line":"                                      task_state\u003dtask_states.POWERING_ON)"},{"line_number":6396,"context_line":"                self.start_instance(context, instance)"},{"line_number":6397,"context_line":"            elif (instance_state \u003d\u003d vm_states.STOPPED and"},{"line_number":6398,"context_line":"                    current_power_state \u003d\u003d power_state.RUNNING):"},{"line_number":6399,"context_line":"                self._instance_update(context, instance,"}],"source_content_type":"text/x-python","patch_set":54,"id":"da85f559_f11edb6e","line":6396,"in_reply_to":"fa80f949_b17f3aaa","updated":"2015-11-12 02:59:42.000000000","message":"Another issue with this is if start_instance raises an exception it\u0027s not handled and we fail in a different and (from the operator POV) probably obscure way.  This is why rollback code is complicated.","commit_id":"c68921cba270c7973a5982bd149cb82897526a4a"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"41739a3d46b12e6880b73818937ad62df6308f1d","unresolved":false,"context_lines":[{"line_number":6393,"context_line":"                self._instance_update(context, instance,"},{"line_number":6394,"context_line":"                                      vm_state\u003dinstance_state,"},{"line_number":6395,"context_line":"                                      task_state\u003dtask_states.POWERING_ON)"},{"line_number":6396,"context_line":"                self.start_instance(context, instance)"},{"line_number":6397,"context_line":"            elif (instance_state \u003d\u003d vm_states.STOPPED and"},{"line_number":6398,"context_line":"                    current_power_state \u003d\u003d power_state.RUNNING):"},{"line_number":6399,"context_line":"                self._instance_update(context, instance,"}],"source_content_type":"text/x-python","patch_set":54,"id":"fa80f949_b17f3aaa","line":6396,"in_reply_to":"fa80f949_ec1bd97e","updated":"2015-11-06 02:04:28.000000000","message":"I will check that, thanks","commit_id":"c68921cba270c7973a5982bd149cb82897526a4a"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"7f83322f8de761ab39fb4e2ccb1f2322fbf9d32c","unresolved":false,"context_lines":[{"line_number":6402,"context_line":"                self.stop_instance(context, instance, True)"},{"line_number":6403,"context_line":"            else:"},{"line_number":6404,"context_line":"                self._instance_update(context, instance,"},{"line_number":6405,"context_line":"                                  vm_state\u003dvm_states.ACTIVE,"},{"line_number":6406,"context_line":"                                  task_states\u003dNone)"},{"line_number":6407,"context_line":""},{"line_number":6408,"context_line":"            LOG.info(_LI(\"Setting instance back to its initial \""}],"source_content_type":"text/x-python","patch_set":54,"id":"fa80f949_4c26a5cf","line":6405,"updated":"2015-11-05 02:25:05.000000000","message":"Why wouldn\u0027t you use instance_state here?","commit_id":"c68921cba270c7973a5982bd149cb82897526a4a"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"7f83322f8de761ab39fb4e2ccb1f2322fbf9d32c","unresolved":false,"context_lines":[{"line_number":6405,"context_line":"                                  vm_state\u003dvm_states.ACTIVE,"},{"line_number":6406,"context_line":"                                  task_states\u003dNone)"},{"line_number":6407,"context_line":""},{"line_number":6408,"context_line":"            LOG.info(_LI(\"Setting instance back to its initial \""},{"line_number":6409,"context_line":"                         \"state: %(state)s, after: %(error)s\"),"},{"line_number":6410,"context_line":"                     {\u0027state\u0027: instance_state, \u0027error\u0027: error},"},{"line_number":6411,"context_line":"                     instance_uuid\u003dinstance_uuid)"}],"source_content_type":"text/x-python","patch_set":54,"id":"fa80f949_2c7d61b1","line":6408,"updated":"2015-11-05 02:25:05.000000000","message":"I\u0027d probably omit \"it\u0027s initial\" from this message since the parameter defaults to ACTIVE, so we don\u0027t really know if what\u0027s passed in was the initial state before the failed operation or not.","commit_id":"c68921cba270c7973a5982bd149cb82897526a4a"}],"nova/tests/unit/compute/test_compute_mgr.py":[{"author":{"_account_id":6062,"name":"jichenjc","email":"jichenjc@cn.ibm.com","username":"jichenjc"},"change_message_id":"637b304bc05f9054147378f66922fdfb4cd797eb","unresolved":false,"context_lines":[{"line_number":2207,"context_line":"        self.assertRaises(test.TestingException, do_test)"},{"line_number":2208,"context_line":"        inst_update_mock.assert_called_once_with("},{"line_number":2209,"context_line":"            self.context, instance.uuid,"},{"line_number":2210,"context_line":"            vm_state\u003dvm_states.STOPPED, task_state\u003dNone)"},{"line_number":2211,"context_line":""},{"line_number":2212,"context_line":"    @mock.patch(\u0027nova.compute.manager.ComputeManager.\u0027"},{"line_number":2213,"context_line":"                \u0027_set_instance_error_state\u0027)"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a50d1a3_667ccdb5","line":2210,"updated":"2015-07-27 06:44:50.000000000","message":"I think we can combine those cases since only difference is STOP and ACTIVE... not a big deal","commit_id":"a3f3fff9d3c99fb507002bfb33454b23269133a6"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"7876474bb4f71ba18e18d1097960011f721e3f0b","unresolved":false,"context_lines":[{"line_number":2207,"context_line":"        self.assertRaises(test.TestingException, do_test)"},{"line_number":2208,"context_line":"        inst_update_mock.assert_called_once_with("},{"line_number":2209,"context_line":"            self.context, instance.uuid,"},{"line_number":2210,"context_line":"            vm_state\u003dvm_states.STOPPED, task_state\u003dNone)"},{"line_number":2211,"context_line":""},{"line_number":2212,"context_line":"    @mock.patch(\u0027nova.compute.manager.ComputeManager.\u0027"},{"line_number":2213,"context_line":"                \u0027_set_instance_error_state\u0027)"}],"source_content_type":"text/x-python","patch_set":9,"id":"3a50d1a3_21bd4fd7","line":2210,"in_reply_to":"3a50d1a3_667ccdb5","updated":"2015-07-27 07:02:14.000000000","message":"Hi, thanks for your review, I think we\u0027d better test both conditions to prove this works.","commit_id":"a3f3fff9d3c99fb507002bfb33454b23269133a6"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"14089c228648becd278e64a1f5d7991639baa6c1","unresolved":false,"context_lines":[{"line_number":2131,"context_line":"            vm_state\u003dvm_states.STOPPED, task_state\u003dNone)"},{"line_number":2132,"context_line":""},{"line_number":2133,"context_line":"    @mock.patch(\u0027nova.compute.manager.ComputeManager._instance_update\u0027)"},{"line_number":2134,"context_line":"    def test_error_out_exception_inst_fault_rollback_initial_active(self,"},{"line_number":2135,"context_line":"                                                            inst_update_mock):"},{"line_number":2136,"context_line":"        instance \u003d fake_instance.fake_instance_obj(self.context)"},{"line_number":2137,"context_line":""}],"source_content_type":"text/x-python","patch_set":23,"id":"1a4dcd0f_733296f4","line":2134,"updated":"2015-08-13 22:24:52.000000000","message":"Suggestion: You can remove the word \"initial\" IMO and then use \"update_mock\" and left-align with \"self\"","commit_id":"b3e410a4de43382eb172b876c8c264a1017090f7"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"456ec23b81b86c099d55d983ef02c8a591b104c0","unresolved":false,"context_lines":[{"line_number":2131,"context_line":"            vm_state\u003dvm_states.STOPPED, task_state\u003dNone)"},{"line_number":2132,"context_line":""},{"line_number":2133,"context_line":"    @mock.patch(\u0027nova.compute.manager.ComputeManager._instance_update\u0027)"},{"line_number":2134,"context_line":"    def test_error_out_exception_inst_fault_rollback_initial_active(self,"},{"line_number":2135,"context_line":"                                                            inst_update_mock):"},{"line_number":2136,"context_line":"        instance \u003d fake_instance.fake_instance_obj(self.context)"},{"line_number":2137,"context_line":""}],"source_content_type":"text/x-python","patch_set":23,"id":"1a4dcd0f_82feeaac","line":2134,"in_reply_to":"1a4dcd0f_733296f4","updated":"2015-08-14 01:22:29.000000000","message":"Thanks","commit_id":"b3e410a4de43382eb172b876c8c264a1017090f7"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"fd29ffb8b53cbdc402e2d3063a4dac1cbe9b994d","unresolved":false,"context_lines":[{"line_number":2132,"context_line":""},{"line_number":2133,"context_line":"    @mock.patch(\u0027nova.compute.manager.ComputeManager._instance_update\u0027)"},{"line_number":2134,"context_line":"    def test_error_out_exception_inst_fault_rollback_initial_active(self,"},{"line_number":2135,"context_line":"                                                            inst_update_mock):"},{"line_number":2136,"context_line":"        instance \u003d fake_instance.fake_instance_obj(self.context)"},{"line_number":2137,"context_line":""},{"line_number":2138,"context_line":"        def do_test():"}],"source_content_type":"text/x-python","patch_set":23,"id":"1a4dcd0f_30b404d3","line":2135,"updated":"2015-08-13 22:13:44.000000000","message":"any reason to change this indent?","commit_id":"b3e410a4de43382eb172b876c8c264a1017090f7"},{"author":{"_account_id":4690,"name":"melanie witt","display_name":"melwitt","email":"melwittt@gmail.com","username":"melwitt"},"change_message_id":"14089c228648becd278e64a1f5d7991639baa6c1","unresolved":false,"context_lines":[{"line_number":2147,"context_line":"            vm_state\u003dvm_states.ACTIVE, task_state\u003dNone)"},{"line_number":2148,"context_line":""},{"line_number":2149,"context_line":"    @mock.patch(\u0027nova.compute.manager.ComputeManager._instance_update\u0027)"},{"line_number":2150,"context_line":"    def test_error_out_exception_inst_fault_rollback_initial_stopped(self,"},{"line_number":2151,"context_line":"                                                              inst_update_mock):"},{"line_number":2152,"context_line":"        instance \u003d fake_instance.fake_instance_obj(self.context)"},{"line_number":2153,"context_line":""}],"source_content_type":"text/x-python","patch_set":23,"id":"1a4dcd0f_b311fe55","line":2150,"updated":"2015-08-13 22:24:52.000000000","message":"This is a very long test name :) \n\nSuggestion to help with long line issues: You can remove the word \"initial\" IMO and then use \"update_mock\" and should be able to left-align with \"self\"","commit_id":"b3e410a4de43382eb172b876c8c264a1017090f7"},{"author":{"_account_id":5441,"name":"Andrew Laski","email":"andrew@lascii.com","username":"alaski"},"change_message_id":"fd29ffb8b53cbdc402e2d3063a4dac1cbe9b994d","unresolved":false,"context_lines":[{"line_number":2148,"context_line":""},{"line_number":2149,"context_line":"    @mock.patch(\u0027nova.compute.manager.ComputeManager._instance_update\u0027)"},{"line_number":2150,"context_line":"    def test_error_out_exception_inst_fault_rollback_initial_stopped(self,"},{"line_number":2151,"context_line":"                                                              inst_update_mock):"},{"line_number":2152,"context_line":"        instance \u003d fake_instance.fake_instance_obj(self.context)"},{"line_number":2153,"context_line":""},{"line_number":2154,"context_line":"        def do_test():"}],"source_content_type":"text/x-python","patch_set":23,"id":"1a4dcd0f_1001c86a","line":2151,"range":{"start_line":2151,"start_character":0,"end_line":2151,"end_character":80},"updated":"2015-08-13 22:13:44.000000000","message":"This line appears to be too long, causing the pep8 failure.","commit_id":"b3e410a4de43382eb172b876c8c264a1017090f7"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"2917d3c13b895a306f4079e86beebc0fe13921d4","unresolved":false,"context_lines":[{"line_number":2352,"context_line":"        # was active, we should try to start this instance."},{"line_number":2353,"context_line":"        power_state_mock.return_value \u003d power_state.SHUTDOWN"},{"line_number":2354,"context_line":"        self.assertRaises(test.TestingException, do_test, vm_states.ACTIVE)"},{"line_number":2355,"context_line":"        start_mock.assert_called_once_with(self.context, instance)"},{"line_number":2356,"context_line":""},{"line_number":2357,"context_line":"        # When the instance power_state is SHUTDOWN, but the initial state"},{"line_number":2358,"context_line":"        # was active, we should try to start this instance."}],"source_content_type":"text/x-python","patch_set":28,"id":"fa1b9901_46959a84","line":2355,"updated":"2015-08-20 16:48:56.000000000","message":"Nit: I would really prefer a different test method for each of these really, so its easier to debug when tests fail.","commit_id":"99899b81001ba35d4fadf0548a2d4e815caabc23"},{"author":{"_account_id":12898,"name":"Tony Breeds","email":"tony@bakeyournoodle.com","username":"tonyb"},"change_message_id":"be9b693f7e8b545bcaac22fb45d5ad8bbfb79f0c","unresolved":false,"context_lines":[{"line_number":2459,"context_line":"                                                        stop_mock):"},{"line_number":2460,"context_line":"        instance \u003d fake_instance.fake_instance_obj(self.context)"},{"line_number":2461,"context_line":""},{"line_number":2462,"context_line":"        def do_test(inst_state):"},{"line_number":2463,"context_line":"            with self.compute._error_out_instance_on_exception("},{"line_number":2464,"context_line":"                    self.context, instance, instance_state\u003dinst_state):"},{"line_number":2465,"context_line":"                raise exception.InstanceFaultRollback("}],"source_content_type":"text/x-python","patch_set":33,"id":"da20952f_486b54f1","line":2462,"updated":"2015-09-07 06:57:51.000000000","message":"I could be wring but isn\u0027t this the 3rd identical \"do_test\".  If that\u0027s the case please consider a better name and moving it to the class level.","commit_id":"fc06aa7915bb8b9e405efe09c286b9394879b4b9"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"2ba71ba4e8ac83115f060e63968c0742b0feb824","unresolved":false,"context_lines":[{"line_number":2459,"context_line":"                                                        stop_mock):"},{"line_number":2460,"context_line":"        instance \u003d fake_instance.fake_instance_obj(self.context)"},{"line_number":2461,"context_line":""},{"line_number":2462,"context_line":"        def do_test(inst_state):"},{"line_number":2463,"context_line":"            with self.compute._error_out_instance_on_exception("},{"line_number":2464,"context_line":"                    self.context, instance, instance_state\u003dinst_state):"},{"line_number":2465,"context_line":"                raise exception.InstanceFaultRollback("}],"source_content_type":"text/x-python","patch_set":33,"id":"da20952f_0116974b","line":2462,"in_reply_to":"da20952f_486b54f1","updated":"2015-09-07 08:06:58.000000000","message":"Thanks, didn\u0027t notice this","commit_id":"fc06aa7915bb8b9e405efe09c286b9394879b4b9"},{"author":{"_account_id":1653,"name":"garyk","email":"gkotton@vmware.com","username":"garyk"},"change_message_id":"65aefd0bdda6f53127f32c42d5545a1530c4e486","unresolved":false,"context_lines":[{"line_number":2407,"context_line":"            self.context, instance,"},{"line_number":2408,"context_line":"            vm_state\u003dvm_states.STOPPED, task_state\u003dNone)"},{"line_number":2409,"context_line":""},{"line_number":2410,"context_line":"    def do_test_for_fault_rollback(self, instance, inst_state):"},{"line_number":2411,"context_line":"        with self.compute._error_out_instance_on_exception("},{"line_number":2412,"context_line":"                self.context, instance, instance_state\u003dinst_state):"},{"line_number":2413,"context_line":"            raise exception.InstanceFaultRollback("}],"source_content_type":"text/x-python","patch_set":39,"id":"da20952f_cd188078","line":2410,"updated":"2015-09-09 06:11:49.000000000","message":"minor nit - it is a private method so I suggest prefixing it with _","commit_id":"cca1f3109fcb7933575882b12b3ead2f8dc15069"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"082d65d7bb12b86a96d686110caf4511c506777e","unresolved":false,"context_lines":[{"line_number":2407,"context_line":"            self.context, instance,"},{"line_number":2408,"context_line":"            vm_state\u003dvm_states.STOPPED, task_state\u003dNone)"},{"line_number":2409,"context_line":""},{"line_number":2410,"context_line":"    def do_test_for_fault_rollback(self, instance, inst_state):"},{"line_number":2411,"context_line":"        with self.compute._error_out_instance_on_exception("},{"line_number":2412,"context_line":"                self.context, instance, instance_state\u003dinst_state):"},{"line_number":2413,"context_line":"            raise exception.InstanceFaultRollback("}],"source_content_type":"text/x-python","patch_set":39,"id":"da20952f_a360bdd0","line":2410,"in_reply_to":"da20952f_cd188078","updated":"2015-09-09 07:27:33.000000000","message":"Done","commit_id":"cca1f3109fcb7933575882b12b3ead2f8dc15069"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"3d9b9792275bcdd540157d66212d669f61fc5847","unresolved":false,"context_lines":[{"line_number":2446,"context_line":""},{"line_number":2447,"context_line":"    @mock.patch(\u0027nova.compute.manager.ComputeManager.start_instance\u0027)"},{"line_number":2448,"context_line":"    @mock.patch(\u0027nova.compute.manager.ComputeManager._get_power_state\u0027,"},{"line_number":2449,"context_line":"                return_value \u003d power_state.SHUTDOWN)"},{"line_number":2450,"context_line":"    @mock.patch(\u0027nova.compute.manager.ComputeManager._instance_update\u0027)"},{"line_number":2451,"context_line":"    def test_error_out_exception_fault_rollback_to_start(self,"},{"line_number":2452,"context_line":"                                                         inst_update_mock,"}],"source_content_type":"text/x-python","patch_set":41,"id":"ba15a1d1_aebf4fcf","line":2449,"updated":"2015-09-14 15:09:22.000000000","message":"you might find having that in the body of the test reads better.","commit_id":"b242de353915a4cf2c5d4b1ba4f51b0465b90c1e"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"f21906c97c43ebc52329f4f857aebc68e49d68eb","unresolved":false,"context_lines":[{"line_number":2446,"context_line":""},{"line_number":2447,"context_line":"    @mock.patch(\u0027nova.compute.manager.ComputeManager.start_instance\u0027)"},{"line_number":2448,"context_line":"    @mock.patch(\u0027nova.compute.manager.ComputeManager._get_power_state\u0027,"},{"line_number":2449,"context_line":"                return_value \u003d power_state.SHUTDOWN)"},{"line_number":2450,"context_line":"    @mock.patch(\u0027nova.compute.manager.ComputeManager._instance_update\u0027)"},{"line_number":2451,"context_line":"    def test_error_out_exception_fault_rollback_to_start(self,"},{"line_number":2452,"context_line":"                                                         inst_update_mock,"}],"source_content_type":"text/x-python","patch_set":41,"id":"ba15a1d1_6694e2e1","line":2449,"in_reply_to":"ba15a1d1_aebf4fcf","updated":"2015-09-15 07:46:18.000000000","message":"Done","commit_id":"b242de353915a4cf2c5d4b1ba4f51b0465b90c1e"}]}
