mirror of https://github.com/apache/cloudstack.git
bug 9066: don't allow enabling ha for vm created from Ha disbled service offering
status 9066: resolved fixed
This commit is contained in:
parent
8906b77e19
commit
05be5acfda
|
|
@ -1615,6 +1615,11 @@ public class UserVmManagerImpl implements UserVmManager, UserVmService, Manager
|
|||
if (vmInstance == null) {
|
||||
throw new InvalidParameterValueException("unable to find virtual machine with id " + id);
|
||||
}
|
||||
|
||||
ServiceOffering offering = _configMgr.getServiceOffering(vmInstance.getServiceOfferingId());
|
||||
if (!offering.getOfferHA() && ha != null && ha) {
|
||||
throw new InvalidParameterValueException("Can't enable ha for the vm as it's created from the Service offering having HA disabled");
|
||||
}
|
||||
|
||||
userId = accountAndUserValidation(id, account, userId,vmInstance);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue