Reviewed: https://review.openstack.org/563213 Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=717d09149ebea4d6451efb262f2b300cdbcf2208 Submitter: Zuul Branch: master
commit 717d09149ebea4d6451efb262f2b300cdbcf2208 Author: Matt Riedemann <[email protected]> Date: Fri Apr 20 14:18:39 2018 -0400 Fix detach_volume calls when rolling back a failed attach Change I751fcb7532679905c4279744919c6cce84a11eb4 modified the ComputeDriver.detach_volume method signature to pass the RequestContext as the first argument. This was missed in the volume attach rollback code where the driver.detach_volume method is called. It was missed because that is called in a try/except block which catches generic Exception, which also means that the unit test covering that flow, which raised an Exception, was not failing. This change fixes the code bug and re-writes the test to use mock rather than mox and explicitly assert the calls made. An alternative to this would be changing the generic Exception handling in the rollback code, however, the virt drivers raise things other than NovaException, like os-brick exceptions and libvirtError, so refactoring that error handling is non-trivial. Change-Id: I9bafd4c47489b61973302310720b11ec1b5e0374 Closes-Bug: #1765742 ** Changed in: nova Status: In Progress => Fix Released -- You received this bug notification because you are a member of Yahoo! Engineering Team, which is subscribed to OpenStack Compute (nova). https://bugs.launchpad.net/bugs/1765742 Title: virt_driver.detach_volume rollback calls in attach_volume failures uses wrong method signature Status in OpenStack Compute (nova): Fix Released Status in OpenStack Compute (nova) queens series: In Progress Bug description: Seen here: https://github.com/openstack/nova/blob/64e503d82fe5966cb50b650b3309a7fc36c63cda/nova/virt/block_device.py#L473 and here: https://github.com/openstack/nova/blob/64e503d82fe5966cb50b650b3309a7fc36c63cda/nova/virt/block_device.py#L570 Those are using the wrong method signature since 'context' was added to the driver detach_volume method signature in change: https://review.openstack.org/#/c/549411/ To manage notifications about this bug go to: https://bugs.launchpad.net/nova/+bug/1765742/+subscriptions -- Mailing list: https://launchpad.net/~yahoo-eng-team Post to : [email protected] Unsubscribe : https://launchpad.net/~yahoo-eng-team More help : https://help.launchpad.net/ListHelp

