)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"152c7190eef8678492f8fe3d2484385ca8700c4e","unresolved":false,"context_lines":[{"line_number":19,"context_line":"should be cleaned up before the final patch."},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"Change-Id: I136b5cb86f247dd2af53c91b5067ee67dc85fe26"},{"line_number":22,"context_line":"Related-Blueprint: Change reset-state to involve the Volume Driver"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"3a961159_bda21698","line":22,"updated":"2014-12-17 21:58:49.000000000","message":"The blueprint link is broken.","commit_id":"d8de08abe454f8f87f83d97d25d1a9ea55e4e366"},{"author":{"_account_id":7173,"name":"Scott DAngelo","email":"scott.dangelo@gmail.com","username":"scottda"},"change_message_id":"13a59227f48802affa1b71b7e7de60be06597b27","unresolved":false,"context_lines":[{"line_number":19,"context_line":"should be cleaned up before the final patch."},{"line_number":20,"context_line":""},{"line_number":21,"context_line":"Change-Id: I136b5cb86f247dd2af53c91b5067ee67dc85fe26"},{"line_number":22,"context_line":"Related-Blueprint: Change reset-state to involve the Volume Driver"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"3a961159_5d66922a","line":22,"in_reply_to":"3a961159_bda21698","updated":"2014-12-17 22:20:47.000000000","message":"I\u0027ll fix the link.","commit_id":"d8de08abe454f8f87f83d97d25d1a9ea55e4e366"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"d134f99f2af3fd5b72e6252b469a6a3647cf9b95","unresolved":false,"context_lines":[{"line_number":14,"context_line":"terminate_connection() and detach() when the reset-state"},{"line_number":15,"context_line":"command is used to set state to available."},{"line_number":16,"context_line":""},{"line_number":17,"context_line":"This patch does not adress Nova issues."},{"line_number":18,"context_line":"Note that there is a FIXME comment for valid_status that"},{"line_number":19,"context_line":"should be cleaned up before the final patch."},{"line_number":20,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"3a961159_bf7b4d27","line":17,"updated":"2015-01-18 17:13:40.000000000","message":"Typo: address","commit_id":"904740f8991f9fdcc0323596d19954e1ce3027e0"}],"cinder/api/contrib/volume_actions.py":[{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"53cd431a489e8b80e977f24e0343ce2c6986dac8","unresolved":false,"context_lines":[{"line_number":178,"context_line":"            if update[\u0027status\u0027] \u003d\u003d \u0027available\u0027:"},{"line_number":179,"context_line":"                self.volume_api.terminate_connection(context, volume,"},{"line_number":180,"context_line":"                                                     {}, force\u003dTrue)"},{"line_number":181,"context_line":"                self.volume_api.detach(context, volume)"},{"line_number":182,"context_line":"        except exception.NotFound as e:"},{"line_number":183,"context_line":"            msg \u003d _(\"Force detach not required. Volume \u0027%(id)s\u0027 not found\")"},{"line_number":184,"context_line":"            LOG.debug(msg, {\u0027id\u0027: id})"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_9db71af5","line":181,"updated":"2014-12-17 21:56:35.000000000","message":"I\u0027m not sure you should call both terminate_connection and detach here.  Most drivers implemented terminate_connection only. A small number of drivers implemented detach.  HP 3par may be the only one that has both?  You need to take a look of driver implementations and make sure calling both won\u0027t cause problems for all drivers.","commit_id":"d8de08abe454f8f87f83d97d25d1a9ea55e4e366"},{"author":{"_account_id":7173,"name":"Scott DAngelo","email":"scott.dangelo@gmail.com","username":"scottda"},"change_message_id":"13a59227f48802affa1b71b7e7de60be06597b27","unresolved":false,"context_lines":[{"line_number":178,"context_line":"            if update[\u0027status\u0027] \u003d\u003d \u0027available\u0027:"},{"line_number":179,"context_line":"                self.volume_api.terminate_connection(context, volume,"},{"line_number":180,"context_line":"                                                     {}, force\u003dTrue)"},{"line_number":181,"context_line":"                self.volume_api.detach(context, volume)"},{"line_number":182,"context_line":"        except exception.NotFound as e:"},{"line_number":183,"context_line":"            msg \u003d _(\"Force detach not required. Volume \u0027%(id)s\u0027 not found\")"},{"line_number":184,"context_line":"            LOG.debug(msg, {\u0027id\u0027: id})"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_3d79c6fc","line":181,"in_reply_to":"3a961159_9db71af5","updated":"2014-12-17 22:20:47.000000000","message":"Thanks, I did not know that detach() might not be implemented.","commit_id":"d8de08abe454f8f87f83d97d25d1a9ea55e4e366"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"53cd431a489e8b80e977f24e0343ce2c6986dac8","unresolved":false,"context_lines":[{"line_number":179,"context_line":"                self.volume_api.terminate_connection(context, volume,"},{"line_number":180,"context_line":"                                                     {}, force\u003dTrue)"},{"line_number":181,"context_line":"                self.volume_api.detach(context, volume)"},{"line_number":182,"context_line":"        except exception.NotFound as e:"},{"line_number":183,"context_line":"            msg \u003d _(\"Force detach not required. Volume \u0027%(id)s\u0027 not found\")"},{"line_number":184,"context_line":"            LOG.debug(msg, {\u0027id\u0027: id})"},{"line_number":185,"context_line":"        except exception.VolumeBackendAPIException as e:"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_0a31250b","line":182,"updated":"2014-12-17 21:56:35.000000000","message":"e is not used.","commit_id":"d8de08abe454f8f87f83d97d25d1a9ea55e4e366"},{"author":{"_account_id":7173,"name":"Scott DAngelo","email":"scott.dangelo@gmail.com","username":"scottda"},"change_message_id":"13a59227f48802affa1b71b7e7de60be06597b27","unresolved":false,"context_lines":[{"line_number":179,"context_line":"                self.volume_api.terminate_connection(context, volume,"},{"line_number":180,"context_line":"                                                     {}, force\u003dTrue)"},{"line_number":181,"context_line":"                self.volume_api.detach(context, volume)"},{"line_number":182,"context_line":"        except exception.NotFound as e:"},{"line_number":183,"context_line":"            msg \u003d _(\"Force detach not required. Volume \u0027%(id)s\u0027 not found\")"},{"line_number":184,"context_line":"            LOG.debug(msg, {\u0027id\u0027: id})"},{"line_number":185,"context_line":"        except exception.VolumeBackendAPIException as e:"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_9d863ada","line":182,"in_reply_to":"3a961159_0a31250b","updated":"2014-12-17 22:20:47.000000000","message":"Right, I should remove that.","commit_id":"d8de08abe454f8f87f83d97d25d1a9ea55e4e366"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"53cd431a489e8b80e977f24e0343ce2c6986dac8","unresolved":false,"context_lines":[{"line_number":181,"context_line":"                self.volume_api.detach(context, volume)"},{"line_number":182,"context_line":"        except exception.NotFound as e:"},{"line_number":183,"context_line":"            msg \u003d _(\"Force detach not required. Volume \u0027%(id)s\u0027 not found\")"},{"line_number":184,"context_line":"            LOG.debug(msg, {\u0027id\u0027: id})"},{"line_number":185,"context_line":"        except exception.VolumeBackendAPIException as e:"},{"line_number":186,"context_line":"            msg \u003d _(\"Unable to terminate volume connection from backend.\")"},{"line_number":187,"context_line":"            raise webob.exc.HTTPInternalServerError(explanation\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_aa06511f","line":184,"updated":"2014-12-17 21:56:35.000000000","message":"Should this raise an exception? Admin is trying to change the status to available but the volume doesn\u0027t exist. We want the admin to know that this volume doesn\u0027t exist any more rather than return success.\n\nIf the volume is already detached, that should be a different exception. In that case, we should pass and treat it as success. So I\u0027m not sure if you can get that exception here because it depends on what exception a driver raise and it can be different depending on driver implementation. However, I believe most drivers will return success if a volume is actually not attached. So this is probably fine.","commit_id":"d8de08abe454f8f87f83d97d25d1a9ea55e4e366"},{"author":{"_account_id":7173,"name":"Scott DAngelo","email":"scott.dangelo@gmail.com","username":"scottda"},"change_message_id":"13a59227f48802affa1b71b7e7de60be06597b27","unresolved":false,"context_lines":[{"line_number":181,"context_line":"                self.volume_api.detach(context, volume)"},{"line_number":182,"context_line":"        except exception.NotFound as e:"},{"line_number":183,"context_line":"            msg \u003d _(\"Force detach not required. Volume \u0027%(id)s\u0027 not found\")"},{"line_number":184,"context_line":"            LOG.debug(msg, {\u0027id\u0027: id})"},{"line_number":185,"context_line":"        except exception.VolumeBackendAPIException as e:"},{"line_number":186,"context_line":"            msg \u003d _(\"Unable to terminate volume connection from backend.\")"},{"line_number":187,"context_line":"            raise webob.exc.HTTPInternalServerError(explanation\u003dmsg)"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_dd8362a7","line":184,"in_reply_to":"3a961159_aa06511f","updated":"2014-12-17 22:20:47.000000000","message":"Regarding #1: Yes, if the volume doesn\u0027t exist on the back end storage, we should fail the reset-state if the desired state is \u0027available\u0027, so raising an exception makes sense.\n\n#2: I only looked at LVM, where success is returned if the volume is not attached. I\u0027ll look at the other drivers\u0027 code and see what I can determine.\nIn general, I thought it would be good if we could attempt the terminate_connection() and possibly detach() and ignore the case where the volume was already detached. That would mean the drivers would not need to be changed and there would be no new API needed.","commit_id":"d8de08abe454f8f87f83d97d25d1a9ea55e4e366"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"53cd431a489e8b80e977f24e0343ce2c6986dac8","unresolved":false,"context_lines":[{"line_number":182,"context_line":"        except exception.NotFound as e:"},{"line_number":183,"context_line":"            msg \u003d _(\"Force detach not required. Volume \u0027%(id)s\u0027 not found\")"},{"line_number":184,"context_line":"            LOG.debug(msg, {\u0027id\u0027: id})"},{"line_number":185,"context_line":"        except exception.VolumeBackendAPIException as e:"},{"line_number":186,"context_line":"            msg \u003d _(\"Unable to terminate volume connection from backend.\")"},{"line_number":187,"context_line":"            raise webob.exc.HTTPInternalServerError(explanation\u003dmsg)"},{"line_number":188,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_2a3421fa","line":185,"updated":"2014-12-17 21:56:35.000000000","message":"same","commit_id":"d8de08abe454f8f87f83d97d25d1a9ea55e4e366"},{"author":{"_account_id":7173,"name":"Scott DAngelo","email":"scott.dangelo@gmail.com","username":"scottda"},"change_message_id":"13a59227f48802affa1b71b7e7de60be06597b27","unresolved":false,"context_lines":[{"line_number":182,"context_line":"        except exception.NotFound as e:"},{"line_number":183,"context_line":"            msg \u003d _(\"Force detach not required. Volume \u0027%(id)s\u0027 not found\")"},{"line_number":184,"context_line":"            LOG.debug(msg, {\u0027id\u0027: id})"},{"line_number":185,"context_line":"        except exception.VolumeBackendAPIException as e:"},{"line_number":186,"context_line":"            msg \u003d _(\"Unable to terminate volume connection from backend.\")"},{"line_number":187,"context_line":"            raise webob.exc.HTTPInternalServerError(explanation\u003dmsg)"},{"line_number":188,"context_line":"        try:"}],"source_content_type":"text/x-python","patch_set":1,"id":"3a961159_fda9fe24","line":185,"in_reply_to":"3a961159_2a3421fa","updated":"2014-12-17 22:20:47.000000000","message":"I\u0027ll have to look at various drivers to see where VolumeBackendAPIException is returned. My hope was that we could catch and ignore an exception if it was thrown merely because the volume could not be detached (it was already detached), and raise any other exception as that would indicate some other problem that should be investigated.","commit_id":"d8de08abe454f8f87f83d97d25d1a9ea55e4e366"},{"author":{"_account_id":7173,"name":"Scott DAngelo","email":"scott.dangelo@gmail.com","username":"scottda"},"change_message_id":"e684ff449184fefc0eb7f333dffa7c9bfc1bb1ef","unresolved":false,"context_lines":[{"line_number":178,"context_line":"            if update[\u0027status\u0027] \u003d\u003d \u0027available\u0027:"},{"line_number":179,"context_line":"                self.volume_api.terminate_connection(context, volume,"},{"line_number":180,"context_line":"                                                     {}, force\u003dTrue)"},{"line_number":181,"context_line":"                self.volume_api.detach(context, volume)"},{"line_number":182,"context_line":"        except exception.NotFound as error:"},{"line_number":183,"context_line":"            msg \u003d _(\"Volume \u0027%(id)s\u0027 not found\")"},{"line_number":184,"context_line":"            LOG.debug(msg, {\u0027id\u0027: id})"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a961159_ac176aed","line":181,"updated":"2015-01-12 19:45:23.000000000","message":"xing-yang: I found that detach() must be called here (in the case of LVM) in order to have the volume actually detach. terminate_connection() is not enough.\nI saw that you are correct, many drivers don\u0027t implement detach (which ends up calling detach_volume), but that is what a driver would have to have in order to make reset-state properly clean up in the case where an admin wanted to set a volume stuck in detaching/attaching to \u0027available\u0027.","commit_id":"904740f8991f9fdcc0323596d19954e1ce3027e0"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"d134f99f2af3fd5b72e6252b469a6a3647cf9b95","unresolved":false,"context_lines":[{"line_number":178,"context_line":"            if update[\u0027status\u0027] \u003d\u003d \u0027available\u0027:"},{"line_number":179,"context_line":"                self.volume_api.terminate_connection(context, volume,"},{"line_number":180,"context_line":"                                                     {}, force\u003dTrue)"},{"line_number":181,"context_line":"                self.volume_api.detach(context, volume)"},{"line_number":182,"context_line":"        except exception.NotFound as error:"},{"line_number":183,"context_line":"            msg \u003d _(\"Volume \u0027%(id)s\u0027 not found\")"},{"line_number":184,"context_line":"            LOG.debug(msg, {\u0027id\u0027: id})"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a961159_1fbf01cb","line":181,"in_reply_to":"3a961159_ac176aed","updated":"2015-01-18 17:13:40.000000000","message":"Hi Scott,\n\ndetach() will just be passed if it is not implemented. So it should be fine to call it here after terminate_connection.","commit_id":"904740f8991f9fdcc0323596d19954e1ce3027e0"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"d134f99f2af3fd5b72e6252b469a6a3647cf9b95","unresolved":false,"context_lines":[{"line_number":179,"context_line":"                self.volume_api.terminate_connection(context, volume,"},{"line_number":180,"context_line":"                                                     {}, force\u003dTrue)"},{"line_number":181,"context_line":"                self.volume_api.detach(context, volume)"},{"line_number":182,"context_line":"        except exception.NotFound as error:"},{"line_number":183,"context_line":"            msg \u003d _(\"Volume \u0027%(id)s\u0027 not found\")"},{"line_number":184,"context_line":"            LOG.debug(msg, {\u0027id\u0027: id})"},{"line_number":185,"context_line":"            raise webob.exc.HTTPNotFound(explanation\u003derror.msg)"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a961159_5fa429b8","line":182,"updated":"2015-01-18 17:13:40.000000000","message":"This should be exception.VolumeNotFound.  See line 206.","commit_id":"904740f8991f9fdcc0323596d19954e1ce3027e0"},{"author":{"_account_id":7173,"name":"Scott DAngelo","email":"scott.dangelo@gmail.com","username":"scottda"},"change_message_id":"e684ff449184fefc0eb7f333dffa7c9bfc1bb1ef","unresolved":false,"context_lines":[{"line_number":182,"context_line":"        except exception.NotFound as error:"},{"line_number":183,"context_line":"            msg \u003d _(\"Volume \u0027%(id)s\u0027 not found\")"},{"line_number":184,"context_line":"            LOG.debug(msg, {\u0027id\u0027: id})"},{"line_number":185,"context_line":"            raise webob.exc.HTTPNotFound(explanation\u003derror.msg)"},{"line_number":186,"context_line":"        except exception.VolumeBackendAPIException as error:"},{"line_number":187,"context_line":"            msg \u003d _(\"Unable to terminate Volume \u0027%(id)s\u0027 connection from \""},{"line_number":188,"context_line":"                    \"backend.\")"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a961159_ac73ea4c","line":185,"updated":"2015-01-12 19:45:23.000000000","message":"I went ahead and raised the exception here, since the volume should exist on the backend in order to be \u0027available\u0027.","commit_id":"904740f8991f9fdcc0323596d19954e1ce3027e0"},{"author":{"_account_id":7173,"name":"Scott DAngelo","email":"scott.dangelo@gmail.com","username":"scottda"},"change_message_id":"e684ff449184fefc0eb7f333dffa7c9bfc1bb1ef","unresolved":false,"context_lines":[{"line_number":185,"context_line":"            raise webob.exc.HTTPNotFound(explanation\u003derror.msg)"},{"line_number":186,"context_line":"        except exception.VolumeBackendAPIException as error:"},{"line_number":187,"context_line":"            msg \u003d _(\"Unable to terminate Volume \u0027%(id)s\u0027 connection from \""},{"line_number":188,"context_line":"                    \"backend.\")"},{"line_number":189,"context_line":"            LOG.debug(msg, {\u0027id\u0027: id})"},{"line_number":190,"context_line":"        try:"},{"line_number":191,"context_line":"            db.volume_update(context, id, update)"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a961159_6cce625d","line":188,"updated":"2015-01-12 19:45:23.000000000","message":"I did Not raise an exception here, since a backend that did not implement detach() or could not accomodate the request for some other reason, should not fail the reset-state command. This is to keep the reset-state command backward compatible to it\u0027s current functionality, which only sets the state to \u0027available\u0027 in the cinder DB.","commit_id":"904740f8991f9fdcc0323596d19954e1ce3027e0"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"d134f99f2af3fd5b72e6252b469a6a3647cf9b95","unresolved":false,"context_lines":[{"line_number":185,"context_line":"            raise webob.exc.HTTPNotFound(explanation\u003derror.msg)"},{"line_number":186,"context_line":"        except exception.VolumeBackendAPIException as error:"},{"line_number":187,"context_line":"            msg \u003d _(\"Unable to terminate Volume \u0027%(id)s\u0027 connection from \""},{"line_number":188,"context_line":"                    \"backend.\")"},{"line_number":189,"context_line":"            LOG.debug(msg, {\u0027id\u0027: id})"},{"line_number":190,"context_line":"        try:"},{"line_number":191,"context_line":"            db.volume_update(context, id, update)"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a961159_1f962149","line":188,"in_reply_to":"3a961159_6cce625d","updated":"2015-01-18 17:13:40.000000000","message":"The detach function will be passed if it is not implemented.  So it shouldn\u0027t raise an exception.  If you don\u0027t throw an exception here, it should be at least an error message instead of debug.","commit_id":"904740f8991f9fdcc0323596d19954e1ce3027e0"},{"author":{"_account_id":6491,"name":"xing-yang","email":"xingyang105@gmail.com","username":"xing-yang"},"change_message_id":"d134f99f2af3fd5b72e6252b469a6a3647cf9b95","unresolved":false,"context_lines":[{"line_number":189,"context_line":"            LOG.debug(msg, {\u0027id\u0027: id})"},{"line_number":190,"context_line":"        try:"},{"line_number":191,"context_line":"            db.volume_update(context, id, update)"},{"line_number":192,"context_line":"        except exception.NotFound as error:"},{"line_number":193,"context_line":"            raise webob.exc.HTTPNotFound(explanation\u003derror.msg)"},{"line_number":194,"context_line":""},{"line_number":195,"context_line":"        notifier.info(context, \u0027volumes.reset_status.end\u0027,"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a961159_df8f392c","line":192,"updated":"2015-01-18 17:13:40.000000000","message":"This should be exception.VolumeNotFound.  See line 206.","commit_id":"904740f8991f9fdcc0323596d19954e1ce3027e0"}]}
