Skip to content

Commit cea4801

Browse files
Merge remote-tracking branch 'origin/4.19'
Signed-off-by: Rohit Yadav <[email protected]>
2 parents 9f1577d + 32cc1d4 commit cea4801

File tree

3 files changed

+15
-6
lines changed

3 files changed

+15
-6
lines changed

engine/storage/datamotion/src/main/java/org/apache/cloudstack/storage/motion/StorageSystemDataMotionStrategy.java

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@
104104
import com.cloud.storage.DataStoreRole;
105105
import com.cloud.storage.DiskOfferingVO;
106106
import com.cloud.storage.MigrationOptions;
107+
import com.cloud.storage.ScopeType;
107108
import com.cloud.storage.Snapshot;
108109
import com.cloud.storage.SnapshotVO;
109110
import com.cloud.storage.Storage;
@@ -922,11 +923,17 @@ private HostVO getHostOnWhichToExecuteMigrationCommand(VolumeInfo srcVolumeInfo,
922923

923924
HostVO hostVO;
924925

925-
if (srcStoragePoolVO.getClusterId() != null) {
926-
hostVO = getHostInCluster(srcStoragePoolVO.getClusterId());
927-
}
928-
else {
929-
hostVO = getHost(destVolumeInfo.getDataCenterId(), HypervisorType.KVM, false);
926+
// if either source or destination is a HOST-scoped storage pool, the migration MUST be performed on that host
927+
if (ScopeType.HOST.equals(srcVolumeInfo.getDataStore().getScope().getScopeType())) {
928+
hostVO = _hostDao.findById(srcVolumeInfo.getDataStore().getScope().getScopeId());
929+
} else if (ScopeType.HOST.equals(destVolumeInfo.getDataStore().getScope().getScopeType())) {
930+
hostVO = _hostDao.findById(destVolumeInfo.getDataStore().getScope().getScopeId());
931+
} else {
932+
if (srcStoragePoolVO.getClusterId() != null) {
933+
hostVO = getHostInCluster(srcStoragePoolVO.getClusterId());
934+
} else {
935+
hostVO = getHost(destVolumeInfo.getDataCenterId(), HypervisorType.KVM, false);
936+
}
930937
}
931938

932939
return hostVO;

server/src/main/java/com/cloud/capacity/CapacityManagerImpl.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -716,6 +716,8 @@ public void updateCapacityForHost(final Host host, final Map<Long, ServiceOfferi
716716
if (vmDetailCpu != null) {
717717
//if vmDetail_cpu is not null it means it is running in a overcommited cluster.
718718
cpuOvercommitRatio = Float.parseFloat(vmDetailCpu.getValue());
719+
}
720+
if (vmDetailRam != null) {
719721
ramOvercommitRatio = Float.parseFloat(vmDetailRam.getValue());
720722
}
721723
ServiceOffering so = offeringsMap.get(vm.getServiceOfferingId());

tools/appliance/systemvmtemplate/template.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
"headless": true,
2929
"http_directory": "http",
3030
"iso_checksum": "sha512:33c08e56c83d13007e4a5511b9bf2c4926c4aa12fd5dd56d493c0653aecbab380988c5bf1671dbaea75c582827797d98c4a611f7fb2b131fbde2c677d5258ec9",
31-
"iso_url": "https://download.cloudstack.org/systemvm/debian/debian-12.5.0-amd64-netinst.iso",
31+
"iso_url": "https://cdimage.debian.org/mirror/cdimage/archive/12.5.0/amd64/iso-cd/debian-12.5.0-amd64-netinst.iso",
3232
"net_device": "virtio-net",
3333
"output_directory": "../dist",
3434
"qemuargs": [

0 commit comments

Comments
 (0)