)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":15935,"name":"Xiangfei Zhu","email":"xiangfeiz@vmware.com","username":"xiangfeiz"},"change_message_id":"ddf024ab0b6faf05c03d688883a8742a275f261c","unresolved":false,"context_lines":[{"line_number":10,"context_line":"raise 400 invalid volume instead of 500 to give user good knowledge of"},{"line_number":11,"context_line":"deleting failed reason."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Closes-bug: #1482066"},{"line_number":14,"context_line":"Change-Id: I591f65823d1f212e92434323905cc9c4fbe6fd96"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":1,"id":"1a4dcd0f_e732c90f","line":13,"updated":"2015-08-06 09:22:19.000000000","message":"Is this fix for bug 1482120 instead?","commit_id":"0f19e52d2aa826a025fc3ac62ad7d9cdf2542dce"},{"author":{"_account_id":17151,"name":"chenying","email":"chenyingko@gmail.com","username":"chenying"},"change_message_id":"5302f3b97413ee0aad43c838b784012eca686a04","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Handler KeyManager exception when delete an volume"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This patch add exception handler when deleting key of an encrytion volume,"},{"line_number":10,"context_line":"raise 400 invalid volume instead of 500 to give user good knowledge of"},{"line_number":11,"context_line":"deleting failed reason."},{"line_number":12,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"fa1b9901_73dbe94f","line":9,"updated":"2015-08-20 01:46:55.000000000","message":"s/add/adds","commit_id":"0963c06480fc88530870ef04b37876a9ba06f6b2"},{"author":{"_account_id":17444,"name":"Jay.Shen","email":"shenhong09@huawei.com","username":"Jay.Shen"},"change_message_id":"277862b41421b6617b79a996d688c1958b9ae025","unresolved":false,"context_lines":[{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Handler KeyManager exception when delete an volume"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This patch add exception handler when deleting key of an encrytion volume,"},{"line_number":10,"context_line":"raise 400 invalid volume instead of 500 to give user good knowledge of"},{"line_number":11,"context_line":"deleting failed reason."},{"line_number":12,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"1a4dcd0f_27d42cbb","line":9,"updated":"2015-08-06 10:55:18.000000000","message":"s/encrytion/encryption","commit_id":"0963c06480fc88530870ef04b37876a9ba06f6b2"},{"author":{"_account_id":17405,"name":"Jacob Gregor","email":"jgregor@us.ibm.com","username":"jgregor"},"change_message_id":"0720eecbf9cf8def08518127fd16fe01c02d9e75","unresolved":false,"context_lines":[{"line_number":7,"context_line":"Handler KeyManager exception when delete an volume"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This patch add exception handler when deleting key of an encrytion volume,"},{"line_number":10,"context_line":"raise 400 invalid volume instead of 500 to give user good knowledge of"},{"line_number":11,"context_line":"deleting failed reason."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Closes-bug: #1482120"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"1a4dcd0f_9eb21e93","line":10,"updated":"2015-08-06 14:18:12.000000000","message":"Suggestion: Change \"an encrytion volume, raise 400 ...\" to \"an encryption volume. Raise 400 ...\".","commit_id":"0963c06480fc88530870ef04b37876a9ba06f6b2"},{"author":{"_account_id":17405,"name":"Jacob Gregor","email":"jgregor@us.ibm.com","username":"jgregor"},"change_message_id":"0720eecbf9cf8def08518127fd16fe01c02d9e75","unresolved":false,"context_lines":[{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This patch add exception handler when deleting key of an encrytion volume,"},{"line_number":10,"context_line":"raise 400 invalid volume instead of 500 to give user good knowledge of"},{"line_number":11,"context_line":"deleting failed reason."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"Closes-bug: #1482120"},{"line_number":14,"context_line":"Change-Id: I591f65823d1f212e92434323905cc9c4fbe6fd96"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":2,"id":"1a4dcd0f_5eb7b639","line":11,"updated":"2015-08-06 14:18:12.000000000","message":"Suggestion: Change \" to give user good knowledge of deleting failed reason.\" to \" to give the user a better understanding why deleting failed.\"","commit_id":"0963c06480fc88530870ef04b37876a9ba06f6b2"},{"author":{"_account_id":17405,"name":"Jacob Gregor","email":"jgregor@us.ibm.com","username":"jgregor"},"change_message_id":"4f83fbe5a856a49fdc4f7b4c737e8020b83f6c92","unresolved":false,"context_lines":[{"line_number":4,"context_line":"Commit:     Eli Qiao \u003cliyong.qiao@intel.com\u003e"},{"line_number":5,"context_line":"CommitDate: 2015-08-25 16:15:35 +0800"},{"line_number":6,"context_line":""},{"line_number":7,"context_line":"Handler KeyManager exception when delete an volume"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"This patch adds exception handler when deleting key of an encryption volume."},{"line_number":10,"context_line":"Raise 400 invalid volume instead of 500 to give the user a better understanding"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":3,"id":"da20952f_5e9da1ba","line":7,"updated":"2015-08-28 19:30:59.000000000","message":"\"when delete an volume\" -\u003e \"when deleting a volume\"","commit_id":"efa18fa6b34055c2a7c01d1df2acc3751550c801"}],"cinder/volume/api.py":[{"author":{"_account_id":15935,"name":"Xiangfei Zhu","email":"xiangfeiz@vmware.com","username":"xiangfeiz"},"change_message_id":"ddf024ab0b6faf05c03d688883a8742a275f261c","unresolved":false,"context_lines":[{"line_number":385,"context_line":"            try:"},{"line_number":386,"context_line":"                self.key_manager.delete_key(context, encryption_key_id)"},{"line_number":387,"context_line":"            except Exception as e:"},{"line_number":388,"context_line":"                msg \u003d _(\"Unable to delete encryption volume: %s\") % e.msg"},{"line_number":389,"context_line":"                raise exception.InvalidVolume(reason\u003dmsg)"},{"line_number":390,"context_line":""},{"line_number":391,"context_line":"        now \u003d timeutils.utcnow()"}],"source_content_type":"text/x-python","patch_set":1,"id":"1a4dcd0f_47013d05","line":388,"updated":"2015-08-06 09:22:19.000000000","message":"encryption volume \u003e encrypted volume","commit_id":"0f19e52d2aa826a025fc3ac62ad7d9cdf2542dce"},{"author":{"_account_id":17444,"name":"Jay.Shen","email":"shenhong09@huawei.com","username":"Jay.Shen"},"change_message_id":"277862b41421b6617b79a996d688c1958b9ae025","unresolved":false,"context_lines":[{"line_number":385,"context_line":"            try:"},{"line_number":386,"context_line":"                self.key_manager.delete_key(context, encryption_key_id)"},{"line_number":387,"context_line":"            except Exception as e:"},{"line_number":388,"context_line":"                msg \u003d _(\"Unable to delete encrypted volume: %s\") % e.msg"},{"line_number":389,"context_line":"                raise exception.InvalidVolume(reason\u003dmsg)"},{"line_number":390,"context_line":""},{"line_number":391,"context_line":"        now \u003d timeutils.utcnow()"}],"source_content_type":"text/x-python","patch_set":2,"id":"1a4dcd0f_07e6d0af","line":388,"updated":"2015-08-06 10:55:18.000000000","message":"Add \u0027.\u0027 in the end","commit_id":"0963c06480fc88530870ef04b37876a9ba06f6b2"},{"author":{"_account_id":1736,"name":"Ivan Kolodyazhny","email":"e0ne@e0ne.info","username":"e0ne"},"change_message_id":"8d520a287e928d353e3f0e58c9cfa1bdd46db066","unresolved":false,"context_lines":[{"line_number":396,"context_line":"        if encryption_key_id is not None:"},{"line_number":397,"context_line":"            try:"},{"line_number":398,"context_line":"                self.key_manager.delete_key(context, encryption_key_id)"},{"line_number":399,"context_line":"            except Exception as e:"},{"line_number":400,"context_line":"                msg \u003d _(\"Unable to delete encrypted volume: %s.\") % e.msg"},{"line_number":401,"context_line":"                raise exception.InvalidVolume(reason\u003dmsg)"},{"line_number":402,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"da20952f_590b51d6","line":399,"updated":"2015-09-04 19:15:56.000000000","message":"Please, handle more specific exception here","commit_id":"35a90fd3b599186ef49da2908f9ac452446339db"},{"author":{"_account_id":12175,"name":"Eli Qiao","email":"qiaoliyong@gmail.com","username":"Eli"},"change_message_id":"810e902dc0c68382ee14cf1f17b8a4c693eb455e","unresolved":false,"context_lines":[{"line_number":396,"context_line":"        if encryption_key_id is not None:"},{"line_number":397,"context_line":"            try:"},{"line_number":398,"context_line":"                self.key_manager.delete_key(context, encryption_key_id)"},{"line_number":399,"context_line":"            except Exception as e:"},{"line_number":400,"context_line":"                msg \u003d _(\"Unable to delete encrypted volume: %s.\") % e.msg"},{"line_number":401,"context_line":"                raise exception.InvalidVolume(reason\u003dmsg)"},{"line_number":402,"context_line":""}],"source_content_type":"text/x-python","patch_set":5,"id":"da20952f_bd912249","line":399,"in_reply_to":"da20952f_590b51d6","updated":"2015-09-06 07:16:58.000000000","message":"but I don\u0027t find it is easy to identify what is the specific exception here should be.\nthe reason is we have several key_manager , and they raise different exception\n\nfor ex:\n\n./cinder/keymgr/barbican.py:\n\n\n        try:$                                                                   \n            secret_ref \u003d self._create_secret_ref(key_id, barbican_client)$      \n            barbican_client.secrets.delete(secret_ref)$                         \n        except Exception:$                                                      \n            with excutils.save_and_reraise_exception():$                        \n                LOG.exception(_LE(\"Error deleting key.\"))$\n\n\n./cinder/keymgr/conf_key_mgr.py:\n\n    def delete_key(self, ctxt, key_id, **kwargs):$                              \n        if ctxt is None:$                                                       \n            raise exception.NotAuthorized()$                                    \n$                                                                               \n        if key_id !\u003d self.key_id:$                                              \n            raise exception.KeyManagerError($                                   \n                reason\u003d\"cannot delete non-existent key\")$","commit_id":"35a90fd3b599186ef49da2908f9ac452446339db"}]}
