commit 940034c27c611b8b344f8371eb0458b16fb58f1d
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.
Change-Id: I98a2785c07f7af02ad83650c72d9e1868290ece4
Closes-Bug: #1796981
(cherry picked from commit 4da54c07861a1542a8e30a768d4506d3e81b5598)
Reviewed: https:/ /review. openstack. org/611326 /git.openstack. org/cgit/ openstack/ nova/commit/ ?id=940034c27c6 11b8b344f8371eb 0458b16fb58f1d
Committed: https:/
Submitter: Zuul
Branch: stable/rocky
commit 940034c27c611b8 b344f8371eb0458 b16fb58f1d
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 rror.
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 NotImplementedE
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.
Change-Id: I98a2785c07f7af 02ad83650c72d9e 1868290ece4 2a8e30a768d4506 d3e81b5598)
Closes-Bug: #1796981
(cherry picked from commit 4da54c07861a154