You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by pr...@apache.org on 2012/11/16 11:00:31 UTC
[17/50] git commit: CS-15729:AutoScale. Aligning the NetScaler
response time counter, and correcting duration check against interval
CS-15729:AutoScale. Aligning the NetScaler response time counter, and correcting duration check against interval
Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/58db4d0d
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/58db4d0d
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/58db4d0d
Branch: refs/heads/master
Commit: 58db4d0d888fb7ddd994b3a56266d0702981ae44
Parents: acb963f
Author: Vijay Venkatachalam <vi...@citrix.com>
Authored: Wed Sep 12 21:40:39 2012 +0530
Committer: Vijay Venkatachalam <vi...@citrix.com>
Committed: Fri Nov 16 10:56:57 2012 +0530
----------------------------------------------------------------------
.../com/cloud/network/as/AutoScaleManagerImpl.java | 9 +--------
setup/db/create-schema.sql | 10 +++++-----
2 files changed, 6 insertions(+), 13 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/58db4d0d/server/src/com/cloud/network/as/AutoScaleManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/network/as/AutoScaleManagerImpl.java b/server/src/com/cloud/network/as/AutoScaleManagerImpl.java
index 8c39097..b3c997a 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<Type> 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<Type> 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);
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/58db4d0d/setup/db/create-schema.sql
----------------------------------------------------------------------
diff --git a/setup/db/create-schema.sql b/setup/db/create-schema.sql
index b6589eb..e517cda 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;