)]}'
{"nova/virt/block_device.py":[{"author":{"_account_id":31827,"name":"Jorhson Deng","email":"jorhson_deng@163.com","username":"dengzhaosen"},"change_message_id":"af4c3045919908ec2145d61b46c47c542e36b9bf","unresolved":true,"context_lines":[{"line_number":554,"context_line":"            # value."},{"line_number":555,"context_line":"            connection_info[\u0027multiattach\u0027] \u003d True"},{"line_number":556,"context_line":""},{"line_number":557,"context_line":"        try:"},{"line_number":558,"context_line":"            if do_driver_attach:"},{"line_number":559,"context_line":"                encryption \u003d encryptors.get_encryption_metadata("},{"line_number":560,"context_line":"                    context, volume_api, volume_id, connection_info)"}],"source_content_type":"text/x-python","patch_set":1,"id":"e82e81ab_c6e9bd4c","line":557,"updated":"2021-06-29 01:23:20.000000000","message":"I am not sure is appropriate. If raising the exception when calling the virt_driver.attach_volume, there will excute the  virt_driver.detach_volume, and this will also raise exception, and will not call the volume_api.attachment_delete.","commit_id":"beba1a9d7e2977cdd24936394104bd932aa748f6"},{"author":{"_account_id":31827,"name":"Jorhson Deng","email":"jorhson_deng@163.com","username":"dengzhaosen"},"change_message_id":"af4c3045919908ec2145d61b46c47c542e36b9bf","unresolved":true,"context_lines":[{"line_number":590,"context_line":"                # error state due to other factors - we remove it"},{"line_number":591,"context_line":"                # and clean up things (basically, bootstrap"},{"line_number":592,"context_line":"                # everything)"},{"line_number":593,"context_line":"                try:"},{"line_number":594,"context_line":"                    if do_driver_attach:"},{"line_number":595,"context_line":"                        LOG.info(\u0027Attempting cleanup of partial advances \u0027"},{"line_number":596,"context_line":"                                 \u0027on cinder, to get to a cleaned state.\u0027,"},{"line_number":597,"context_line":"                                 instance\u003dinstance)"},{"line_number":598,"context_line":"                        virt_driver.detach_volume("},{"line_number":599,"context_line":"                            context, connection_info,"},{"line_number":600,"context_line":"                            instance, self[\u0027mount_device\u0027],"},{"line_number":601,"context_line":"                            encryption\u003dencryption)"},{"line_number":602,"context_line":""},{"line_number":603,"context_line":"                    # Delete attachment to mark volume as \"available\"."},{"line_number":604,"context_line":"                    if self[\u0027attachment_id\u0027]:"},{"line_number":605,"context_line":"                        volume_api.attachment_delete("},{"line_number":606,"context_line":"                            context, self[\u0027attachment_id\u0027])"},{"line_number":607,"context_line":"                        LOG.debug(\u0027Done with attachment deletion.\u0027,"},{"line_number":608,"context_line":"                                  instance \u003d instance)"},{"line_number":609,"context_line":"                except Exception:"},{"line_number":610,"context_line":"                    # We should not be reaching this point ideally."},{"line_number":611,"context_line":"                    LOG.debug(\"Failed to roll-back (i.e. detach) volume, \""}],"source_content_type":"text/x-python","patch_set":1,"id":"2217980a_41dd28f5","line":608,"range":{"start_line":593,"start_character":0,"end_line":608,"end_character":54},"updated":"2021-06-29 01:23:20.000000000","message":"The two rollback function cannnot be placed in here. if do virt_driver.detach_volume failed, we also should excute the code volume_api.attachment_delete. But in here, it will raise the exception, and ignore the volume_api.attachment_delete.","commit_id":"beba1a9d7e2977cdd24936394104bd932aa748f6"}]}
