)]}'
{"nova/exception.py":[{"author":{"_account_id":19590,"name":"Sarafraj Singh","email":"Sarafraj.Singh@intel.com","username":"sarafrajsingh"},"change_message_id":"f2530ba6ce189f362417c6439a700ab5f1cf1d94","unresolved":false,"context_lines":[{"line_number":540,"context_line":"    code \u003d 409"},{"line_number":541,"context_line":""},{"line_number":542,"context_line":""},{"line_number":543,"context_line":"class FailedToAttach(Invalid):"},{"line_number":544,"context_line":"    msg_fmt \u003d _(\"Command to hypervisor failed with error code (%(errcode)s)\")"},{"line_number":545,"context_line":""},{"line_number":546,"context_line":""},{"line_number":547,"context_line":"class InvalidCPUInfo(Invalid):"}],"source_content_type":"text/x-python","patch_set":2,"id":"1aa78d24_9f845e5e","line":544,"range":{"start_line":543,"start_character":0,"end_line":544,"end_character":77},"updated":"2016-07-12 20:28:18.000000000","message":"So exception name does not match with msg string. Either change the exception name to something like hypervisorCmdFail or change the msg to something match the name. I prefer changing msg string.","commit_id":"b9ab52258863f9aab01e3a7b996ce8e2383afef6"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"0edf1759d8667d1672f522dee072c75d756af415","unresolved":false,"context_lines":[{"line_number":491,"context_line":""},{"line_number":492,"context_line":""},{"line_number":493,"context_line":"class DeviceIsBusy(Invalid):"},{"line_number":494,"context_line":"    msg_fmt \u003d _(\"The supplied device (%(device)s) is busy.\")"},{"line_number":495,"context_line":""},{"line_number":496,"context_line":""},{"line_number":497,"context_line":"class InvalidCPUInfo(Invalid):"}],"source_content_type":"text/x-python","patch_set":4,"id":"fa31d9ce_e993b5f8","side":"PARENT","line":494,"range":{"start_line":494,"start_character":40,"end_line":494,"end_character":46},"updated":"2017-02-10 12:53:17.000000000","message":"knowing what device failed seems useful, can we please keep that in the message?","commit_id":"098c4e8ca67179089eb0813784f191702df4f3f4"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"0edf1759d8667d1672f522dee072c75d756af415","unresolved":false,"context_lines":[{"line_number":490,"context_line":"    code \u003d 409"},{"line_number":491,"context_line":""},{"line_number":492,"context_line":""},{"line_number":493,"context_line":"class HypervisorCmdFail(Invalid):"},{"line_number":494,"context_line":"    msg_fmt \u003d _(\"Unable to attach volume to instance as a command\""},{"line_number":495,"context_line":"                \"to hypervisor failed.\")"},{"line_number":496,"context_line":""}],"source_content_type":"text/x-python","patch_set":4,"id":"fa31d9ce_e9fc9540","line":493,"range":{"start_line":493,"start_character":6,"end_line":493,"end_character":23},"updated":"2017-02-10 12:53:17.000000000","message":"This name doesn\u0027t match the text here.\n\nCould this not be \"AttachVolumeFailed() or similar?\"","commit_id":"c4e2b9422abd7c0bb007a32f0bd33d6dc5a86e4a"}],"nova/virt/libvirt/driver.py":[{"author":{"_account_id":12732,"name":"Bin Zhou","email":"zhou.bin9@zte.com.cn","username":"BinZhou"},"change_message_id":"7fe5f6fd0a4e2ee098b2f18a200b4fe61f7e0d6b","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"bab6814e_d7983c1e","updated":"2016-05-24 08:24:06.000000000","message":"I don\u0027t think it\u0027s a good idea to change the exception name, cause other functions may catch and check this exception, and the change would result different logic.","commit_id":"83aec6bff53151c6ebe7d63059be0d5b2b7689b4"},{"author":{"_account_id":18339,"name":"Sivasathurappan Radhakrishnan","email":"siva.radhakrishnan@intel.com","username":"sivakrishnan"},"change_message_id":"0148da4db251d3fc32636d8f2a5ce9ba61f5ca05","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"9abb7d3a_1bba9a0a","in_reply_to":"bab6814e_d7983c1e","updated":"2016-06-03 18:11:13.000000000","message":"Hi Bin Zhou!\nIts not being used elsewhere apart from this place. Verified it","commit_id":"83aec6bff53151c6ebe7d63059be0d5b2b7689b4"},{"author":{"_account_id":13915,"name":"Silvan Kaiser","email":"silvan@quobyte.com","username":"kaisers"},"change_message_id":"b5fcd56d89e8c3ae818abfeae3564c7f86c35fe5","unresolved":false,"context_lines":[{"line_number":1156,"context_line":"            LOG.exception(_LE(\u0027Failed to attach volume at mountpoint: %s\u0027),"},{"line_number":1157,"context_line":"                          mountpoint, instance\u003dinstance)"},{"line_number":1158,"context_line":"            if isinstance(ex, libvirt.libvirtError):"},{"line_number":1159,"context_line":"                errcode \u003d ex.get_error_code()"},{"line_number":1160,"context_line":"                if errcode \u003d\u003d libvirt.VIR_ERR_OPERATION_FAILED:"},{"line_number":1161,"context_line":"                    self._disconnect_volume(connection_info, disk_dev)"},{"line_number":1162,"context_line":"                    raise exception.FailedToAttach(device\u003ddisk_dev)"}],"source_content_type":"text/x-python","patch_set":1,"id":"bab6814e_f69f4663","line":1159,"updated":"2016-05-24 07:08:01.000000000","message":"I\u0027d very very much like to have this error code logged somewhere. Is this written to the log when following the new exception in line 1162 or the save_and_reraise_exception path in line 1164?","commit_id":"83aec6bff53151c6ebe7d63059be0d5b2b7689b4"},{"author":{"_account_id":18339,"name":"Sivasathurappan Radhakrishnan","email":"siva.radhakrishnan@intel.com","username":"sivakrishnan"},"change_message_id":"0148da4db251d3fc32636d8f2a5ce9ba61f5ca05","unresolved":false,"context_lines":[{"line_number":1156,"context_line":"            LOG.exception(_LE(\u0027Failed to attach volume at mountpoint: %s\u0027),"},{"line_number":1157,"context_line":"                          mountpoint, instance\u003dinstance)"},{"line_number":1158,"context_line":"            if isinstance(ex, libvirt.libvirtError):"},{"line_number":1159,"context_line":"                errcode \u003d ex.get_error_code()"},{"line_number":1160,"context_line":"                if errcode \u003d\u003d libvirt.VIR_ERR_OPERATION_FAILED:"},{"line_number":1161,"context_line":"                    self._disconnect_volume(connection_info, disk_dev)"},{"line_number":1162,"context_line":"                    raise exception.FailedToAttach(device\u003ddisk_dev)"}],"source_content_type":"text/x-python","patch_set":1,"id":"9abb7d3a_5b3a6299","line":1159,"in_reply_to":"bab6814e_f69f4663","updated":"2016-06-03 18:11:13.000000000","message":"Done","commit_id":"83aec6bff53151c6ebe7d63059be0d5b2b7689b4"},{"author":{"_account_id":20146,"name":"yuyafei","email":"yu.yafei@foxmail.com","username":"yuyafei"},"change_message_id":"a1d1286ae284938701663b50a4f63ad0b9fa39fe","unresolved":false,"context_lines":[{"line_number":1159,"context_line":"                errcode \u003d ex.get_error_code()"},{"line_number":1160,"context_line":"                if errcode \u003d\u003d libvirt.VIR_ERR_OPERATION_FAILED:"},{"line_number":1161,"context_line":"                    self._disconnect_volume(connection_info, disk_dev)"},{"line_number":1162,"context_line":"                    raise exception.FailedToAttach(device\u003ddisk_dev)"},{"line_number":1163,"context_line":""},{"line_number":1164,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":1165,"context_line":"                self._disconnect_volume(connection_info, disk_dev)"}],"source_content_type":"text/x-python","patch_set":1,"id":"bab6814e_66e60f18","line":1162,"range":{"start_line":1162,"start_character":36,"end_line":1162,"end_character":50},"updated":"2016-05-24 02:12:34.000000000","message":"The exception log is \"Failed to attach volume at mountpoint: mountpoint\", so I think there is no need to modify.","commit_id":"83aec6bff53151c6ebe7d63059be0d5b2b7689b4"},{"author":{"_account_id":18339,"name":"Sivasathurappan Radhakrishnan","email":"siva.radhakrishnan@intel.com","username":"sivakrishnan"},"change_message_id":"0148da4db251d3fc32636d8f2a5ce9ba61f5ca05","unresolved":false,"context_lines":[{"line_number":1159,"context_line":"                errcode \u003d ex.get_error_code()"},{"line_number":1160,"context_line":"                if errcode \u003d\u003d libvirt.VIR_ERR_OPERATION_FAILED:"},{"line_number":1161,"context_line":"                    self._disconnect_volume(connection_info, disk_dev)"},{"line_number":1162,"context_line":"                    raise exception.FailedToAttach(device\u003ddisk_dev)"},{"line_number":1163,"context_line":""},{"line_number":1164,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":1165,"context_line":"                self._disconnect_volume(connection_info, disk_dev)"}],"source_content_type":"text/x-python","patch_set":1,"id":"9abb7d3a_db465220","line":1162,"range":{"start_line":1162,"start_character":36,"end_line":1162,"end_character":50},"in_reply_to":"bab6814e_66e60f18","updated":"2016-06-03 18:11:13.000000000","message":"Done","commit_id":"83aec6bff53151c6ebe7d63059be0d5b2b7689b4"},{"author":{"_account_id":13915,"name":"Silvan Kaiser","email":"silvan@quobyte.com","username":"kaisers"},"change_message_id":"b5fcd56d89e8c3ae818abfeae3564c7f86c35fe5","unresolved":false,"context_lines":[{"line_number":1159,"context_line":"                errcode \u003d ex.get_error_code()"},{"line_number":1160,"context_line":"                if errcode \u003d\u003d libvirt.VIR_ERR_OPERATION_FAILED:"},{"line_number":1161,"context_line":"                    self._disconnect_volume(connection_info, disk_dev)"},{"line_number":1162,"context_line":"                    raise exception.FailedToAttach(device\u003ddisk_dev)"},{"line_number":1163,"context_line":""},{"line_number":1164,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":1165,"context_line":"                self._disconnect_volume(connection_info, disk_dev)"}],"source_content_type":"text/x-python","patch_set":1,"id":"bab6814e_d6a4c2ba","line":1162,"range":{"start_line":1162,"start_character":36,"end_line":1162,"end_character":50},"in_reply_to":"bab6814e_66e60f18","updated":"2016-05-24 07:08:01.000000000","message":"yuyafei is right. I think the point here is that the exception has been checked to be a libvirt / error: operation failed exception so probably the error message should state exactly that.","commit_id":"83aec6bff53151c6ebe7d63059be0d5b2b7689b4"},{"author":{"_account_id":18339,"name":"Sivasathurappan Radhakrishnan","email":"siva.radhakrishnan@intel.com","username":"sivakrishnan"},"change_message_id":"0148da4db251d3fc32636d8f2a5ce9ba61f5ca05","unresolved":false,"context_lines":[{"line_number":1159,"context_line":"                errcode \u003d ex.get_error_code()"},{"line_number":1160,"context_line":"                if errcode \u003d\u003d libvirt.VIR_ERR_OPERATION_FAILED:"},{"line_number":1161,"context_line":"                    self._disconnect_volume(connection_info, disk_dev)"},{"line_number":1162,"context_line":"                    raise exception.FailedToAttach(device\u003ddisk_dev)"},{"line_number":1163,"context_line":""},{"line_number":1164,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":1165,"context_line":"                self._disconnect_volume(connection_info, disk_dev)"}],"source_content_type":"text/x-python","patch_set":1,"id":"9abb7d3a_1b51fad8","line":1162,"range":{"start_line":1162,"start_character":36,"end_line":1162,"end_character":50},"in_reply_to":"bab6814e_d6a4c2ba","updated":"2016-06-03 18:11:13.000000000","message":"Done","commit_id":"83aec6bff53151c6ebe7d63059be0d5b2b7689b4"},{"author":{"_account_id":15524,"name":"dane-fichter","email":"dane.fichter@jhuapl.edu","username":"dane-fichter"},"change_message_id":"eafeb4357be344d5c5e9b481099f6387d3a6ee12","unresolved":false,"context_lines":[{"line_number":1155,"context_line":"        except Exception as ex:"},{"line_number":1156,"context_line":"            LOG.exception(_LE(\u0027Failed to attach volume at mountpoint: %s\u0027),"},{"line_number":1157,"context_line":"                          mountpoint, instance\u003dinstance)"},{"line_number":1158,"context_line":"            if isinstance(ex, libvirt.libvirtError):"},{"line_number":1159,"context_line":"                errcode \u003d ex.get_error_code()"},{"line_number":1160,"context_line":"                if errcode \u003d\u003d libvirt.VIR_ERR_OPERATION_FAILED:"},{"line_number":1161,"context_line":"                    self._disconnect_volume(connection_info, disk_dev)"}],"source_content_type":"text/x-python","patch_set":3,"id":"1ac06dbe_68477777","line":1158,"updated":"2016-08-22 20:28:25.000000000","message":"This isinstance() check doesn\u0027t look terribly pythonic. Why not add an except branch for libvirtError?","commit_id":"e27d57420233a7c9bb90cf1832c1e093b671e052"},{"author":{"_account_id":15524,"name":"dane-fichter","email":"dane.fichter@jhuapl.edu","username":"dane-fichter"},"change_message_id":"9b5e174358676fa508eb45d53bcd74abd6c6e02e","unresolved":false,"context_lines":[{"line_number":1155,"context_line":"        except Exception as ex:"},{"line_number":1156,"context_line":"            LOG.exception(_LE(\u0027Failed to attach volume at mountpoint: %s\u0027),"},{"line_number":1157,"context_line":"                          mountpoint, instance\u003dinstance)"},{"line_number":1158,"context_line":"            if isinstance(ex, libvirt.libvirtError):"},{"line_number":1159,"context_line":"                errcode \u003d ex.get_error_code()"},{"line_number":1160,"context_line":"                if errcode \u003d\u003d libvirt.VIR_ERR_OPERATION_FAILED:"},{"line_number":1161,"context_line":"                    self._disconnect_volume(connection_info, disk_dev)"}],"source_content_type":"text/x-python","patch_set":3,"id":"1ac06dbe_9c1e745d","line":1158,"in_reply_to":"1ac06dbe_68477777","updated":"2016-08-22 20:31:18.000000000","message":"Please disregard the above comment. The isinstance() check is already in Nov, not added by this patch.","commit_id":"e27d57420233a7c9bb90cf1832c1e093b671e052"},{"author":{"_account_id":1779,"name":"Daniel Berrange","email":"berrange@redhat.com","username":"berrange"},"change_message_id":"56ae704bbbcc8a7aa86d242e77f6ed9a3b7ee9fc","unresolved":false,"context_lines":[{"line_number":1159,"context_line":"                errcode \u003d ex.get_error_code()"},{"line_number":1160,"context_line":"                if errcode \u003d\u003d libvirt.VIR_ERR_OPERATION_FAILED:"},{"line_number":1161,"context_line":"                    self._disconnect_volume(connection_info, disk_dev)"},{"line_number":1162,"context_line":"                    raise exception.HypervisorCmdFail(errcode)"},{"line_number":1163,"context_line":""},{"line_number":1164,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":1165,"context_line":"                self._disconnect_volume(connection_info, disk_dev)"}],"source_content_type":"text/x-python","patch_set":3,"id":"fa6399be_25fa3c43","line":1162,"updated":"2016-10-11 14:00:21.000000000","message":"Eww, no - we should *never* expose numeric error codes to the user like this.","commit_id":"e27d57420233a7c9bb90cf1832c1e093b671e052"},{"author":{"_account_id":18339,"name":"Sivasathurappan Radhakrishnan","email":"siva.radhakrishnan@intel.com","username":"sivakrishnan"},"change_message_id":"ff6533dc5d87ecc6f71061b206ec30d602f94068","unresolved":false,"context_lines":[{"line_number":1159,"context_line":"                errcode \u003d ex.get_error_code()"},{"line_number":1160,"context_line":"                if errcode \u003d\u003d libvirt.VIR_ERR_OPERATION_FAILED:"},{"line_number":1161,"context_line":"                    self._disconnect_volume(connection_info, disk_dev)"},{"line_number":1162,"context_line":"                    raise exception.HypervisorCmdFail(errcode)"},{"line_number":1163,"context_line":""},{"line_number":1164,"context_line":"            with excutils.save_and_reraise_exception():"},{"line_number":1165,"context_line":"                self._disconnect_volume(connection_info, disk_dev)"}],"source_content_type":"text/x-python","patch_set":3,"id":"fa6399be_55d26935","line":1162,"in_reply_to":"fa6399be_25fa3c43","updated":"2016-10-18 18:43:56.000000000","message":"Hi Daniel Berrange!\nThanks for reviewing my patch. Since I have been getting various suggestions on doing this and moreover this being a Hypervisor error code possible for multiple scenarios as mentioned in my commit message, I am bit confused on how to better interpret this to the user. Can you please suggest me a better way to do this ?\n\nRegards,\nSiva.","commit_id":"e27d57420233a7c9bb90cf1832c1e093b671e052"}]}
