diff --git a/server/src/com/cloud/network/as/AutoScaleManagerImpl.java b/server/src/com/cloud/network/as/AutoScaleManagerImpl.java index 8c390974983..b3c997a853d 100644 --- a/server/src/com/cloud/network/as/AutoScaleManagerImpl.java +++ b/server/src/com/cloud/network/as/AutoScaleManagerImpl.java @@ -223,10 +223,6 @@ public class AutoScaleManagerImpl implements AutoScaleService, Manager { throw new InvalidParameterValueException("duration : " + duration + " specified in a policy cannot be less than vm group's interval : " + interval); } - if (quietTime < interval) { - throw new InvalidParameterValueException("quietTime : " + quietTime + " specified in a policy cannot be less than vm group's interval : " + interval); - } - if (quietTime != prevQuietTime) { throw new InvalidParameterValueException("quietTime should be same for all the policies specified in " + paramName); } @@ -669,12 +665,9 @@ public class AutoScaleManagerImpl implements AutoScaleService, Manager { if (!vmGroupVO.getState().equals(AutoScaleVmGroup.State_Disabled)) { throw new InvalidParameterValueException("The AutoScale Policy can be updated only if the Vm Group it is associated with is disabled in state"); } - if (vmGroupVO.getInterval() < policy.getDuration()) { + if (policy.getDuration() < vmGroupVO.getInterval()) { throw new InvalidParameterValueException("duration is less than the associated AutoScaleVmGroup's interval"); } - if (vmGroupVO.getInterval() < policy.getQuietTime()) { - throw new InvalidParameterValueException("quietTime is less than the associated AutoScaleVmGroup's interval"); - } } policy = checkValidityAndPersist(policy, conditionIds); diff --git a/setup/db/create-schema.sql b/setup/db/create-schema.sql index b6589eb832a..e517cda8e20 100755 --- a/setup/db/create-schema.sql +++ b/setup/db/create-schema.sql @@ -2482,7 +2482,7 @@ CREATE TABLE `cloud`.`autoscale_vmgroups` ( CONSTRAINT `fk_autoscale_vmgroups__zone_id` FOREIGN KEY `fk_autoscale_vmgroups__zone_id`(`zone_id`) REFERENCES `data_center`(`id`), CONSTRAINT `uc_autoscale_vmgroups__uuid` UNIQUE (`uuid`), INDEX `i_autoscale_vmgroups__removed`(`removed`), - INDEX `i_autoscale_vmgroups__load_balancer_id`(`load_balancer_id`) + INDEX `i_autoscale_vmgroups__load_balancer_id`(`load_balancer_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; CREATE TABLE `cloud`.`autoscale_policy_condition_map` ( @@ -2505,9 +2505,9 @@ CREATE TABLE `cloud`.`autoscale_vmgroup_policy_map` ( INDEX `i_autoscale_vmgroup_policy_map__vmgroup_id`(`vmgroup_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -INSERT INTO `cloud`.`counter` (id, source, name, value,created) VALUES (1,'snmp','Linux User CPU Time(%)', '.1.3.6.1.4.1.2021.11.9.0', now()); -INSERT INTO `cloud`.`counter` (id, source, name, value,created) VALUES (2,'snmp','Linux System CPU Time(%)', '.1.3.6.1.4.1.2021.11.10.0', now()); -INSERT INTO `cloud`.`counter` (id, source, name, value,created) VALUES (3,'snmp','Linux CPU Idle Time(%)', '.1.3.6.1.4.1.2021.11.11.0', now()); -INSERT INTO `cloud`.`counter` (id, source, name, value,created) VALUES (100,'netscaler','ResponseTime(in ms)', 'RESPTIME', now()); +INSERT INTO `cloud`.`counter` (id, source, name, value,created) VALUES (1,'snmp','Linux User CPU - percentage', '1.3.6.1.4.1.2021.11.9.0', now()); +INSERT INTO `cloud`.`counter` (id, source, name, value,created) VALUES (2,'snmp','Linux System CPU - percentage', '1.3.6.1.4.1.2021.11.10.0', now()); +INSERT INTO `cloud`.`counter` (id, source, name, value,created) VALUES (3,'snmp','Linux CPU Idle - percentage', '1.3.6.1.4.1.2021.11.11.0', now()); +INSERT INTO `cloud`.`counter` (id, source, name, value,created) VALUES (100,'netscaler','Response Time - microseconds)', 'RESPTIME', now()); SET foreign_key_checks = 1;