Comment 8 for bug 1685185

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to nova (stable/newton)

Reviewed: https://review.openstack.org/460482
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=8fb411c9b2af9bb5fef3cc272517c54bab821cd4
Submitter: Jenkins
Branch: stable/newton

commit 8fb411c9b2af9bb5fef3cc272517c54bab821cd4
Author: Lee Yarwood <email address hidden>
Date: Thu Apr 20 19:43:32 2017 +0100

    libvirt: Always disconnect_volume after rebase failures

    Previously failures when rebasing onto a new volume would leave the
    volume connected to the compute host. For some volume backends such as
    iSCSI the subsequent call to terminate_connection would then result in
    leftover devices remaining on the host.

    This change simply catches any error associated with the rebase and
    ensures that disconnect_volume is called for the new volume prior to
    terminate_connection finally being called.

    NOTE(lyarwood): Conflict caused by MIN_LIBVIRT_VERSION being 1.2.1 in
    stable/ocata making I81c32bbea0f04ca876f2078ef2ae0e1975473584
    unsuitable. The is_job_complete polling loop removed by that change in
    master is now moved into the try block of this change ensuring we catch
    any errors that might be thrown while waiting for the async pivot. The
    log.exception message also requires translation in Ocata.

    Conflicts:
            nova/virt/libvirt/driver.py

    Change-Id: I5997000a0ba6341c4987405cdc0760c3b471bd59
    Closes-bug: #1685185
    (cherry picked from commit 809065485c19fd535db6740bb21b867c41c008fe)
    (cherry picked from commit fbcf8d673342570a1518dbf8d88f289c2c39cd30)