In addition to bug #1825882 where libvirtError exceptions are not raised correctly when attaching volumes to domains the underlying volumes are not disconnected from the host.
Steps to reproduce
==================
- virsh detach-disk <domain> vdb
- update nova & cinder DB as if volume is detached
- re-attach volume
Expected result
===============
Volume attach fails and the volume is disconnected from the host.
Actual result
=============
volume attach fails but remains connected to the host.
Environment
===========
1. Exact version of OpenStack you are running. See the following
list for all releases: http://docs.openstack.org/releases/
master to stable/queens
2. Which hypervisor did you use?
(For example: Libvirt + KVM, Libvirt + XEN, Hyper-V, PowerKVM, ...)
What's the version of that?
Libvirt + QEMU/KVM
2. Which storage type did you use?
(For example: Ceph, LVM, GPFS, ...)
What's the version of that?
N/A
3. Which networking type did you use?
(For example: nova-network, Neutron with OpenVSwitch, ...)
Description
===========
In addition to bug #1825882 where libvirtError exceptions are not raised correctly when attaching volumes to domains the underlying volumes are not disconnected from the host.
Steps to reproduce
==================
- virsh detach-disk <domain> vdb
- update nova & cinder DB as if volume is detached
- re-attach volume
Expected result
===============
Volume attach fails and the volume is disconnected from the host.
Actual result
=============
volume attach fails but remains connected to the host.
Environment docs.openstack. org/releases/
===========
1. Exact version of OpenStack you are running. See the following
list for all releases: http://
master to stable/queens
2. Which hypervisor did you use?
(For example: Libvirt + KVM, Libvirt + XEN, Hyper-V, PowerKVM, ...)
What's the version of that?
Libvirt + QEMU/KVM
2. Which storage type did you use?
(For example: Ceph, LVM, GPFS, ...)
What's the version of that?
N/A
3. Which networking type did you use?
(For example: nova-network, Neutron with OpenVSwitch, ...)
N/A