Fix volume response for service offering with disk offering (#9273)

This commit is contained in:
Vishesh 2024-06-22 11:17:11 +05:30 committed by GitHub
parent 9055610034
commit 59e9ab9efe
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -296,9 +296,10 @@ public class VolumeJoinDaoImpl extends GenericDaoBaseWithTagInformation<VolumeJo
ServiceOffering serviceOffering = null;
if (computeOnlyDiskOffering != null) {
serviceOffering = ApiDBUtils.findServiceOfferingByComputeOnlyDiskOffering(volume.getDiskOfferingId(), false);
}
if (serviceOffering == null) {
serviceOffering = ApiDBUtils.findServiceOfferingByComputeOnlyDiskOffering(volume.getDiskOfferingId(), true);
if (serviceOffering == null) {
// Check again for removed ones
serviceOffering = ApiDBUtils.findServiceOfferingByComputeOnlyDiskOffering(volume.getDiskOfferingId(), true);
}
}
return serviceOffering;
}