So in that case wrapped_conn would have to be None which makes bool(None) result in False and that would disable the service. The nasty thing about that is the disabled_reason is set to '' so we don't even know that we had an automatic disable of the host, which is what change Ia7544a35 was trying to address.
We can probably take the libvirt _close_connection callback out of the equation here since we're running with libvirt 0.9.8:
"Setting up libvirt0 (0.9.8- 2ubuntu17. 16) ..."
And the registerCloseCa llback is in version >= 1.0.1, so that can't be the problem.
That leaves the finally block in _get_connection added here:
https:/ /review. openstack. org/#/c/ 52189/9/ nova/virt/ libvirt/ driver. py
So in that case wrapped_conn would have to be None which makes bool(None) result in False and that would disable the service. The nasty thing about that is the disabled_reason is set to '' so we don't even know that we had an automatic disable of the host, which is what change Ia7544a35 was trying to address.