server: fix scale vm with same disk offering id (#10235)

This commit is contained in:
Wei Zhou 2025-02-09 09:35:45 +01:00 committed by GitHub
parent d453c63848
commit d920aba176
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -2108,7 +2108,7 @@ public class UserVmManagerImpl extends ManagerBase implements UserVmManager, Vir
throw new InvalidParameterValueException("Unable to Scale VM, since disk offering strictness flag is not same for new service offering and old service offering");
}
if (currentServiceOffering.getDiskOfferingStrictness() && currentServiceOffering.getDiskOfferingId() != newServiceOffering.getDiskOfferingId()) {
if (currentServiceOffering.getDiskOfferingStrictness() && !currentServiceOffering.getDiskOfferingId().equals(newServiceOffering.getDiskOfferingId())) {
throw new InvalidParameterValueException("Unable to Scale VM, since disk offering id associated with the old service offering is not same for new service offering");
}