From 5aad7cc307404e738ac12cf83d3a72c6c4e61649 Mon Sep 17 00:00:00 2001 From: Marcus Sorensen Date: Thu, 29 Nov 2012 13:49:20 -0700 Subject: [PATCH] Summary: Pull patch from 4.0 that skips deleting patchVbd when systemvms are stopped Detail: This patch fixed an issue with hosts trying to stop system vms that were already not running and deleting a patch disk for the system vm running on another host. It got applied to 4.0 but not master. Signed-off-by: Marcus Sorensen 1354222160 -0700 --- .../hypervisor/kvm/resource/LibvirtComputingResource.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java index 41ee1dd4139..b5af7841ca7 100755 --- a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java +++ b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java @@ -2651,13 +2651,14 @@ public class LibvirtComputingResource extends ServerResourceBase implements if (disk.getDeviceType() == DiskDef.deviceType.CDROM && disk.getDiskPath() != null) { cleanupDisk(conn, disk); - } else if (disk.getDiskPath() != null + } /* The clean up of patch disks should probably be done in expunge + else if (disk.getDiskPath() != null && disk.getDiskPath().contains(vmName + "-patchdisk") && vmName.matches("^[rsv]-\\d+-VM$")) { if (!_storagePoolMgr.deleteVbdByPath(disk.getDiskPath())) { s_logger.warn("failed to delete patch disk " + disk.getDiskPath()); } - } + }*/ } for (InterfaceDef iface: ifaces) { _vifDriver.unplug(iface);