Comment 16 for bug 1796981

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

Reviewed: https://review.openstack.org/614872
Committed: https://git.openstack.org/cgit/openstack/nova/commit/?id=d004b0ecfa6f20ceefd029f4ed09de191f0d76b3
Submitter: Zuul
Branch: stable/pike

commit d004b0ecfa6f20ceefd029f4ed09de191f0d76b3
Author: Matt Riedemann <email address hidden>
Date: Wed Oct 10 15:07:00 2018 -0400

    Fix NoneType error in _notify_volume_usage_detach

    If the driver.block_stats() method returns None, like the
    libvirt driver will if the guest is gone during an evacuate,
    we'll get a NoneType error trying to unpack the return value
    from the driver. Instead, simply return as if the driver
    raised NotImplementedError.

    Since handling None is changing the contract on the virt
    driver API, the docstring is updated to explain the acceptable
    return values of the driver method.

    Conflicts:
          nova/tests/unit/compute/test_compute_mgr.py

    NOTE(mriedem): The conflict is due to not having the
    test_get_scheduler_hints test from change
    I49ffebcd129990f1835f404d98b51732a32171eb which was
    added in Queens.

    Change-Id: I98a2785c07f7af02ad83650c72d9e1868290ece4
    Closes-Bug: #1796981
    (cherry picked from commit 4da54c07861a1542a8e30a768d4506d3e81b5598)
    (cherry picked from commit 940034c27c611b8b344f8371eb0458b16fb58f1d)
    (cherry picked from commit 62fbfdfa8f2dda1a5d9c3733b2f3da3a9d00c93a)