mirror of https://github.com/apache/cloudstack.git
CS-15729. AutoScale. Default counter names are corrected to valid values without special characters
This commit is contained in:
parent
4afd85a930
commit
57b1783764
|
|
@ -173,7 +173,7 @@ public class AutoScaleManagerImpl<Type> implements AutoScaleService, Manager {
|
|||
for (Counter counter : counters) {
|
||||
if (!supportedCounters.contains(counter.getSource().name().toString())) {
|
||||
throw new InvalidParameterException("AutoScale counter with source='" + counter.getSource() + "' is not supported " +
|
||||
"in the network where lb is configured");
|
||||
"in the network where lb is configured");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -566,7 +566,7 @@ public class AutoScaleManagerImpl<Type> implements AutoScaleService, Manager {
|
|||
Account caller = UserContext.current().getCaller();
|
||||
|
||||
Ternary<Long, Boolean, ListProjectResourcesCriteria> domainIdRecursiveListProject = new Ternary<Long, Boolean,
|
||||
ListProjectResourcesCriteria>(domainId, isRecursive, null);
|
||||
ListProjectResourcesCriteria>(domainId, isRecursive, null);
|
||||
_accountMgr.buildACLSearchParameters(caller, id, accountName, null, permittedAccounts, domainIdRecursiveListProject,
|
||||
listAll, false);
|
||||
domainId = domainIdRecursiveListProject.first();
|
||||
|
|
@ -666,10 +666,10 @@ 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", null);
|
||||
}
|
||||
if (vmGroupVO.getInterval() < policy.getDuration()) {
|
||||
if (policy.getDuration() < vmGroupVO.getInterval()) {
|
||||
throw new InvalidParameterValueException("duration is less than the associated AutoScaleVmGroup's interval", null);
|
||||
}
|
||||
if (vmGroupVO.getInterval() < policy.getQuietTime()) {
|
||||
if (policy.getQuietTime() < vmGroupVO.getInterval()) {
|
||||
throw new InvalidParameterValueException("quietTime is less than the associated AutoScaleVmGroup's interval", null);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2443,9 +2443,9 @@ CREATE TABLE `cloud`.`autoscale_vmgroup_policy_map` (
|
|||
CONSTRAINT `fk_autoscale_vmgroup_policy_map__policy_id` FOREIGN KEY `fk_autoscale_vmgroup_policy_map__policy_id` (`policy_id`) REFERENCES `autoscale_policies` (`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 (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','ResponseTime(in ms)', 'RESPTIME', now());
|
||||
|
||||
SET foreign_key_checks = 1;
|
||||
|
|
|
|||
|
|
@ -282,9 +282,9 @@ CREATE TABLE `cloud`.`autoscale_vmgroup_policy_map` (
|
|||
CONSTRAINT `fk_autoscale_vmgroup_policy_map__policy_id` FOREIGN KEY `fk_autoscale_vmgroup_policy_map__policy_id` (`policy_id`) REFERENCES `autoscale_policies` (`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 (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','ResponseTime(in ms)', 'RESPTIME', now());
|
||||
|
||||
CREATE TABLE `cloud`.`s2s_vpn_gateway` (
|
||||
|
|
|
|||
Loading…
Reference in New Issue