mirror of
https://github.com/apache/cloudstack.git
synced 2025-10-26 08:42:29 +01:00
CLOUDSTACK-9688: Fix failing test_volumes on centos7/kvm
Due to OS/hypervisor/environmental configuration, detaching a disk/device using libvirt can be successful without updating the domain configuration (xml). This leads to reattachment failure as the device is blocked until the next reboot. This fixes a specific environment case by performing stop/start on the VM only in case of KVM, which will recreate a fresh domain config (xml) as KVM VMs have transient domain configs (xmls don't persist). Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
This commit is contained in:
parent
52f224f61d
commit
cdbe847d29
@ -378,6 +378,11 @@ class TestVolumes(cloudstackTestCase):
|
|||||||
#Clean up, terminate the created volumes
|
#Clean up, terminate the created volumes
|
||||||
if self.attached:
|
if self.attached:
|
||||||
self.virtual_machine.detach_volume(self.apiClient, self.volume)
|
self.virtual_machine.detach_volume(self.apiClient, self.volume)
|
||||||
|
|
||||||
|
if self.virtual_machine.hypervisor == "KVM":
|
||||||
|
self.virtual_machine.stop(self.apiClient)
|
||||||
|
self.virtual_machine.start(self.apiClient)
|
||||||
|
|
||||||
cleanup_resources(self.apiClient, self.cleanup)
|
cleanup_resources(self.apiClient, self.cleanup)
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user