)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ebf3655a829d8882a33c9e4d20ae673502ad3c76","unresolved":false,"context_lines":[{"line_number":10,"context_line":"reason then you will fail to delete it because cinder doesn\u0027t have this"},{"line_number":11,"context_line":"volume attached while nova thinks that it is."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"We can fix it by taking into account DetachVolumeFailedNoAttachments"},{"line_number":14,"context_line":"exception, we get from cinderclient in such cases, that comes from"},{"line_number":15,"context_line":"cinder InvalidInput exception anong with \u0027Detach volume failed, because"},{"line_number":16,"context_line":"there are currently no active attachments\u0027 error message. This message"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":9,"id":"1a4dcd0f_99e346d9","line":13,"updated":"2015-08-11 17:18:08.000000000","message":"This is the long-term solution but not available today (and can\u0027t be backported to stable/kilo).  So while you can refer to the cinderclient change to add the specific exception somewhere in the commit message, you can\u0027t rely on it right now - so you have to explain that we have to parse the error message we get back from cinder in the short-term but we\u0027ll change that over to the specific exception from cinderclient once it\u0027s available in a released version of the library.","commit_id":"cd3ac041a9af22c6bab10d7666eb8bfd8d2d3e7f"},{"author":{"_account_id":12408,"name":"Maxim Nestratov","email":"mnestratov@virtuozzo.com","username":"mnestratov"},"change_message_id":"4525b899792fbf3f4f8e3a9db7b3388daf57ad97","unresolved":false,"context_lines":[{"line_number":10,"context_line":"reason then you will fail to delete it because cinder doesn\u0027t have this"},{"line_number":11,"context_line":"volume attached while nova thinks that it is."},{"line_number":12,"context_line":""},{"line_number":13,"context_line":"We can fix it by taking into account DetachVolumeFailedNoAttachments"},{"line_number":14,"context_line":"exception, we get from cinderclient in such cases, that comes from"},{"line_number":15,"context_line":"cinder InvalidInput exception anong with \u0027Detach volume failed, because"},{"line_number":16,"context_line":"there are currently no active attachments\u0027 error message. This message"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":9,"id":"1a4dcd0f_e34bb8af","line":13,"in_reply_to":"1a4dcd0f_99e346d9","updated":"2015-08-11 18:25:07.000000000","message":"Ok. Finally got you. I\u0027ll redo.","commit_id":"cd3ac041a9af22c6bab10d7666eb8bfd8d2d3e7f"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"b2feb7d1311ef72df6224731e2779c3798a0cfcd","unresolved":false,"context_lines":[{"line_number":17,"context_line":"error message. We already ignore the DiskNotFound and VolumeNotFound"},{"line_number":18,"context_line":"cases during delete, thus this is just a new case."},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"There is a change pending I9aebe01ad4548e169a32995bf40722fcab0c26b0"},{"line_number":21,"context_line":"with a long term fix."},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"Change-Id: Ibdcb870aff1a59948136f1f9c3e30390e7f081b0"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":10,"id":"1a4dcd0f_44e31fa5","line":20,"updated":"2015-08-13 18:53:32.000000000","message":"This has a -2 because the cinder team is planning on just not failing in this case and ignore that detach request if there are no attachments:\n\nhttps://review.openstack.org/#/c/212193/\n\nSo I think we should WIP this change until the cinder side is sorted out.","commit_id":"35089c41d953c6f84513e37dc53ce0ad50a4bb38"},{"author":{"_account_id":12408,"name":"Maxim Nestratov","email":"mnestratov@virtuozzo.com","username":"mnestratov"},"change_message_id":"5b970783b12b43110be2706179d0f20cb4d93b6e","unresolved":false,"context_lines":[{"line_number":17,"context_line":"error message. We already ignore the DiskNotFound and VolumeNotFound"},{"line_number":18,"context_line":"cases during delete, thus this is just a new case."},{"line_number":19,"context_line":""},{"line_number":20,"context_line":"There is a change pending I9aebe01ad4548e169a32995bf40722fcab0c26b0"},{"line_number":21,"context_line":"with a long term fix."},{"line_number":22,"context_line":""},{"line_number":23,"context_line":"Change-Id: Ibdcb870aff1a59948136f1f9c3e30390e7f081b0"}],"source_content_type":"text/x-gerrit-commit-message","patch_set":10,"id":"1a4dcd0f_c7c73197","line":20,"in_reply_to":"1a4dcd0f_44e31fa5","updated":"2015-08-13 19:06:29.000000000","message":"Agree","commit_id":"35089c41d953c6f84513e37dc53ce0ad50a4bb38"}],"nova/compute/manager.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"89e3cde8b799d3f1b123b2bfa6de38e96a43f169","unresolved":false,"context_lines":[{"line_number":2242,"context_line":"                                                     bdm.volume_id,"},{"line_number":2243,"context_line":"                                                     connector)"},{"line_number":2244,"context_line":"                self.volume_api.detach(context, bdm.volume_id)"},{"line_number":2245,"context_line":"            except exception.InvalidInput as exc:"},{"line_number":2246,"context_line":"                LOG.debug(\u0027Ignoring InvalidInput: %s\u0027, exc,"},{"line_number":2247,"context_line":"                          instance\u003dinstance)"},{"line_number":2248,"context_line":"            except exception.DiskNotFound as exc:"}],"source_content_type":"text/x-python","patch_set":3,"id":"3a50d1a3_2ba82520","line":2245,"updated":"2015-07-30 01:19:58.000000000","message":"Would be nice if there was something more specific than this, since it could be a 400 for any number of reasons.\n\nAlso, need a unit test to cover this case.","commit_id":"607dd139bfad379d39c22d873df9188d746e0957"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"d0ebdf51825c3cfa8ccbbd0c912365504398428c","unresolved":false,"context_lines":[{"line_number":2245,"context_line":"                self.volume_api.detach(context, bdm.volume_id)"},{"line_number":2246,"context_line":"            except exception.InvalidInput as exc:"},{"line_number":2247,"context_line":"                with excutils.save_and_reraise_exception(reraise\u003dFalse) as ctx:"},{"line_number":2248,"context_line":"                    expected_msg \u003d _(\u0027Invalid volume: Detach volume failed, \u0027"},{"line_number":2249,"context_line":"                                     \u0027because there are currently no active \u0027"},{"line_number":2250,"context_line":"                                     \u0027attachments\u0027)"},{"line_number":2251,"context_line":"                    if expected_msg in six.text_type(exc):"}],"source_content_type":"text/x-python","patch_set":6,"id":"1a4dcd0f_e78100fd","line":2248,"updated":"2015-08-03 21:20:08.000000000","message":"This will work until cinder changes the wording in the exception message at some point and breaks us.  It would be really nice if cinderclient could translate the exception into something specific and raise that to the caller (nova in this case), then we could catch that, like we do with specific errors with neutronclient, like PortNotFound.  Maybe that could be a longer strategic fix and this is the short term tactical fix.","commit_id":"161033c00d1b10313a1c611e85e82176d652f631"},{"author":{"_account_id":10224,"name":"Feodor Tersin","email":"ftersin@hotmail.com","username":"ftersin"},"change_message_id":"b65cb2dee23f0b9fe13caf02486f7565f831d1ae","unresolved":false,"context_lines":[{"line_number":2245,"context_line":"                self.volume_api.detach(context, bdm.volume_id)"},{"line_number":2246,"context_line":"            except exception.InvalidInput as exc:"},{"line_number":2247,"context_line":"                with excutils.save_and_reraise_exception(reraise\u003dFalse) as ctx:"},{"line_number":2248,"context_line":"                    expected_msg \u003d _(\u0027Invalid volume: Detach volume failed, \u0027"},{"line_number":2249,"context_line":"                                     \u0027because there are currently no active \u0027"},{"line_number":2250,"context_line":"                                     \u0027attachments\u0027)"},{"line_number":2251,"context_line":"                    if expected_msg in six.text_type(exc):"}],"source_content_type":"text/x-python","patch_set":6,"id":"1a4dcd0f_e0f96e4f","line":2248,"in_reply_to":"1a4dcd0f_5d1da960","updated":"2015-08-11 18:10:33.000000000","message":"@Matt, i mean that L2266 catches all 40x errors except 400 and 404. E.g. 403.","commit_id":"161033c00d1b10313a1c611e85e82176d652f631"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"6ec7b15f40fc4b7411fbc20e0c2be5017680dce0","unresolved":false,"context_lines":[{"line_number":2245,"context_line":"                self.volume_api.detach(context, bdm.volume_id)"},{"line_number":2246,"context_line":"            except exception.InvalidInput as exc:"},{"line_number":2247,"context_line":"                with excutils.save_and_reraise_exception(reraise\u003dFalse) as ctx:"},{"line_number":2248,"context_line":"                    expected_msg \u003d _(\u0027Invalid volume: Detach volume failed, \u0027"},{"line_number":2249,"context_line":"                                     \u0027because there are currently no active \u0027"},{"line_number":2250,"context_line":"                                     \u0027attachments\u0027)"},{"line_number":2251,"context_line":"                    if expected_msg in six.text_type(exc):"}],"source_content_type":"text/x-python","patch_set":6,"id":"1a4dcd0f_5d1da960","line":2248,"in_reply_to":"1a4dcd0f_9394f0e8","updated":"2015-08-11 17:29:55.000000000","message":"L2266 below is just a random 500 from cinderclient, that wouldn\u0027t be the case here since http://git.openstack.org/cgit/openstack/nova/tree/nova/volume/cinder.py#n220 converts the 400 from cinder to a BadRequest exception which that nova code turns into InvalidInput.\n\nI think https://review.openstack.org/#/c/210534/ might be a much cleaner fix for this bug though, let me check into that.","commit_id":"161033c00d1b10313a1c611e85e82176d652f631"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"502a8f4983d9f3cd03f9ac6624aa888d77beb0e1","unresolved":false,"context_lines":[{"line_number":2245,"context_line":"                self.volume_api.detach(context, bdm.volume_id)"},{"line_number":2246,"context_line":"            except exception.InvalidInput as exc:"},{"line_number":2247,"context_line":"                with excutils.save_and_reraise_exception(reraise\u003dFalse) as ctx:"},{"line_number":2248,"context_line":"                    expected_msg \u003d _(\u0027Invalid volume: Detach volume failed, \u0027"},{"line_number":2249,"context_line":"                                     \u0027because there are currently no active \u0027"},{"line_number":2250,"context_line":"                                     \u0027attachments\u0027)"},{"line_number":2251,"context_line":"                    if expected_msg in six.text_type(exc):"}],"source_content_type":"text/x-python","patch_set":6,"id":"1a4dcd0f_e9c44e41","line":2248,"in_reply_to":"1a4dcd0f_e78100fd","updated":"2015-08-04 13:20:27.000000000","message":"Could we actually move this here?\n\nhttp://git.openstack.org/cgit/openstack/nova/tree/nova/volume/cinder.py#n220\n\nAnd then define a new nova exception for this case and raise that from volume_api.detach so we can just catch that specific exception here.  Then when cinderclient is actually raising something specific, we can just handle that in volume_api.translate_volume_exception (I\u0027d like the handling closer to the volume_api code so we don\u0027t have to duplicate this checking elsewhere if needed).","commit_id":"161033c00d1b10313a1c611e85e82176d652f631"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"22568c12de518976d9f73d2dc2589bcba987a216","unresolved":false,"context_lines":[{"line_number":2245,"context_line":"                self.volume_api.detach(context, bdm.volume_id)"},{"line_number":2246,"context_line":"            except exception.InvalidInput as exc:"},{"line_number":2247,"context_line":"                with excutils.save_and_reraise_exception(reraise\u003dFalse) as ctx:"},{"line_number":2248,"context_line":"                    expected_msg \u003d _(\u0027Invalid volume: Detach volume failed, \u0027"},{"line_number":2249,"context_line":"                                     \u0027because there are currently no active \u0027"},{"line_number":2250,"context_line":"                                     \u0027attachments\u0027)"},{"line_number":2251,"context_line":"                    if expected_msg in six.text_type(exc):"}],"source_content_type":"text/x-python","patch_set":6,"id":"1a4dcd0f_f209892d","line":2248,"in_reply_to":"1a4dcd0f_e9c44e41","updated":"2015-08-04 16:05:22.000000000","message":"Here is the proposed change to cinderclient to map the error and raise a specific exception:\n\nhttps://review.openstack.org/#/c/209150/","commit_id":"161033c00d1b10313a1c611e85e82176d652f631"},{"author":{"_account_id":10224,"name":"Feodor Tersin","email":"ftersin@hotmail.com","username":"ftersin"},"change_message_id":"d05f1a281f95db47a33a301e2a1033fc2306e397","unresolved":false,"context_lines":[{"line_number":2245,"context_line":"                self.volume_api.detach(context, bdm.volume_id)"},{"line_number":2246,"context_line":"            except exception.InvalidInput as exc:"},{"line_number":2247,"context_line":"                with excutils.save_and_reraise_exception(reraise\u003dFalse) as ctx:"},{"line_number":2248,"context_line":"                    expected_msg \u003d _(\u0027Invalid volume: Detach volume failed, \u0027"},{"line_number":2249,"context_line":"                                     \u0027because there are currently no active \u0027"},{"line_number":2250,"context_line":"                                     \u0027attachments\u0027)"},{"line_number":2251,"context_line":"                    if expected_msg in six.text_type(exc):"}],"source_content_type":"text/x-python","patch_set":6,"id":"1a4dcd0f_9394f0e8","line":2248,"in_reply_to":"1a4dcd0f_f209892d","updated":"2015-08-09 20:37:17.000000000","message":"@Matt, since that you asked on PS3 more specific handling there, [1] was added, which catches some 40x errors as well. Is you requirement still actual? Do you know any case with 400 error here when termination should be aborted?\n\nIf you do, probably it\u0027d be better to merge something like https://review.openstack.org/#/c/210534/1/nova/compute/manager.py Also that patch could be backported easier. Anyway, parsing an error message doesn\u0027t look good. Am i wrong?\n\nAnd i hope all this is a good reason to push https://review.openstack.org/#/c/167793\n\n[1] see L2266","commit_id":"161033c00d1b10313a1c611e85e82176d652f631"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"d0ebdf51825c3cfa8ccbbd0c912365504398428c","unresolved":false,"context_lines":[{"line_number":2254,"context_line":"                    else:"},{"line_number":2255,"context_line":"                        ctx.reraise \u003d True"},{"line_number":2256,"context_line":"            except exception.DiskNotFound as exc:"},{"line_number":2257,"context_line":"                LOG.info(_LI(\u0027Ignoring DiskNotFound: %s\u0027), exc,"},{"line_number":2258,"context_line":"                         instance\u003dinstance)"},{"line_number":2259,"context_line":"            except exception.VolumeNotFound as exc:"},{"line_number":2260,"context_line":"                LOG.info(_LI(\u0027Ignoring VolumeNotFound: %s\u0027), exc,"}],"source_content_type":"text/x-python","patch_set":6,"id":"1a4dcd0f_6703b0b9","line":2257,"updated":"2015-08-03 21:20:08.000000000","message":"These are unrelated changes, you should leave the logging alone in this change that adds the new error handling.","commit_id":"161033c00d1b10313a1c611e85e82176d652f631"},{"author":{"_account_id":14288,"name":"Matthew Thode","display_name":"prometheanfire","email":"mthode@mthode.org","username":"prometheanfire"},"change_message_id":"a557c88d6af7461ddc7d872b7984992da6b3f688","unresolved":false,"context_lines":[{"line_number":2254,"context_line":"                    else:"},{"line_number":2255,"context_line":"                        ctx.reraise \u003d True"},{"line_number":2256,"context_line":"            except exception.DiskNotFound as exc:"},{"line_number":2257,"context_line":"                LOG.info(_LI(\u0027Ignoring DiskNotFound: %s\u0027), exc,"},{"line_number":2258,"context_line":"                         instance\u003dinstance)"},{"line_number":2259,"context_line":"            except exception.VolumeNotFound as exc:"},{"line_number":2260,"context_line":"                LOG.info(_LI(\u0027Ignoring VolumeNotFound: %s\u0027), exc,"}],"source_content_type":"text/x-python","patch_set":6,"id":"1a4dcd0f_272cc849","line":2257,"updated":"2015-08-03 21:12:56.000000000","message":"is there a reason you changed these to info?","commit_id":"161033c00d1b10313a1c611e85e82176d652f631"},{"author":{"_account_id":12408,"name":"Maxim Nestratov","email":"mnestratov@virtuozzo.com","username":"mnestratov"},"change_message_id":"ddf89d6b8cfd4fab2bfc8bec6a5eca233471e3c2","unresolved":false,"context_lines":[{"line_number":2254,"context_line":"                    else:"},{"line_number":2255,"context_line":"                        ctx.reraise \u003d True"},{"line_number":2256,"context_line":"            except exception.DiskNotFound as exc:"},{"line_number":2257,"context_line":"                LOG.info(_LI(\u0027Ignoring DiskNotFound: %s\u0027), exc,"},{"line_number":2258,"context_line":"                         instance\u003dinstance)"},{"line_number":2259,"context_line":"            except exception.VolumeNotFound as exc:"},{"line_number":2260,"context_line":"                LOG.info(_LI(\u0027Ignoring VolumeNotFound: %s\u0027), exc,"}],"source_content_type":"text/x-python","patch_set":6,"id":"1a4dcd0f_e78260c8","line":2257,"in_reply_to":"1a4dcd0f_272cc849","updated":"2015-08-03 21:29:02.000000000","message":"I would like to see these messages even when debug output is suppressed. But if you object, I can revert it back.","commit_id":"161033c00d1b10313a1c611e85e82176d652f631"},{"author":{"_account_id":12408,"name":"Maxim Nestratov","email":"mnestratov@virtuozzo.com","username":"mnestratov"},"change_message_id":"ddf89d6b8cfd4fab2bfc8bec6a5eca233471e3c2","unresolved":false,"context_lines":[{"line_number":2254,"context_line":"                    else:"},{"line_number":2255,"context_line":"                        ctx.reraise \u003d True"},{"line_number":2256,"context_line":"            except exception.DiskNotFound as exc:"},{"line_number":2257,"context_line":"                LOG.info(_LI(\u0027Ignoring DiskNotFound: %s\u0027), exc,"},{"line_number":2258,"context_line":"                         instance\u003dinstance)"},{"line_number":2259,"context_line":"            except exception.VolumeNotFound as exc:"},{"line_number":2260,"context_line":"                LOG.info(_LI(\u0027Ignoring VolumeNotFound: %s\u0027), exc,"}],"source_content_type":"text/x-python","patch_set":6,"id":"1a4dcd0f_874b5cb0","line":2257,"in_reply_to":"1a4dcd0f_6703b0b9","updated":"2015-08-03 21:29:02.000000000","message":"ok","commit_id":"161033c00d1b10313a1c611e85e82176d652f631"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"f91842ff2b98c171af3f4bc4f9c7e81fca319f17","unresolved":false,"context_lines":[{"line_number":2254,"context_line":"                    else:"},{"line_number":2255,"context_line":"                        ctx.reraise \u003d True"},{"line_number":2256,"context_line":"            except exception.DiskNotFound as exc:"},{"line_number":2257,"context_line":"                LOG.info(_LI(\u0027Ignoring DiskNotFound: %s\u0027), exc,"},{"line_number":2258,"context_line":"                         instance\u003dinstance)"},{"line_number":2259,"context_line":"            except exception.VolumeNotFound as exc:"},{"line_number":2260,"context_line":"                LOG.info(_LI(\u0027Ignoring VolumeNotFound: %s\u0027), exc,"}],"source_content_type":"text/x-python","patch_set":6,"id":"1a4dcd0f_eedbf419","line":2257,"in_reply_to":"1a4dcd0f_874b5cb0","updated":"2015-08-04 13:18:11.000000000","message":"If you want to propose to make these INFO level, do that in a separate change with separate justification.","commit_id":"161033c00d1b10313a1c611e85e82176d652f631"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"d0ebdf51825c3cfa8ccbbd0c912365504398428c","unresolved":false,"context_lines":[{"line_number":2257,"context_line":"                LOG.info(_LI(\u0027Ignoring DiskNotFound: %s\u0027), exc,"},{"line_number":2258,"context_line":"                         instance\u003dinstance)"},{"line_number":2259,"context_line":"            except exception.VolumeNotFound as exc:"},{"line_number":2260,"context_line":"                LOG.info(_LI(\u0027Ignoring VolumeNotFound: %s\u0027), exc,"},{"line_number":2261,"context_line":"                         instance\u003dinstance)"},{"line_number":2262,"context_line":"            except (cinder_exception.EndpointNotFound,"},{"line_number":2263,"context_line":"                    keystone_exception.EndpointNotFound) as exc:"}],"source_content_type":"text/x-python","patch_set":6,"id":"1a4dcd0f_87003cac","line":2260,"updated":"2015-08-03 21:20:08.000000000","message":"same","commit_id":"161033c00d1b10313a1c611e85e82176d652f631"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"22ba05eae427b37aaf17d25a7630cb9fdf5b38dd","unresolved":false,"context_lines":[{"line_number":2245,"context_line":"                self.volume_api.terminate_connection(context,"},{"line_number":2246,"context_line":"                                                     bdm.volume_id,"},{"line_number":2247,"context_line":"                                                     connector)"},{"line_number":2248,"context_line":"                self.volume_api.detach(context, bdm.volume_id)"},{"line_number":2249,"context_line":"            except cinder_exception.DetachVolumeFailedNoAttachments as exc:"},{"line_number":2250,"context_line":"                LOG.warning(_LW(\u0027Ignoring \u0027"},{"line_number":2251,"context_line":"                                \u0027DetachVolumeFailedNoAttachments: %s\u0027), exc,"}],"source_content_type":"text/x-python","patch_set":9,"id":"1a4dcd0f_5d7fe916","line":2248,"updated":"2015-08-11 17:36:59.000000000","message":"As ftersin pointed out in patch set 6, this is actually a cleaner solution:\n\nhttps://review.openstack.org/#/c/210534/\n\nUnless there is something missing, I think we should go with that.","commit_id":"cd3ac041a9af22c6bab10d7666eb8bfd8d2d3e7f"},{"author":{"_account_id":12408,"name":"Maxim Nestratov","email":"mnestratov@virtuozzo.com","username":"mnestratov"},"change_message_id":"4525b899792fbf3f4f8e3a9db7b3388daf57ad97","unresolved":false,"context_lines":[{"line_number":2245,"context_line":"                self.volume_api.terminate_connection(context,"},{"line_number":2246,"context_line":"                                                     bdm.volume_id,"},{"line_number":2247,"context_line":"                                                     connector)"},{"line_number":2248,"context_line":"                self.volume_api.detach(context, bdm.volume_id)"},{"line_number":2249,"context_line":"            except cinder_exception.DetachVolumeFailedNoAttachments as exc:"},{"line_number":2250,"context_line":"                LOG.warning(_LW(\u0027Ignoring \u0027"},{"line_number":2251,"context_line":"                                \u0027DetachVolumeFailedNoAttachments: %s\u0027), exc,"}],"source_content_type":"text/x-python","patch_set":9,"id":"1a4dcd0f_436cec34","line":2248,"in_reply_to":"1a4dcd0f_5d7fe916","updated":"2015-08-11 18:25:07.000000000","message":"There is a possible race there with two simultaneous API delete instance and detach volume calls for instance.","commit_id":"cd3ac041a9af22c6bab10d7666eb8bfd8d2d3e7f"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"ebf3655a829d8882a33c9e4d20ae673502ad3c76","unresolved":false,"context_lines":[{"line_number":2246,"context_line":"                                                     bdm.volume_id,"},{"line_number":2247,"context_line":"                                                     connector)"},{"line_number":2248,"context_line":"                self.volume_api.detach(context, bdm.volume_id)"},{"line_number":2249,"context_line":"            except cinder_exception.DetachVolumeFailedNoAttachments as exc:"},{"line_number":2250,"context_line":"                LOG.warning(_LW(\u0027Ignoring \u0027"},{"line_number":2251,"context_line":"                                \u0027DetachVolumeFailedNoAttachments: %s\u0027), exc,"},{"line_number":2252,"context_line":"                                instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":9,"id":"1a4dcd0f_f97daa1c","line":2249,"updated":"2015-08-11 17:18:08.000000000","message":"There is not a released version of python-cinderclient that has this in it yet, so we still have to do the error message parsing logic like you had in patch set 6 until the exception is available (and the minimum required version of cinderclient is updated in global-requirements).\n\nIn patch set 6 I was saying to move the error handling where the other cinder 400s are handled:\n\nhttp://git.openstack.org/cgit/openstack/nova/tree/nova/volume/cinder.py#n220\n\nThen the compute manager code here can just handle what that raises, but the ugly error message parsing can happen in that translate_volume_exception method and have a TODO in there to remove it once we have a specific exception type coming from cinderclient.","commit_id":"cd3ac041a9af22c6bab10d7666eb8bfd8d2d3e7f"},{"author":{"_account_id":12408,"name":"Maxim Nestratov","email":"mnestratov@virtuozzo.com","username":"mnestratov"},"change_message_id":"21949f51457cdcaafd00d86d497b0aa98721e1ac","unresolved":false,"context_lines":[{"line_number":2246,"context_line":"                                                     bdm.volume_id,"},{"line_number":2247,"context_line":"                                                     connector)"},{"line_number":2248,"context_line":"                self.volume_api.detach(context, bdm.volume_id)"},{"line_number":2249,"context_line":"            except cinder_exception.DetachVolumeFailedNoAttachments as exc:"},{"line_number":2250,"context_line":"                LOG.warning(_LW(\u0027Ignoring \u0027"},{"line_number":2251,"context_line":"                                \u0027DetachVolumeFailedNoAttachments: %s\u0027), exc,"},{"line_number":2252,"context_line":"                                instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":9,"id":"1a4dcd0f_51cef22d","line":2249,"in_reply_to":"1a4dcd0f_1115ca3e","updated":"2015-08-11 19:07:27.000000000","message":"I\u0027m not sure if it\u0027s correct to ignore all exceptions. I guess there are some cases that require usual cleanup on cinder side we can omit if we are not specific about ignored exceptions.","commit_id":"cd3ac041a9af22c6bab10d7666eb8bfd8d2d3e7f"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"b01dddddafa6648d1b211d9daa838a63c1475acd","unresolved":false,"context_lines":[{"line_number":2246,"context_line":"                                                     bdm.volume_id,"},{"line_number":2247,"context_line":"                                                     connector)"},{"line_number":2248,"context_line":"                self.volume_api.detach(context, bdm.volume_id)"},{"line_number":2249,"context_line":"            except cinder_exception.DetachVolumeFailedNoAttachments as exc:"},{"line_number":2250,"context_line":"                LOG.warning(_LW(\u0027Ignoring \u0027"},{"line_number":2251,"context_line":"                                \u0027DetachVolumeFailedNoAttachments: %s\u0027), exc,"},{"line_number":2252,"context_line":"                                instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":9,"id":"1a4dcd0f_f8a32d41","line":2249,"in_reply_to":"1a4dcd0f_51cef22d","updated":"2015-08-12 16:49:44.000000000","message":"Right so there is a place where we would roll quotas back in _delete_instance.","commit_id":"cd3ac041a9af22c6bab10d7666eb8bfd8d2d3e7f"},{"author":{"_account_id":5511,"name":"Nikola Dipanov","email":"ndipanov@redhat.com","username":"ndipanov"},"change_message_id":"b1ebb3fdda7a31dde9242b821b0f26368476dcc3","unresolved":false,"context_lines":[{"line_number":2246,"context_line":"                                                     bdm.volume_id,"},{"line_number":2247,"context_line":"                                                     connector)"},{"line_number":2248,"context_line":"                self.volume_api.detach(context, bdm.volume_id)"},{"line_number":2249,"context_line":"            except cinder_exception.DetachVolumeFailedNoAttachments as exc:"},{"line_number":2250,"context_line":"                LOG.warning(_LW(\u0027Ignoring \u0027"},{"line_number":2251,"context_line":"                                \u0027DetachVolumeFailedNoAttachments: %s\u0027), exc,"},{"line_number":2252,"context_line":"                                instance\u003dinstance)"}],"source_content_type":"text/x-python","patch_set":9,"id":"1a4dcd0f_1115ca3e","line":2249,"in_reply_to":"1a4dcd0f_f97daa1c","updated":"2015-08-11 18:48:10.000000000","message":"Do we care what exception we\u0027ve hit? Any exception should be ignored here it seems.\n\nWe can leave a TODO to special case it with a nice log message once we get the nice exception in the client.","commit_id":"cd3ac041a9af22c6bab10d7666eb8bfd8d2d3e7f"}],"nova/tests/unit/volume/test_cinder.py":[{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"d0ebdf51825c3cfa8ccbbd0c912365504398428c","unresolved":false,"context_lines":[{"line_number":248,"context_line":"    def test_attach(self, mock_cinderclient):"},{"line_number":249,"context_line":"        mock_volumes \u003d mock.MagicMock()"},{"line_number":250,"context_line":"        mock_cinderclient.return_value \u003d mock.MagicMock(volumes\u003dmock_volumes)"},{"line_number":251,"context_line":""},{"line_number":252,"context_line":"        self.api.attach(self.ctx, \u0027id1\u0027, \u0027uuid\u0027, \u0027point\u0027)"},{"line_number":253,"context_line":""},{"line_number":254,"context_line":"        mock_cinderclient.assert_called_once_with(self.ctx)"}],"source_content_type":"text/x-python","patch_set":6,"id":"1a4dcd0f_87d83c1f","side":"PARENT","line":251,"updated":"2015-08-03 21:20:08.000000000","message":"unrelated whitespace change, please remove","commit_id":"4a96b90623ffd3814131b37c622e75e4dae812fa"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"d0ebdf51825c3cfa8ccbbd0c912365504398428c","unresolved":false,"context_lines":[{"line_number":266,"context_line":"        mock_volumes.attach.assert_called_once_with(\u0027id1\u0027, \u0027uuid\u0027, \u0027point\u0027,"},{"line_number":267,"context_line":"                                                    mode\u003d\u0027ro\u0027)"},{"line_number":268,"context_line":""},{"line_number":269,"context_line":"    @mock.patch(\u0027nova.volume.cinder.cinderclient\u0027)"},{"line_number":270,"context_line":"    def test_detach(self, mock_cinderclient):"},{"line_number":271,"context_line":"        mock_volumes \u003d mock.MagicMock()"},{"line_number":272,"context_line":"        mock_cinderclient.return_value \u003d mock.MagicMock(volumes\u003dmock_volumes)"}],"source_content_type":"text/x-python","patch_set":6,"id":"1a4dcd0f_c723a404","line":269,"updated":"2015-08-03 21:20:08.000000000","message":"This isn\u0027t really a necessary change for this patch, it\u0027s just converting the test to use mock, but the test doesn\u0027t actually need to be changed otherwise, so not really appropriate.","commit_id":"161033c00d1b10313a1c611e85e82176d652f631"},{"author":{"_account_id":6873,"name":"Matt Riedemann","email":"mriedem.os@gmail.com","username":"mriedem"},"change_message_id":"f91842ff2b98c171af3f4bc4f9c7e81fca319f17","unresolved":false,"context_lines":[{"line_number":266,"context_line":"        mock_volumes.attach.assert_called_once_with(\u0027id1\u0027, \u0027uuid\u0027, \u0027point\u0027,"},{"line_number":267,"context_line":"                                                    mode\u003d\u0027ro\u0027)"},{"line_number":268,"context_line":""},{"line_number":269,"context_line":"    @mock.patch(\u0027nova.volume.cinder.cinderclient\u0027)"},{"line_number":270,"context_line":"    def test_detach(self, mock_cinderclient):"},{"line_number":271,"context_line":"        mock_volumes \u003d mock.MagicMock()"},{"line_number":272,"context_line":"        mock_cinderclient.return_value \u003d mock.MagicMock(volumes\u003dmock_volumes)"}],"source_content_type":"text/x-python","patch_set":6,"id":"1a4dcd0f_ce363803","line":269,"in_reply_to":"1a4dcd0f_87559c1e","updated":"2015-08-04 13:18:11.000000000","message":"Yeah, we really only do the mox-\u003emock conversion when we actually have to update a given test case because of a change, so it doesn\u0027t really fit here.","commit_id":"161033c00d1b10313a1c611e85e82176d652f631"},{"author":{"_account_id":12408,"name":"Maxim Nestratov","email":"mnestratov@virtuozzo.com","username":"mnestratov"},"change_message_id":"ddf89d6b8cfd4fab2bfc8bec6a5eca233471e3c2","unresolved":false,"context_lines":[{"line_number":266,"context_line":"        mock_volumes.attach.assert_called_once_with(\u0027id1\u0027, \u0027uuid\u0027, \u0027point\u0027,"},{"line_number":267,"context_line":"                                                    mode\u003d\u0027ro\u0027)"},{"line_number":268,"context_line":""},{"line_number":269,"context_line":"    @mock.patch(\u0027nova.volume.cinder.cinderclient\u0027)"},{"line_number":270,"context_line":"    def test_detach(self, mock_cinderclient):"},{"line_number":271,"context_line":"        mock_volumes \u003d mock.MagicMock()"},{"line_number":272,"context_line":"        mock_cinderclient.return_value \u003d mock.MagicMock(volumes\u003dmock_volumes)"}],"source_content_type":"text/x-python","patch_set":6,"id":"1a4dcd0f_87559c1e","line":269,"in_reply_to":"1a4dcd0f_c723a404","updated":"2015-08-03 21:29:02.000000000","message":"ok. I can do this in another patch. Just wanted to make it similar to test_attach","commit_id":"161033c00d1b10313a1c611e85e82176d652f631"}]}
