Merge remote-tracking branch 'origin/4.19'

Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
This commit is contained in:
Rohit Yadav 2024-07-10 15:57:06 +05:30
commit cea4801be1
3 changed files with 15 additions and 6 deletions

View File

@ -104,6 +104,7 @@ import com.cloud.resource.ResourceState;
import com.cloud.storage.DataStoreRole; import com.cloud.storage.DataStoreRole;
import com.cloud.storage.DiskOfferingVO; import com.cloud.storage.DiskOfferingVO;
import com.cloud.storage.MigrationOptions; import com.cloud.storage.MigrationOptions;
import com.cloud.storage.ScopeType;
import com.cloud.storage.Snapshot; import com.cloud.storage.Snapshot;
import com.cloud.storage.SnapshotVO; import com.cloud.storage.SnapshotVO;
import com.cloud.storage.Storage; import com.cloud.storage.Storage;
@ -922,11 +923,17 @@ public class StorageSystemDataMotionStrategy implements DataMotionStrategy {
HostVO hostVO; HostVO hostVO;
if (srcStoragePoolVO.getClusterId() != null) { // if either source or destination is a HOST-scoped storage pool, the migration MUST be performed on that host
hostVO = getHostInCluster(srcStoragePoolVO.getClusterId()); if (ScopeType.HOST.equals(srcVolumeInfo.getDataStore().getScope().getScopeType())) {
} hostVO = _hostDao.findById(srcVolumeInfo.getDataStore().getScope().getScopeId());
else { } else if (ScopeType.HOST.equals(destVolumeInfo.getDataStore().getScope().getScopeType())) {
hostVO = getHost(destVolumeInfo.getDataCenterId(), HypervisorType.KVM, false); hostVO = _hostDao.findById(destVolumeInfo.getDataStore().getScope().getScopeId());
} else {
if (srcStoragePoolVO.getClusterId() != null) {
hostVO = getHostInCluster(srcStoragePoolVO.getClusterId());
} else {
hostVO = getHost(destVolumeInfo.getDataCenterId(), HypervisorType.KVM, false);
}
} }
return hostVO; return hostVO;

View File

@ -716,6 +716,8 @@ public class CapacityManagerImpl extends ManagerBase implements CapacityManager,
if (vmDetailCpu != null) { if (vmDetailCpu != null) {
//if vmDetail_cpu is not null it means it is running in a overcommited cluster. //if vmDetail_cpu is not null it means it is running in a overcommited cluster.
cpuOvercommitRatio = Float.parseFloat(vmDetailCpu.getValue()); cpuOvercommitRatio = Float.parseFloat(vmDetailCpu.getValue());
}
if (vmDetailRam != null) {
ramOvercommitRatio = Float.parseFloat(vmDetailRam.getValue()); ramOvercommitRatio = Float.parseFloat(vmDetailRam.getValue());
} }
ServiceOffering so = offeringsMap.get(vm.getServiceOfferingId()); ServiceOffering so = offeringsMap.get(vm.getServiceOfferingId());

View File

@ -28,7 +28,7 @@
"headless": true, "headless": true,
"http_directory": "http", "http_directory": "http",
"iso_checksum": "sha512:33c08e56c83d13007e4a5511b9bf2c4926c4aa12fd5dd56d493c0653aecbab380988c5bf1671dbaea75c582827797d98c4a611f7fb2b131fbde2c677d5258ec9", "iso_checksum": "sha512:33c08e56c83d13007e4a5511b9bf2c4926c4aa12fd5dd56d493c0653aecbab380988c5bf1671dbaea75c582827797d98c4a611f7fb2b131fbde2c677d5258ec9",
"iso_url": "https://download.cloudstack.org/systemvm/debian/debian-12.5.0-amd64-netinst.iso", "iso_url": "https://cdimage.debian.org/mirror/cdimage/archive/12.5.0/amd64/iso-cd/debian-12.5.0-amd64-netinst.iso",
"net_device": "virtio-net", "net_device": "virtio-net",
"output_directory": "../dist", "output_directory": "../dist",
"qemuargs": [ "qemuargs": [