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/09/12 18:11:06 UTC

git commit: CS-15729:AutoScale. Aligning the NetScaler response time counter, and correcting duration check against interval

Updated Branches:
  refs/heads/autoscale fe72590fc -> 491e83333


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/491e8333
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/491e8333
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/491e8333

Branch: refs/heads/autoscale
Commit: 491e8333387a07ef7580cf37ceea22b6d2d29765
Parents: fe72590
Author: Vijay Venkatachalam <vi...@citrix.com>
Authored: Wed Sep 12 21:40:39 2012 +0530
Committer: Pranav Saxena <pr...@citrix.com>
Committed: Wed Sep 12 21:40:39 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/491e8333/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/491e8333/setup/db/create-schema.sql
----------------------------------------------------------------------
diff --git a/setup/db/create-schema.sql b/setup/db/create-schema.sql
index 2b0b01a..bcdccab 100755
--- a/setup/db/create-schema.sql
+++ b/setup/db/create-schema.sql
@@ -2275,7 +2275,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` (
@@ -2298,9 +2298,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;