Skip to content

Commit

Permalink
20250114일자 신규소스 반영 후 빌드 오류 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
jschoiRR committed Jan 14, 2025
1 parent 0e2369d commit 3c16c27
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -476,6 +476,7 @@ public void setVmSnapshotName(String vmSnapshotName) {
@Override
public String getVmSnapshotName() {
return vmSnapshotName;
}

@Override
public String toString() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -998,7 +998,8 @@ public Long getUsedPhysicalSize() {
@Override
public void setUsedPhysicalSize(Long usedPhysicalSize) {
volumeVO.setUsedPhysicalSize(usedPhysicalSize);

}

@Override
public String toString() {
return String.format("VolumeObject %s",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ protected DeployDestination plan(final long nodesCount, final DataCenter zone, f
if (logger.isDebugEnabled()) {
logger.debug(String.format("Checking host : %s for capacity already reserved %d", h.getName(), reserved));
}
if (capacityManager.checkIfHostHasCapacity(h.getId(), cpu_requested * reserved, ram_requested * reserved, false, cpuOvercommitRatio, memoryOvercommitRatio, true)) {
if (capacityManager.checkIfHostHasCapacity(h, cpu_requested * reserved, ram_requested * reserved, false, cpuOvercommitRatio, memoryOvercommitRatio, true)) {
if (logger.isDebugEnabled()) {
logger.debug(String.format("Found host : %s for with enough capacity, CPU=%d RAM=%s", h.getName(), cpu_requested * reserved, toHumanReadableSize(ram_requested * reserved)));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ protected DeployDestination plan(final long nodesCount, final DataCenter zone, f
if (logger.isDebugEnabled()) {
logger.debug(String.format("Checking host : %s for capacity already reserved %d", h.getName(), reserved));
}
if (capacityManager.checkIfHostHasCapacity(h.getId(), cpu_requested * reserved, ram_requested * reserved, false, cpuOvercommitRatio, memoryOvercommitRatio, true)) {
if (capacityManager.checkIfHostHasCapacity(h, cpu_requested * reserved, ram_requested * reserved, false, cpuOvercommitRatio, memoryOvercommitRatio, true)) {
if (logger.isDebugEnabled()) {
logger.debug(String.format("Found host : %s for with enough capacity, CPU=%d RAM=%s", h.getName(), cpu_requested * reserved, toHumanReadableSize(ram_requested * reserved)));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ protected DeployDestination plan(final long nodesCount, final DataCenter zone, f
if (logger.isDebugEnabled()) {
logger.debug(String.format("Checking host : %s for capacity already reserved %d", h.getName(), reserved));
}
if (capacityManager.checkIfHostHasCapacity(h.getId(), cpu_requested * reserved, ram_requested * reserved, false, cpuOvercommitRatio, memoryOvercommitRatio, true)) {
if (capacityManager.checkIfHostHasCapacity(h, cpu_requested * reserved, ram_requested * reserved, false, cpuOvercommitRatio, memoryOvercommitRatio, true)) {
if (logger.isDebugEnabled()) {
logger.debug(String.format("Found host : %s for with enough capacity, CPU=%d RAM=%s", h.getName(), cpu_requested * reserved, toHumanReadableSize(ram_requested * reserved)));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ public boolean attachCluster(DataStore store, ClusterScope scope) {
List<HostVO> poolHosts = new ArrayList<HostVO>();
for (HostVO h : allHosts) {
try {
storageMgr.connectHostToSharedPool(h.getId(), primarystore.getId());
storageMgr.connectHostToSharedPool(h, primarystore.getId());
poolHosts.add(h);
} catch (StorageConflictException se) {
primaryDataStoreDao.expunge(primarystore.getId());
Expand All @@ -261,7 +261,7 @@ public boolean attachZone(DataStore dataStore, ZoneScope scope, HypervisorType h
List<HostVO> poolHosts = new ArrayList<HostVO>();
for (HostVO host : hosts) {
try {
storageMgr.connectHostToSharedPool(host.getId(), dataStore.getId());
storageMgr.connectHostToSharedPool(host, dataStore.getId());
poolHosts.add(host);
} catch (StorageConflictException se) {
primaryDataStoreDao.expunge(dataStore.getId());
Expand Down
2 changes: 1 addition & 1 deletion server/src/main/java/com/cloud/vm/UserVmManagerImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,7 @@
import com.cloud.storage.StoragePoolStatus;
import com.cloud.storage.VMTemplateStorageResourceAssoc;
import com.cloud.storage.VMTemplateVO;
import com.cloud.storage.VMTemplateZoneVO;
import com.cloud.storage.Volume;
import com.cloud.storage.VolumeApiService;
import com.cloud.storage.VolumeVO;
Expand Down Expand Up @@ -4411,7 +4412,6 @@ private UserVm getUncheckedUserVmResource(DataCenter zone, String hostName, Stri
if (template.getTemplateType().equals(TemplateType.SYSTEM) && !CKS_NODE.equals(vmType) && !SHAREDFSVM.equals(vmType)) {
throw new InvalidParameterValueException(String.format("Unable to use system template %s to deploy a user vm", template));
}

List<VMTemplateZoneVO> listZoneTemplate = _templateZoneDao.listByZoneTemplate(zone.getId(), template.getId());
if (listZoneTemplate == null || listZoneTemplate.isEmpty()) {
throw new InvalidParameterValueException(String.format("The template %s is not available for use", template));
Expand Down

0 comments on commit 3c16c27

Please sign in to comment.