)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"2a8e73ff00e418b7523f013ec968d095ccb8f451","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     zhaodan7597 \u003czhaodan7597@fiberhome.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2018-12-19 06:10:42 +0000"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Catch the not found exception when powering off a wmware instance"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Bug description:"},{"line_number":10,"context_line":"when creating a vmware instance from a volume is failed,"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":12,"id":"3f79a3b5_9f572d29","line":7,"range":{"start_line":7,"start_character":50,"end_line":7,"end_character":56},"updated":"2018-12-19 06:28:03.000000000","message":"nit vmware","commit_id":"826f1fb749dd9db00edf677bab34d8d946d15878"},{"author":{"_account_id":27101,"name":"zhaodan7597","email":"zhaodan7597@fiberhome.com","username":"zhaodan"},"change_message_id":"ac74ee8be6cfecab6e99d8902b19ceb81e049e8a","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     zhaodan7597 \u003czhaodan7597@fiberhome.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2018-12-19 06:10:42 +0000"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Catch the not found exception when powering off a wmware instance"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Bug description:"},{"line_number":10,"context_line":"when creating a vmware instance from a volume is failed,"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":12,"id":"3f79a3b5_85427e0d","line":7,"range":{"start_line":7,"start_character":50,"end_line":7,"end_character":56},"in_reply_to":"3f79a3b5_9f572d29","updated":"2018-12-19 07:33:18.000000000","message":"Done","commit_id":"826f1fb749dd9db00edf677bab34d8d946d15878"}],"nova/virt/vmwareapi/driver.py":[{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"e2c993bc5ba8627eb3b9c0ddc23cd6618293fdda","unresolved":false,"context_lines":[{"line_number":433,"context_line":"            # Certain disk types, for example \u0027IDE\u0027 do not support hot"},{"line_number":434,"context_line":"            # plugging. Hence we need to power off the instance and update"},{"line_number":435,"context_line":"            # the instance state."},{"line_number":436,"context_line":"            try:"},{"line_number":437,"context_line":"                self._vmops.power_off(instance)"},{"line_number":438,"context_line":"            except exception.InstanceNotFound:"},{"line_number":439,"context_line":"                return"},{"line_number":440,"context_line":"            for disk in block_device_mapping:"},{"line_number":441,"context_line":"                connection_info \u003d disk[\u0027connection_info\u0027]"},{"line_number":442,"context_line":"                try:"}],"source_content_type":"text/x-python","patch_set":2,"id":"5f7c97a3_546953f5","line":439,"range":{"start_line":436,"start_character":0,"end_line":439,"end_character":22},"updated":"2018-05-30 09:15:47.000000000","message":"How would this help with your bug? the volume is still in-use?","commit_id":"370d00748896cd018b915f7e979249bbf0fac455"},{"author":{"_account_id":27101,"name":"zhaodan7597","email":"zhaodan7597@fiberhome.com","username":"zhaodan"},"change_message_id":"836a3d7a6c9be6919abfdfce44fc527c113e2e6f","unresolved":false,"context_lines":[{"line_number":433,"context_line":"            # Certain disk types, for example \u0027IDE\u0027 do not support hot"},{"line_number":434,"context_line":"            # plugging. Hence we need to power off the instance and update"},{"line_number":435,"context_line":"            # the instance state."},{"line_number":436,"context_line":"            try:"},{"line_number":437,"context_line":"                self._vmops.power_off(instance)"},{"line_number":438,"context_line":"            except exception.InstanceNotFound:"},{"line_number":439,"context_line":"                return"},{"line_number":440,"context_line":"            for disk in block_device_mapping:"},{"line_number":441,"context_line":"                connection_info \u003d disk[\u0027connection_info\u0027]"},{"line_number":442,"context_line":"                try:"}],"source_content_type":"text/x-python","patch_set":2,"id":"5f7c97a3_2f747ece","line":439,"range":{"start_line":436,"start_character":0,"end_line":439,"end_character":22},"in_reply_to":"5f7c97a3_546953f5","updated":"2018-05-30 10:00:25.000000000","message":"Before I do this, when a vmware instance bfv is failed, it will automatically clean up the volume attached to it . First, it will power off the machine, but at the same time there is no really VM in the VMware Vcenter, so the poweroff operation will raise an \"InstanceNotFound\" exception, the below detach operation will not be execute, so , the state of the volume will be keep in \"in use\" state. When deleting the virtual machine, also, detach operation will not be execute, the status of the volume is still \"in use\" and cannot be deleted.\nAfter I change this, when the VM creation failed, there will not raise an exception and return directly, so, the below detach operation will be execute, making the volume restore \"available\" state.","commit_id":"370d00748896cd018b915f7e979249bbf0fac455"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"1ec93897670a20a7c9f80e507ce18b86de62aea1","unresolved":false,"context_lines":[{"line_number":435,"context_line":"            # the instance state."},{"line_number":436,"context_line":"            try:"},{"line_number":437,"context_line":"                self._vmops.power_off(instance)"},{"line_number":438,"context_line":"            except exception.InstanceNotFound:"},{"line_number":439,"context_line":"                return"},{"line_number":440,"context_line":"            for disk in block_device_mapping:"},{"line_number":441,"context_line":"                connection_info \u003d disk[\u0027connection_info\u0027]"},{"line_number":442,"context_line":"                try:"}],"source_content_type":"text/x-python","patch_set":5,"id":"3f79a3b5_2b6138d5","line":439,"range":{"start_line":438,"start_character":12,"end_line":439,"end_character":22},"updated":"2018-09-27 02:23:48.000000000","message":"Sorry, I\u0027m a little bit confused here, are you going to run the rest of detach flow or you want to just return? it seems from the commit message, I want to do the detach flow?\n\nAnother thing is that you might want to add a Log here that inform instance was not found and we are doing the rest of the flow.","commit_id":"99e7105f336222ac7c5f0a7c90c8d90377fda611"},{"author":{"_account_id":27101,"name":"zhaodan7597","email":"zhaodan7597@fiberhome.com","username":"zhaodan"},"change_message_id":"857fe224f7211ec91f6257f72eb6a2b1d6e86885","unresolved":false,"context_lines":[{"line_number":435,"context_line":"            # the instance state."},{"line_number":436,"context_line":"            try:"},{"line_number":437,"context_line":"                self._vmops.power_off(instance)"},{"line_number":438,"context_line":"            except exception.InstanceNotFound:"},{"line_number":439,"context_line":"                return"},{"line_number":440,"context_line":"            for disk in block_device_mapping:"},{"line_number":441,"context_line":"                connection_info \u003d disk[\u0027connection_info\u0027]"},{"line_number":442,"context_line":"                try:"}],"source_content_type":"text/x-python","patch_set":5,"id":"3f79a3b5_2b361851","line":439,"range":{"start_line":438,"start_character":12,"end_line":439,"end_character":22},"in_reply_to":"3f79a3b5_2b6138d5","updated":"2018-09-27 02:59:06.000000000","message":"I want just return, because there is no instance in vmware, so, there is no need to detach volume, just return, go on to execute \"self._vmops.destroy(instance, destroy_disks)\" in destory() function","commit_id":"99e7105f336222ac7c5f0a7c90c8d90377fda611"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"2a8e73ff00e418b7523f013ec968d095ccb8f451","unresolved":false,"context_lines":[{"line_number":437,"context_line":"                self._vmops.power_off(instance)"},{"line_number":438,"context_line":"            except exception.InstanceNotFound:"},{"line_number":439,"context_line":"                raise vexc.ManagedObjectNotFoundException()"},{"line_number":440,"context_line":"            for disk in block_device_mapping:"},{"line_number":441,"context_line":"                connection_info \u003d disk[\u0027connection_info\u0027]"},{"line_number":442,"context_line":"                try:"},{"line_number":443,"context_line":"                    # NOTE(claudiub): Passing None as the context, as it is"},{"line_number":444,"context_line":"                    # not currently used."},{"line_number":445,"context_line":"                    self.detach_volume(None, connection_info, instance,"},{"line_number":446,"context_line":"                                       disk.get(\u0027device_name\u0027))"},{"line_number":447,"context_line":"                except exception.DiskNotFound:"},{"line_number":448,"context_line":"                    LOG.warning(\u0027The volume %s does not exist!\u0027,"},{"line_number":449,"context_line":"                                disk.get(\u0027device_name\u0027),"},{"line_number":450,"context_line":"                                instance\u003dinstance)"},{"line_number":451,"context_line":"                except Exception as e:"},{"line_number":452,"context_line":"                    with excutils.save_and_reraise_exception():"},{"line_number":453,"context_line":"                        LOG.error(\"Failed to detach %(device_name)s. \""},{"line_number":454,"context_line":"                                  \"Exception: %(exc)s\","},{"line_number":455,"context_line":"                                  {\u0027device_name\u0027: disk.get(\u0027device_name\u0027),"},{"line_number":456,"context_line":"                                   \u0027exc\u0027: e},"},{"line_number":457,"context_line":"                                  instance\u003dinstance)"},{"line_number":458,"context_line":""},{"line_number":459,"context_line":"    def destroy(self, context, instance, network_info, block_device_info\u003dNone,"},{"line_number":460,"context_line":"                destroy_disks\u003dTrue):"}],"source_content_type":"text/x-python","patch_set":12,"id":"3f79a3b5_aa5e6911","line":457,"range":{"start_line":440,"start_character":12,"end_line":457,"end_character":52},"updated":"2018-12-19 06:28:03.000000000","message":"should we still perform these?","commit_id":"826f1fb749dd9db00edf677bab34d8d946d15878"},{"author":{"_account_id":27101,"name":"zhaodan7597","email":"zhaodan7597@fiberhome.com","username":"zhaodan"},"change_message_id":"ce817a3448e946f1e0b9017744a0534e1fc6c909","unresolved":false,"context_lines":[{"line_number":437,"context_line":"                self._vmops.power_off(instance)"},{"line_number":438,"context_line":"            except exception.InstanceNotFound:"},{"line_number":439,"context_line":"                raise vexc.ManagedObjectNotFoundException()"},{"line_number":440,"context_line":"            for disk in block_device_mapping:"},{"line_number":441,"context_line":"                connection_info \u003d disk[\u0027connection_info\u0027]"},{"line_number":442,"context_line":"                try:"},{"line_number":443,"context_line":"                    # NOTE(claudiub): Passing None as the context, as it is"},{"line_number":444,"context_line":"                    # not currently used."},{"line_number":445,"context_line":"                    self.detach_volume(None, connection_info, instance,"},{"line_number":446,"context_line":"                                       disk.get(\u0027device_name\u0027))"},{"line_number":447,"context_line":"                except exception.DiskNotFound:"},{"line_number":448,"context_line":"                    LOG.warning(\u0027The volume %s does not exist!\u0027,"},{"line_number":449,"context_line":"                                disk.get(\u0027device_name\u0027),"},{"line_number":450,"context_line":"                                instance\u003dinstance)"},{"line_number":451,"context_line":"                except Exception as e:"},{"line_number":452,"context_line":"                    with excutils.save_and_reraise_exception():"},{"line_number":453,"context_line":"                        LOG.error(\"Failed to detach %(device_name)s. \""},{"line_number":454,"context_line":"                                  \"Exception: %(exc)s\","},{"line_number":455,"context_line":"                                  {\u0027device_name\u0027: disk.get(\u0027device_name\u0027),"},{"line_number":456,"context_line":"                                   \u0027exc\u0027: e},"},{"line_number":457,"context_line":"                                  instance\u003dinstance)"},{"line_number":458,"context_line":""},{"line_number":459,"context_line":"    def destroy(self, context, instance, network_info, block_device_info\u003dNone,"},{"line_number":460,"context_line":"                destroy_disks\u003dTrue):"}],"source_content_type":"text/x-python","patch_set":12,"id":"3f79a3b5_2a11f9ae","line":457,"range":{"start_line":440,"start_character":12,"end_line":457,"end_character":52},"in_reply_to":"3f79a3b5_2ad0192a","updated":"2018-12-19 06:58:48.000000000","message":"I have done some tests, I think there is no need to peform these if power_off failed.","commit_id":"826f1fb749dd9db00edf677bab34d8d946d15878"},{"author":{"_account_id":15888,"name":"Zhenyu Zheng","email":"zheng.zhenyu@outlook.com","username":"Kevin_Zheng"},"change_message_id":"8c05114915b424ec8824562d25264d715770926b","unresolved":false,"context_lines":[{"line_number":437,"context_line":"                self._vmops.power_off(instance)"},{"line_number":438,"context_line":"            except exception.InstanceNotFound:"},{"line_number":439,"context_line":"                raise vexc.ManagedObjectNotFoundException()"},{"line_number":440,"context_line":"            for disk in block_device_mapping:"},{"line_number":441,"context_line":"                connection_info \u003d disk[\u0027connection_info\u0027]"},{"line_number":442,"context_line":"                try:"},{"line_number":443,"context_line":"                    # NOTE(claudiub): Passing None as the context, as it is"},{"line_number":444,"context_line":"                    # not currently used."},{"line_number":445,"context_line":"                    self.detach_volume(None, connection_info, instance,"},{"line_number":446,"context_line":"                                       disk.get(\u0027device_name\u0027))"},{"line_number":447,"context_line":"                except exception.DiskNotFound:"},{"line_number":448,"context_line":"                    LOG.warning(\u0027The volume %s does not exist!\u0027,"},{"line_number":449,"context_line":"                                disk.get(\u0027device_name\u0027),"},{"line_number":450,"context_line":"                                instance\u003dinstance)"},{"line_number":451,"context_line":"                except Exception as e:"},{"line_number":452,"context_line":"                    with excutils.save_and_reraise_exception():"},{"line_number":453,"context_line":"                        LOG.error(\"Failed to detach %(device_name)s. \""},{"line_number":454,"context_line":"                                  \"Exception: %(exc)s\","},{"line_number":455,"context_line":"                                  {\u0027device_name\u0027: disk.get(\u0027device_name\u0027),"},{"line_number":456,"context_line":"                                   \u0027exc\u0027: e},"},{"line_number":457,"context_line":"                                  instance\u003dinstance)"},{"line_number":458,"context_line":""},{"line_number":459,"context_line":"    def destroy(self, context, instance, network_info, block_device_info\u003dNone,"},{"line_number":460,"context_line":"                destroy_disks\u003dTrue):"}],"source_content_type":"text/x-python","patch_set":12,"id":"3f79a3b5_2ad0192a","line":457,"range":{"start_line":440,"start_character":12,"end_line":457,"end_character":52},"in_reply_to":"3f79a3b5_6a5e11e3","updated":"2018-12-19 06:45:29.000000000","message":"I know, maybe I wasn\u0027t clear enough, should we still perform these if vmops.power_off faild?","commit_id":"826f1fb749dd9db00edf677bab34d8d946d15878"},{"author":{"_account_id":27101,"name":"zhaodan7597","email":"zhaodan7597@fiberhome.com","username":"zhaodan"},"change_message_id":"40010ec262bdff489798d81ec1594a89ba2d6786","unresolved":false,"context_lines":[{"line_number":437,"context_line":"                self._vmops.power_off(instance)"},{"line_number":438,"context_line":"            except exception.InstanceNotFound:"},{"line_number":439,"context_line":"                raise vexc.ManagedObjectNotFoundException()"},{"line_number":440,"context_line":"            for disk in block_device_mapping:"},{"line_number":441,"context_line":"                connection_info \u003d disk[\u0027connection_info\u0027]"},{"line_number":442,"context_line":"                try:"},{"line_number":443,"context_line":"                    # NOTE(claudiub): Passing None as the context, as it is"},{"line_number":444,"context_line":"                    # not currently used."},{"line_number":445,"context_line":"                    self.detach_volume(None, connection_info, instance,"},{"line_number":446,"context_line":"                                       disk.get(\u0027device_name\u0027))"},{"line_number":447,"context_line":"                except exception.DiskNotFound:"},{"line_number":448,"context_line":"                    LOG.warning(\u0027The volume %s does not exist!\u0027,"},{"line_number":449,"context_line":"                                disk.get(\u0027device_name\u0027),"},{"line_number":450,"context_line":"                                instance\u003dinstance)"},{"line_number":451,"context_line":"                except Exception as e:"},{"line_number":452,"context_line":"                    with excutils.save_and_reraise_exception():"},{"line_number":453,"context_line":"                        LOG.error(\"Failed to detach %(device_name)s. \""},{"line_number":454,"context_line":"                                  \"Exception: %(exc)s\","},{"line_number":455,"context_line":"                                  {\u0027device_name\u0027: disk.get(\u0027device_name\u0027),"},{"line_number":456,"context_line":"                                   \u0027exc\u0027: e},"},{"line_number":457,"context_line":"                                  instance\u003dinstance)"},{"line_number":458,"context_line":""},{"line_number":459,"context_line":"    def destroy(self, context, instance, network_info, block_device_info\u003dNone,"},{"line_number":460,"context_line":"                destroy_disks\u003dTrue):"}],"source_content_type":"text/x-python","patch_set":12,"id":"3f79a3b5_6a5e11e3","line":457,"range":{"start_line":440,"start_character":12,"end_line":457,"end_character":52},"in_reply_to":"3f79a3b5_aa5e6911","updated":"2018-12-19 06:43:07.000000000","message":"I think we should perform these, because this function will also be used when deleting an active instance.","commit_id":"826f1fb749dd9db00edf677bab34d8d946d15878"},{"author":{"_account_id":6167,"name":"Ken\u0027ichi Ohmichi","email":"ken1ohmichi@gmail.com","username":"oomichi"},"change_message_id":"6ef2c8f8031443416b0ec5826e31d49d36ba49c1","unresolved":false,"context_lines":[{"line_number":474,"context_line":"        # We need to detach attached volumes"},{"line_number":475,"context_line":"        if block_device_info is not None:"},{"line_number":476,"context_line":"            try:"},{"line_number":477,"context_line":"                self._detach_instance_volumes(instance, block_device_info)"},{"line_number":478,"context_line":"            except vexc.ManagedObjectNotFoundException:"},{"line_number":479,"context_line":"                LOG.warning(\u0027Instance does not exists. Proceeding to \u0027"},{"line_number":480,"context_line":"                            \u0027delete instance properties on datastore\u0027,"}],"source_content_type":"text/x-python","patch_set":13,"id":"1f769fc5_a0e6f7e7","line":477,"range":{"start_line":477,"start_character":21,"end_line":477,"end_character":45},"updated":"2018-12-28 01:57:02.000000000","message":"I just want to confirm this exception is raised at http://git.openstack.org/cgit/openstack/nova/tree/nova/virt/vmwareapi/vm_util.py#n1539 , right?\n\n_detach_instance_volumes() is called from here only, and the following exception handling seems for not-found instance case. So why don\u0027t we add InstanceNotFound handling to line 478 instead? That could cover more cases I feel.","commit_id":"2e46bb3a4678c3de86d86b34f226a127120c1904"}]}
