Skip to content

Commit d2fa21a

Browse files
committed
Fix GPU allocation mistake
1 parent 3a577a6 commit d2fa21a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

server/src/main/java/com/cloud/agent/manager/allocator/impl/FirstFitAllocator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -411,7 +411,7 @@ protected List<Host> filterHostWithNoHvmIfTemplateRequested(VMTemplateVO templat
411411
* If service offering did not request for vGPU, then move all host with GPU to the end of the host priority list.
412412
*/
413413
protected void prioritizeHostsByGpuEnabled(ServiceOffering offering, List<Host> prioritizedHosts) {
414-
boolean serviceOfferingRequestedVGpu = _serviceOfferingDetailsDao.findDetail(offering.getId(), GPU.Keys.vgpuType.toString()) != null && offering.getVgpuProfileId() == null;
414+
boolean serviceOfferingRequestedVGpu = _serviceOfferingDetailsDao.findDetail(offering.getId(), GPU.Keys.vgpuType.toString()) != null || offering.getVgpuProfileId() != null;
415415

416416
if (serviceOfferingRequestedVGpu) {
417417
return;

0 commit comments

Comments
 (0)