Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
383 commits
Select commit Hold shift + click to select a range
a9da7db
AS: clean statistics when scale up/down
weizhouapache Jul 28, 2022
d077fef
AS: change size to disksize
weizhouapache Jul 28, 2022
8980cc4
ui/src/views/compute/DeployVM.vue: send request by POST only if userd…
weizhouapache Jul 28, 2022
e1ce2c8
AS UI: show snmp params only if lb provider is netscaler
weizhouapache Jul 29, 2022
e523ed3
AS: update marvin to support new AS apis
weizhouapache Jul 29, 2022
545b6d6
AS UI: fix creation with override custom disk offering
weizhouapache Jul 29, 2022
bc8aa32
AS: add marvin test test_vm_autoscaling.py
weizhouapache Jul 29, 2022
540fb61
AS test: add new marvin classes
weizhouapache Jul 29, 2022
53d9789
AS marvin: fix test caused by conflict of overdiskofferingid and root…
weizhouapache Aug 1, 2022
d6d540c
AS: remove AS groups when remove an account
weizhouapache Aug 1, 2022
32a1acb
AS WIP: update marvin test
weizhouapache Aug 1, 2022
e3fc1bc
AS: list vms by autoscalevmgroupid
weizhouapache Aug 1, 2022
b3179af
AS: add vm to group soon after vm is created
weizhouapache Aug 1, 2022
ce6e2d2
AS: create dummy record when create/disable/enable a vm group
weizhouapache Aug 1, 2022
366cb0e
AS: mark statistics as Inactive no matter why scale up/down
weizhouapache Aug 1, 2022
a855b6e
AS: fix statistics are not removed
weizhouapache Aug 2, 2022
354592a
AS: fix cannot insert dummy record
weizhouapache Aug 2, 2022
dd5f286
AS: fix statistics are not marked as Inactive
weizhouapache Aug 2, 2022
460e92a
AS: mark statistics when update policy with conditionids
weizhouapache Aug 2, 2022
a59e201
AS UI: allow update vm group name when state is not Disbled
weizhouapache Aug 2, 2022
0faf9d2
AS DB: correct name of counters
weizhouapache Aug 2, 2022
02f6959
AS: fix get_haproxy_stats.sh
weizhouapache Aug 2, 2022
9562402
AS: create vm profile with userdata
weizhouapache Aug 2, 2022
8606ad7
AS test: fix marvin test failure
weizhouapache Aug 2, 2022
0be6e13
AS: expunge vm instead of destroy
weizhouapache Aug 2, 2022
36aa867
AS: fix sonar bug (equals)
weizhouapache Aug 2, 2022
6079845
AS: update default autoscale.stats.interval to 60
weizhouapache Aug 3, 2022
da83681
AS: fix marvin test test_deploy_vm_root_resize.py
weizhouapache Aug 3, 2022
16afb13
AS: check user api/secret key and endpoint.url only when lb provider …
weizhouapache Aug 3, 2022
a410227
AS UI: show 'close' button when all are processed
weizhouapache Aug 4, 2022
fd531ca
AS: cancel monitor task when AS group is removed
weizhouapache Aug 4, 2022
158231c
AS: insert inactive-dummy statistics record instead of marking all as…
weizhouapache Aug 4, 2022
a183c19
AS: list autoscale vmgroups by name
weizhouapache Aug 4, 2022
c85f3be
AS UI: fix AutoScaleVmProfile (1) counters for vpc; (2) sort params; …
weizhouapache Aug 5, 2022
40e3617
Merge remote-tracking branch 'apache/main' into 4.18-vm-autoscaling
weizhouapache Aug 17, 2022
ad47c12
AS UI: display template/offering name instead of dropdown in vm profi…
weizhouapache Aug 18, 2022
e1755bf
AS UI: support multiple scaleup policies
weizhouapache Aug 18, 2022
becfbb9
AS UI: add details to progress info
weizhouapache Aug 18, 2022
4eda32e
AS UI: quietTime should be same for all the policies specified in sca…
weizhouapache Aug 18, 2022
676e462
Revert "AS UI: quietTime should be same for all the policies specifie…
weizhouapache Aug 18, 2022
219117e
AS: remove check on quiettime in server
weizhouapache Aug 18, 2022
8b079e2
AS UI: support multiple scaledown policies
weizhouapache Aug 18, 2022
c29cc8a
AS UI: create vm group with multiple scaledown policies
weizhouapache Aug 18, 2022
10c9d7a
AS UI: disable add/remove policy if state is not Disabled
weizhouapache Aug 18, 2022
d915950
AS DB: use mysql procedure to add column and unique key
weizhouapache Aug 18, 2022
4777668
AS: use IllegalArgumentException instead of InvalidParameterValueExce…
weizhouapache Aug 18, 2022
038331f
AS test: add AutoScaleManagerImplTest
weizhouapache Aug 18, 2022
32fdfd5
AS test: more unit tests
weizhouapache Aug 22, 2022
355a578
AS test: unit tests on create AS policy
weizhouapache Aug 22, 2022
2dd9055
AS server: remove some debug logs
weizhouapache Aug 22, 2022
b49fa9f
AS test: unit tests on LibvirtGetAutoScaleMetricsCommandWrapper
weizhouapache Aug 22, 2022
b502924
Merge remote-tracking branch 'apache/main' into 4.18-vm-autoscaling
weizhouapache Aug 23, 2022
1fedc47
AS test: add unit test for XenServer56GetAutoScaleMetricsCommandWrapper
weizhouapache Aug 23, 2022
c2e8e64
AS: consider multiple public ips in xenserver plugin
weizhouapache Aug 23, 2022
609703d
AS plugin: support xcpserver
weizhouapache Aug 23, 2022
5452b1c
AS: consider multiple public ips in vmware plugin
weizhouapache Aug 23, 2022
07a75ba
AS test: add unit test for vmware plugin
weizhouapache Aug 24, 2022
99b5696
AS marvin test: verify vm count
weizhouapache Aug 24, 2022
f3cf538
AS server: expunge vm after destroy
weizhouapache Aug 24, 2022
a6b85fd
Revert "AS server: expunge vm after destroy"
weizhouapache Aug 24, 2022
b069de5
AS DB: Update autoscale_vmgroups so records will not be removed when …
weizhouapache Aug 25, 2022
7bd7672
AS server: use _userVmMgr.expunge instead of destroyvm
weizhouapache Aug 25, 2022
2e20f69
AS marvin test: verify vm profiles of new vms
weizhouapache Aug 25, 2022
ca9296b
AS DB: DROP FOREIGN KEY
weizhouapache Aug 25, 2022
54651a7
AS api: add role permissions for UpdateCondition
weizhouapache Aug 25, 2022
8832a40
AS test: add test for update and scale down
weizhouapache Aug 29, 2022
4b4e2a1
AS test: update as VM profile and VM group
weizhouapache Aug 29, 2022
5161f11
AS server: fix lb rule can be removed when vm group state is Disabled
weizhouapache Aug 29, 2022
7ec455d
Merge remote-tracking branch 'apache/main' into 4.18-vm-autoscaling
weizhouapache Aug 29, 2022
6ab6ce4
AS test: delete a vm and vm group
weizhouapache Aug 29, 2022
c5e13df
AS test: correct sleeptime after vm group/profile update in test_02
weizhouapache Aug 29, 2022
e7778c2
AS test: fix issues on vmware caused by vmware.root.disk.controller i…
weizhouapache Aug 30, 2022
dd773c8
AS UI: add check on threshold and allow threshold=0
weizhouapache Aug 30, 2022
7b0fc96
AS server: list AS entities by projectid
weizhouapache Aug 30, 2022
3f5c0a0
AS server: fix list AS entities
weizhouapache Aug 30, 2022
3716d7d
AS DB: update name/value of counters
weizhouapache Aug 30, 2022
66ecc3b
AS api: rename to NetworkReceivedBps and NetworkTransmitBps
weizhouapache Aug 31, 2022
2221268
AS: enable debugging in GetAutoScaleMetricsAnswer
weizhouapache Aug 31, 2022
9451351
AS hypervisor: fix empty answer on vmware
weizhouapache Aug 31, 2022
31e63af
AS: fix number exception on vmware
weizhouapache Aug 31, 2022
e310e0a
Merge remote-tracking branch 'apache/main' into 4.18-vm-autoscaling
weizhouapache Sep 1, 2022
7249b6a
AS api/server/ui: add projectId and make autoscaleUserId optional
weizhouapache Sep 1, 2022
8b89465
AS test: add test for vm group in project
weizhouapache Sep 1, 2022
cb0b207
AS test: check exact number of vms instead of min value
weizhouapache Sep 1, 2022
1852175
AS UI/server: add group actions
weizhouapache Sep 1, 2022
f594b98
AS api: add annotations to AutoScaleVmGroupResponse not AutoScaleVmPr…
weizhouapache Sep 5, 2022
de47f8e
AS unit test: update VmwareResourceTest
weizhouapache Sep 5, 2022
66f29c4
AS unit test: add AutoScaleVmGroupTest and AutoScalePolicyTest
weizhouapache Sep 6, 2022
b86da59
As unit test: update ApiResponseHelperTest.java
weizhouapache Sep 6, 2022
eb42f5a
As unit test: add AutoScaleVmGroupDaoImplTest.java
weizhouapache Sep 6, 2022
9a0b14a
AS unit test: update VmwareResourceTest
weizhouapache Sep 6, 2022
1ee36a1
As unit test: add AutoScaleVmGroupVmMapDaoImplTest.java
weizhouapache Sep 6, 2022
eb216ce
AS unit test: add GetAutoScaleMetricsCommandTest.java and GetAutoScal…
weizhouapache Sep 6, 2022
4de4de5
AS unit test: update AutoScaleVmGroupTest and AutoScalePolicyTest
weizhouapache Sep 6, 2022
7293222
AS unit test: update XcpServerWrapperTest and XenServer56WrapperTest
weizhouapache Sep 6, 2022
3f525df
AS unit test: add VirtualRouterAutoScaleTest.java
weizhouapache Sep 6, 2022
7239845
AS unit test: update XcpServerResourceTest.java and XenServer56Resour…
weizhouapache Sep 6, 2022
90a1cca
AS unit test: update VirtualRouterElement.java
weizhouapache Sep 6, 2022
b69eaf3
AS unit test: update AutoScaleVmGroupVmMapDaoImplTest.java
weizhouapache Sep 6, 2022
34deff7
AS unit test: add LoadBalancerTOTest.java
weizhouapache Sep 7, 2022
71a1222
AS UI: apply patches for DeployVm.vue on CreateAutoScaleVmGroup.vue
weizhouapache Sep 7, 2022
7a86b1b
As unit test: update ApiResponseHelperTest.java v2
weizhouapache Sep 7, 2022
d3d6e93
Merge remote-tracking branch 'apache/main' into 4.18-vm-autoscaling
weizhouapache Sep 7, 2022
1cab9c3
AS unit test: update VmwareResourceTest.java v2
weizhouapache Sep 7, 2022
27b0e67
AS unit test: update LibvirtComputingResourceTest
weizhouapache Sep 7, 2022
a4d509d
AS unit test: update CitrixResourceBaseTest.java
weizhouapache Sep 7, 2022
2f0055b
AS UI: fix CreateAutoScaleVmGroup.vue when backport 6687
weizhouapache Sep 7, 2022
bba74b0
AS unit test: add AutoScaleVmGroupStatisticsDaoImplTest.java
weizhouapache Sep 7, 2022
30502b6
AS server: revert some changes in LoadBalancingRulesManagerImpl.java
weizhouapache Sep 8, 2022
49b90e8
AS unit test: fix build error in jenkins
weizhouapache Sep 8, 2022
02e21c9
AS unit test: add CreateAutoScaleVmProfileCmdTest and UpdateAutoScale…
weizhouapache Sep 8, 2022
4e365f5
AS unit test: add UpdateConditionCmdTest.java
weizhouapache Sep 8, 2022
7816e79
AS unit test: update CitrixResourceBaseTest.java v2
weizhouapache Sep 8, 2022
c636dff
AS unit test: update VirtualRouterElementTest v2
weizhouapache Sep 8, 2022
23b723b
AS unit test: update AutoScaleVmGroupStatisticsDaoImplTest.java
weizhouapache Sep 8, 2022
d1f6c6b
AS unit test: update ApiResponseHelperTest.java v2
weizhouapache Sep 8, 2022
9521c1b
AS unit test: add AutoScaleManagerTest.java
weizhouapache Sep 8, 2022
b7387ad
AS unit test: update VmwareResourceTest v3
weizhouapache Sep 8, 2022
2539330
AS unit test: update LibvirtComputingResourceTest v2
weizhouapache Sep 8, 2022
d6ae7e2
AS unit test: small update on VirtualRouterAutoScaleTest and UpdateCo…
weizhouapache Sep 8, 2022
cffa520
AS review: use UpperCase for enum values
weizhouapache Sep 8, 2022
b8ef0ae
AS review: fix build and test errors
weizhouapache Sep 8, 2022
3e9c94e
AS unit test: fix VirtualRouterAutoScaleTest
weizhouapache Sep 8, 2022
f5f5ce8
AS unit test: update CreateAutoScaleVmProfileCmdTest v2
weizhouapache Sep 9, 2022
b22f091
AS unit test: fix sonar due to PrepareForTest
weizhouapache Sep 9, 2022
5084439
AS unit test: remove unnecessary PrepareForTest
weizhouapache Sep 9, 2022
98d04a4
AS unit test: update LoadBalancingRulesManagerImplTest and AutoScaleM…
weizhouapache Sep 9, 2022
f2cd810
AS review: commit as per Daan's comments
weizhouapache Sep 9, 2022
98235b9
Merge remote-tracking branch 'apache/main' into 4.18-vm-autoscaling
weizhouapache Sep 12, 2022
aeafeb1
Jacoco: fix no coverage result in server and some other modules
weizhouapache Sep 12, 2022
edab1d4
AS unit test: update AutoScaleManagerImplTest v2
weizhouapache Sep 12, 2022
462f269
AS sonar: fix code smells
weizhouapache Sep 12, 2022
47a9a50
AS server: fix NPE if fail to get VM statistics from host
weizhouapache Sep 12, 2022
5417b7b
AS sonar: fix code smells v3
weizhouapache Sep 12, 2022
ef8da4a
AS unit test: update AutoScaleManagerImplTest v3
weizhouapache Sep 12, 2022
36e682b
AS server: remove annotations when delete AS VM group not AS VM profile
weizhouapache Sep 12, 2022
36f7d6b
AS unit test: update AutoScaleManagerImplTest v4
weizhouapache Sep 12, 2022
831eb9e
AS unit test: update AutoScaleManagerImplTest v5
weizhouapache Sep 13, 2022
8b3fa4d
AS unit test: update AutoScaleManagerImplTest v6
weizhouapache Sep 13, 2022
87c6a87
AS unit test: update AutoScaleManagerImplTest v7
weizhouapache Sep 13, 2022
985eb9b
AS unit test: update AutoScaleManagerImplTest v8
weizhouapache Sep 13, 2022
e716fd9
AS unit test: update AutoScaleManagerImplTest v9
weizhouapache Sep 13, 2022
781a368
AS unit test: update AutoScaleManagerImpl v3
weizhouapache Sep 13, 2022
e4a9f30
AS unit test: update AutoScaleManagerImplTest v10
weizhouapache Sep 14, 2022
eef5f8e
AS test: add virtual network metrics in test
weizhouapache Sep 14, 2022
b0655e6
AS test: add test for vpc networks
weizhouapache Sep 14, 2022
c5c9694
AS server: replace by CATEGORY_ADVANCED and CATEGORY_ALERT
weizhouapache Sep 14, 2022
103ae74
Merge remote-tracking branch 'apache/main' into 4.18-vm-autoscaling
weizhouapache Sep 14, 2022
35f1a02
AS: fix build error after merging main branch
weizhouapache Sep 14, 2022
8d7af13
AS unit test: update AutoScaleManagerImplTest v11
weizhouapache Sep 14, 2022
105a96b
AS unit test: update AutoScaleManagerImplTest v12
weizhouapache Sep 14, 2022
1966e1f
AS server: extract method updateCountersMapByAggratedRecords
weizhouapache Sep 14, 2022
1c28f0d
AS sonar: fix code smells v4
weizhouapache Sep 15, 2022
a099314
AS DB: update vm groups state to upper case
weizhouapache Sep 15, 2022
39e3fe5
AS unit test: update AutoScaleManagerImplTest v13
weizhouapache Sep 16, 2022
fe73e52
AS server: fix a bug in netscaler data processing
weizhouapache Sep 16, 2022
dd9c9b5
Merge remote-tracking branch 'apache/main' into 4.18-vm-autoscaling
weizhouapache Sep 16, 2022
2b87cba
AS server: update default cleanup interval from 24 hours to 6 hours
weizhouapache Sep 19, 2022
6108efa
AS server: check dummy records for group and inactive records for gro…
weizhouapache Sep 19, 2022
a6c0d8b
AS server: do not get vm statistics if vm is stopped (hostid is null)
weizhouapache Sep 19, 2022
0a06d7d
AS UI: check state by uppercase
weizhouapache Sep 19, 2022
291edb9
AS UI: display 300 as default value of quiettime
weizhouapache Sep 20, 2022
f134c0f
AS UI: fix css style change in CreateNetwork forms after clicking New…
weizhouapache Sep 20, 2022
d1f8665
AS db/api/server: Add column 'name' to 'autoscale_policies' table and…
weizhouapache Sep 20, 2022
7aeecab
AS UI: display/update name of scaleup/scaledown policies
weizhouapache Sep 20, 2022
14d824d
AS UI: display tooltip in CreateAutoScaleVmGroup.vue
weizhouapache Sep 20, 2022
7ce158e
AS UI: display tooltip in AutoScaleUpPolicyTab and AutoScaleDownPolic…
weizhouapache Sep 20, 2022
d444dc6
AS UI: display tooltip in AutoScaleVmProfile.vue
weizhouapache Sep 20, 2022
e5ff501
AS: fix code smells
weizhouapache Sep 21, 2022
f6fa8b5
AS server: disable vm stop if vm group is not Disabled
weizhouapache Sep 21, 2022
45937d5
AS: fix code smells v6
weizhouapache Sep 21, 2022
80a8be5
AS: rename destroyvmgraceperiod to expungevmgraceperiod in DB/api/ser…
weizhouapache Sep 21, 2022
7219632
AS DB: fix travis by using CHANGE COLUMN instead of RENAME COLUMN
weizhouapache Sep 21, 2022
12460fd
AS DAO: replace addAnd with setParameters and add method countAvailab…
weizhouapache Sep 21, 2022
6f3fb6f
AS api: fix missing change in rename of destroyvmgraceperiod to expun…
weizhouapache Sep 22, 2022
7bf19ee
AS server: consider only number of available VMs in data processing
weizhouapache Sep 22, 2022
4749cec
Merge remote-tracking branch 'apache/main' into 4.18-vm-autoscaling
weizhouapache Sep 22, 2022
145e55b
AS DB: fix error code in IDEMPOTENT_CHANGE_COLUMN and create IDEMPOTE…
weizhouapache Sep 24, 2022
edaa2e3
Merge remote-tracking branch 'apache/main' into 4.18-vm-autoscaling
weizhouapache Sep 27, 2022
822d026
Merge remote-tracking branch 'apache/main' into 4.18-vm-autoscaling
weizhouapache Sep 30, 2022
466fd70
Merge remote-tracking branch 'apache/main' into 4.18-vm-autoscaling
weizhouapache Oct 3, 2022
09154d9
AS server: fix typo and change error message when fail to update coun…
weizhouapache Oct 3, 2022
63f27f3
AS server: expunge vm in scale-down
weizhouapache Oct 3, 2022
5edf38c
AS server: add more debug logs in checkConditionsForPolicy
weizhouapache Oct 3, 2022
2d0e216
AS server: check both max and min members of AS group
weizhouapache Oct 3, 2022
467c881
AS server: publish action events for scaleup and scaledown
weizhouapache Oct 3, 2022
6f78f95
AS test: consider if vm count is greater than max members
weizhouapache Oct 3, 2022
82f2b3f
AS server: add event for group owner and publish error if fail to des…
weizhouapache Oct 3, 2022
24b9aa4
AS server: fix 'Was unable to find lock for the key' when destroyvm i…
weizhouapache Oct 4, 2022
409b0a1
AS server: fix memory usage is 100% on vmware and use memory counter …
weizhouapache Oct 4, 2022
05438ab
AS DB: rename virtual.network.received/transmit to public.network.rec…
weizhouapache Oct 4, 2022
d2e7922
Merge remote-tracking branch 'apache/main' into 4.18-vm-autoscaling
weizhouapache Oct 6, 2022
a0ff4d2
AS: fix build error after merging UserData PR 6202
weizhouapache Oct 6, 2022
b4d3dea
AS UI: fix create sticky policiness
weizhouapache Oct 7, 2022
6fe4d34
AS server: throw exception when empty condition or policy list is passed
weizhouapache Oct 7, 2022
23c0698
AS UI: fix create condition/policy for other accounts
weizhouapache Oct 7, 2022
2d53ce6
AS: fix code smells
weizhouapache Oct 7, 2022
b728512
AS DB: fix stupid typo on VpcVirtualRouter counters
weizhouapache Oct 10, 2022
6a2a414
Merge remote-tracking branch 'apache/main' into 4.18-vm-autoscaling
weizhouapache Oct 11, 2022
485ab77
AS server: minMembers, maxMembers and interval must be greater than 0
weizhouapache Oct 11, 2022
246587a
AS server: continue with checks on other policies if a policy has Ina…
weizhouapache Oct 11, 2022
0f02902
Merge remote-tracking branch 'apache/main' into 4.18-vm-autoscaling
weizhouapache Oct 14, 2022
012c729
AS: fix quiettime caused by seconds vs milliseconds
weizhouapache Oct 14, 2022
87f3b6a
AS server: Do NOT apply LB config only if LB provider is NetScaler
weizhouapache Oct 17, 2022
9340578
AS test: create test policies with quiettime=60s
weizhouapache Oct 17, 2022
9c765ab
AS test: wait for user vms to be Running before verifying vm profiles
weizhouapache Oct 18, 2022
10a905c
AS server: get VM statistics only if vm is Running or Migrating; repl…
weizhouapache Oct 18, 2022
11b5f40
Merge remote-tracking branch 'apache/main' into 4.18-vm-autoscaling
weizhouapache Oct 18, 2022
fe92a04
AS server: use try-catch-finally in scale down to avoid wrong state i…
weizhouapache Oct 18, 2022
2570962
AS UI: fix removing conditions are not removed in wizard
weizhouapache Oct 18, 2022
678a316
AS systemvm: fix lb traffic is not considered in statistics
weizhouapache Oct 20, 2022
21477cb
AS systemvm: fix lb traffic is not considered in statistics (version 2)
weizhouapache Oct 20, 2022
d008c92
AS: cleanup old stats with unused policies
weizhouapache Oct 20, 2022
92527d4
AS server: use try-catch-finally in scale up too
weizhouapache Oct 20, 2022
4bda729
Merge remote-tracking branch 'apache/main' into 4.18-vm-autoscaling
weizhouapache Oct 21, 2022
a6aae88
Merge remote-tracking branch 'apache/main' into 4.18-vm-autoscaling
weizhouapache Oct 24, 2022
3898313
AS server: fix counter name in debug message
weizhouapache Oct 24, 2022
6a72eab
XenServer/XCP-ng: fix vm memory usage is always 99.9x%
weizhouapache Oct 26, 2022
1687143
systemvm: use httpclose instead of (deprecated) forceclose
weizhouapache Oct 26, 2022
77f7ab7
AS DB: use 'DROP KEY' instead of 'DROP FOREIGN KEY'
weizhouapache Oct 26, 2022
f408f43
Merge remote-tracking branch 'apache/main' into 4.18-vm-autoscaling
weizhouapache Oct 27, 2022
166064c
AS UI: add policy name in AS vmgroup creation wizard
weizhouapache Oct 27, 2022
fb86898
AS kvm: add vm.memballoon.stats.period in agent.properties
weizhouapache Oct 27, 2022
9ec5b68
AS DB: rollback to 'DROP FOREIGN KEY' and add error code 1025 to handler
weizhouapache Oct 27, 2022
8896633
Merge remote-tracking branch 'apache/main' into 4.18-vm-autoscaling
weizhouapache Oct 28, 2022
04e64ec
Merge remote-tracking branch 'apache/main' into 4.18-vm-autoscaling
weizhouapache Nov 7, 2022
c303832
AS UI: apply some text corrections
weizhouapache Nov 7, 2022
2cf7ada
AS UI: policy is editable when click 'Edit'
weizhouapache Nov 7, 2022
7633e0b
AS: Replace Bps with mbps
weizhouapache Nov 7, 2022
7032842
AS: change default value of autoscale.stats.cleanup.delay to 7200 (2 …
weizhouapache Nov 7, 2022
79875fe
AS: change unit of autoscale.stats.interval to seconds
weizhouapache Nov 7, 2022
23ea66c
AS: add next_vm_seq to vmgroup
weizhouapache Nov 7, 2022
e47eb47
AS UI: remove counters from scaleup/scaledown conditions
weizhouapache Nov 7, 2022
75c9360
AS UI: Do NOT show disk offerings list
weizhouapache Nov 7, 2022
e6a07df
AS UI: add message for scaleup/scaledown policies
weizhouapache Nov 7, 2022
a39edf2
kvm: change default value of vm.memballoon.stats.period to 0
weizhouapache Nov 7, 2022
5850335
AS: display number of available VMs in group
weizhouapache Nov 7, 2022
d3d95ed
AS: use SecureRandom in RandomStringUtils.random
weizhouapache Nov 7, 2022
3356cc4
AS: rename counter names
weizhouapache Nov 7, 2022
242398d
AS: fix code smell and add unit test AutoScaleVmProfileVOTest
weizhouapache Nov 8, 2022
1e4aaa5
AS: check AS group name (a-zA-Z0-9 and hyphen only)
weizhouapache Nov 8, 2022
489cfba
AS: add capability VmAutoScaling to Lb Service
weizhouapache Nov 8, 2022
a758f10
AS: Update column 'supports_vm_autoscaling' to 1 if network offerings…
weizhouapache Nov 8, 2022
c8868e9
AS: use MBITS_TO_BYTES instead of MBITS_To_BYTES
weizhouapache Nov 8, 2022
abd09a9
Merge remote-tracking branch 'apache/main' into 4.18-vm-autoscaling
weizhouapache Nov 9, 2022
209d8e1
AS UI: fix operator is reset to null when added a condition
weizhouapache Nov 11, 2022
d7ed272
AS api: fix description of parameter "interval" in AutoScaleVmGroup A…
weizhouapache Nov 11, 2022
9638c42
Merge remote-tracking branch 'apache/main' into 4.18-vm-autoscaling
weizhouapache Nov 23, 2022
288c58e
AS UI: tick VM scaling capability when create new network offering
weizhouapache Nov 23, 2022
fa23ec8
AS: support VM Autoscaling for default network offerings
weizhouapache Nov 30, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
113 changes: 57 additions & 56 deletions api/src/main/java/com/cloud/agent/api/to/LoadBalancerTO.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,17 +18,13 @@

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

import com.cloud.network.as.AutoScalePolicy;
import com.cloud.network.as.AutoScaleVmGroup;
import com.cloud.network.as.AutoScaleVmProfile;
import com.cloud.network.as.Condition;
import com.cloud.network.as.Counter;
import com.cloud.network.lb.LoadBalancingRule.LbAutoScalePolicy;
import com.cloud.network.lb.LoadBalancingRule.LbAutoScaleVmGroup;
import com.cloud.network.lb.LoadBalancingRule.LbAutoScaleVmProfile;
import com.cloud.network.lb.LoadBalancingRule.LbCondition;
import com.cloud.network.lb.LoadBalancingRule.LbDestination;
import com.cloud.network.lb.LoadBalancingRule.LbHealthCheckPolicy;
import com.cloud.network.lb.LoadBalancingRule.LbSslCert;
Expand Down Expand Up @@ -377,46 +373,64 @@ public String getMonitorState() {

public static class CounterTO implements Serializable {
private static final long serialVersionUID = 2L;
private final Long id;
private final String name;
private final String source;
private final Counter.Source source;
private final String value;
private final String provider;

public CounterTO(String name, String source, String value) {
public CounterTO(Long id, String name, Counter.Source source, String value, String provider) {
this.id = id;
this.name = name;
this.source = source;
this.value = value;
this.provider = provider;
}

public Long getId() {
return id;
}

public String getName() {
return name;
}

public String getSource() {
public Counter.Source getSource() {
return source;
}

public String getValue() {
return value;
}

public String getProvider() {
return provider;
}
}

public static class ConditionTO implements Serializable {
private static final long serialVersionUID = 2L;
private final Long id;
private final long threshold;
private final String relationalOperator;
private final Condition.Operator relationalOperator;
private final CounterTO counter;

public ConditionTO(long threshold, String relationalOperator, CounterTO counter) {
public ConditionTO(Long id, long threshold, Condition.Operator relationalOperator, CounterTO counter) {
this.id = id;
this.threshold = threshold;
this.relationalOperator = relationalOperator;
this.counter = counter;
}

public Long getId() {
return id;
}

public long getThreshold() {
return threshold;
}

public String getRelationalOperator() {
public Condition.Operator getRelationalOperator() {
return relationalOperator;
}

Expand All @@ -430,14 +444,16 @@ public static class AutoScalePolicyTO implements Serializable {
private final long id;
private final int duration;
private final int quietTime;
private String action;
private final Date lastQuietTime;
private AutoScalePolicy.Action action;
boolean revoked;
private final List<ConditionTO> conditions;

public AutoScalePolicyTO(long id, int duration, int quietTime, String action, List<ConditionTO> conditions, boolean revoked) {
public AutoScalePolicyTO(long id, int duration, int quietTime, Date lastQuietTime, AutoScalePolicy.Action action, List<ConditionTO> conditions, boolean revoked) {
this.id = id;
this.duration = duration;
this.quietTime = quietTime;
this.lastQuietTime = lastQuietTime;
this.conditions = conditions;
this.action = action;
this.revoked = revoked;
Expand All @@ -455,7 +471,11 @@ public int getQuietTime() {
return quietTime;
}

public String getAction() {
public Date getLastQuietTime() {
return lastQuietTime;
}

public AutoScalePolicy.Action getAction() {
return action;
}

Expand All @@ -476,7 +496,7 @@ public static class AutoScaleVmProfileTO implements Serializable {
private final String templateId;
private final String otherDeployParams;
private final List<Pair<String, String>> counterParamList;
private final Integer destroyVmGraceperiod;
private final Integer expungeVmGracePeriod;
private final String cloudStackApiUrl;
private final String autoScaleUserApiKey;
private final String autoScaleUserSecretKey;
Expand All @@ -485,14 +505,14 @@ public static class AutoScaleVmProfileTO implements Serializable {

public AutoScaleVmProfileTO(String zoneId, String domainId, String cloudStackApiUrl, String autoScaleUserApiKey, String autoScaleUserSecretKey,
String serviceOfferingId, String templateId, String vmName, String networkId, String otherDeployParams, List<Pair<String, String>> counterParamList,
Integer destroyVmGraceperiod) {
Integer expungeVmGracePeriod) {
this.zoneId = zoneId;
this.domainId = domainId;
this.serviceOfferingId = serviceOfferingId;
this.templateId = templateId;
this.otherDeployParams = otherDeployParams;
this.counterParamList = counterParamList;
this.destroyVmGraceperiod = destroyVmGraceperiod;
this.expungeVmGracePeriod = expungeVmGracePeriod;
this.cloudStackApiUrl = cloudStackApiUrl;
this.autoScaleUserApiKey = autoScaleUserApiKey;
this.autoScaleUserSecretKey = autoScaleUserSecretKey;
Expand Down Expand Up @@ -524,8 +544,8 @@ public List<Pair<String, String>> getCounterParamList() {
return counterParamList;
}

public Integer getDestroyVmGraceperiod() {
return destroyVmGraceperiod;
public Integer getExpungeVmGracePeriod() {
return expungeVmGracePeriod;
}

public String getCloudStackApiUrl() {
Expand All @@ -551,18 +571,22 @@ public String getNetworkId() {

public static class AutoScaleVmGroupTO implements Serializable {
private static final long serialVersionUID = 2L;

private final Long id;
private final String uuid;
private final int minMembers;
private final int maxMembers;
private final int memberPort;
private final int interval;
private final List<AutoScalePolicyTO> policies;
private final AutoScaleVmProfileTO profile;
private final String state;
private final String currentState;
private final AutoScaleVmGroup.State state;
private final AutoScaleVmGroup.State currentState;
private final Long loadBalancerId;

AutoScaleVmGroupTO(String uuid, int minMembers, int maxMembers, int memberPort, int interval, List<AutoScalePolicyTO> policies, AutoScaleVmProfileTO profile,
String state, String currentState) {
public AutoScaleVmGroupTO(Long id, String uuid, int minMembers, int maxMembers, int memberPort, int interval, List<AutoScalePolicyTO> policies, AutoScaleVmProfileTO profile,
AutoScaleVmGroup.State state, AutoScaleVmGroup.State currentState, Long loadBalancerId) {
this.id = id;
this.uuid = uuid;
this.minMembers = minMembers;
this.maxMembers = maxMembers;
Expand All @@ -572,6 +596,11 @@ public static class AutoScaleVmGroupTO implements Serializable {
this.profile = profile;
this.state = state;
this.currentState = currentState;
this.loadBalancerId = loadBalancerId;
}

public Long getId() {
return id;
}

public String getUuid() {
Expand Down Expand Up @@ -602,44 +631,16 @@ public AutoScaleVmProfileTO getProfile() {
return profile;
}

public String getState() {
public AutoScaleVmGroup.State getState() {
return state;
}

public String getCurrentState() {
public AutoScaleVmGroup.State getCurrentState() {
return currentState;
}
}

public void setAutoScaleVmGroup(LbAutoScaleVmGroup lbAutoScaleVmGroup) {
List<LbAutoScalePolicy> lbAutoScalePolicies = lbAutoScaleVmGroup.getPolicies();
List<AutoScalePolicyTO> autoScalePolicyTOs = new ArrayList<AutoScalePolicyTO>(lbAutoScalePolicies.size());
for (LbAutoScalePolicy lbAutoScalePolicy : lbAutoScalePolicies) {
List<LbCondition> lbConditions = lbAutoScalePolicy.getConditions();
List<ConditionTO> conditionTOs = new ArrayList<ConditionTO>(lbConditions.size());
for (LbCondition lbCondition : lbConditions) {
Counter counter = lbCondition.getCounter();
CounterTO counterTO = new CounterTO(counter.getName(), counter.getSource().toString(), "" + counter.getValue());
Condition condition = lbCondition.getCondition();
ConditionTO conditionTO = new ConditionTO(condition.getThreshold(), condition.getRelationalOperator().toString(), counterTO);
conditionTOs.add(conditionTO);
}
AutoScalePolicy autoScalePolicy = lbAutoScalePolicy.getPolicy();
autoScalePolicyTOs.add(new AutoScalePolicyTO(autoScalePolicy.getId(), autoScalePolicy.getDuration(), autoScalePolicy.getQuietTime(),
autoScalePolicy.getAction(), conditionTOs, lbAutoScalePolicy.isRevoked()));
}
LbAutoScaleVmProfile lbAutoScaleVmProfile = lbAutoScaleVmGroup.getProfile();
AutoScaleVmProfile autoScaleVmProfile = lbAutoScaleVmProfile.getProfile();

AutoScaleVmProfileTO autoScaleVmProfileTO =
new AutoScaleVmProfileTO(lbAutoScaleVmProfile.getZoneId(), lbAutoScaleVmProfile.getDomainId(), lbAutoScaleVmProfile.getCsUrl(),
lbAutoScaleVmProfile.getAutoScaleUserApiKey(), lbAutoScaleVmProfile.getAutoScaleUserSecretKey(), lbAutoScaleVmProfile.getServiceOfferingId(),
lbAutoScaleVmProfile.getTemplateId(), lbAutoScaleVmProfile.getVmName(), lbAutoScaleVmProfile.getNetworkId(), autoScaleVmProfile.getOtherDeployParams(),
autoScaleVmProfile.getCounterParams(), autoScaleVmProfile.getDestroyVmGraceperiod());

AutoScaleVmGroup autoScaleVmGroup = lbAutoScaleVmGroup.getVmGroup();
autoScaleVmGroupTO =
new AutoScaleVmGroupTO(autoScaleVmGroup.getUuid(), autoScaleVmGroup.getMinMembers(), autoScaleVmGroup.getMaxMembers(), autoScaleVmGroup.getMemberPort(),
autoScaleVmGroup.getInterval(), autoScalePolicyTOs, autoScaleVmProfileTO, autoScaleVmGroup.getState(), lbAutoScaleVmGroup.getCurrentState());
public Long getLoadBalancerId() {
return loadBalancerId;
}
}
}
5 changes: 5 additions & 0 deletions api/src/main/java/com/cloud/event/EventTypes.java
Original file line number Diff line number Diff line change
Expand Up @@ -559,6 +559,7 @@ public class EventTypes {
public static final String EVENT_COUNTER_DELETE = "COUNTER.DELETE";
public static final String EVENT_CONDITION_CREATE = "CONDITION.CREATE";
public static final String EVENT_CONDITION_DELETE = "CONDITION.DELETE";
public static final String EVENT_CONDITION_UPDATE = "CONDITION.UPDATE";
public static final String EVENT_AUTOSCALEPOLICY_CREATE = "AUTOSCALEPOLICY.CREATE";
public static final String EVENT_AUTOSCALEPOLICY_UPDATE = "AUTOSCALEPOLICY.UPDATE";
public static final String EVENT_AUTOSCALEPOLICY_DELETE = "AUTOSCALEPOLICY.DELETE";
Expand All @@ -570,6 +571,8 @@ public class EventTypes {
public static final String EVENT_AUTOSCALEVMGROUP_UPDATE = "AUTOSCALEVMGROUP.UPDATE";
public static final String EVENT_AUTOSCALEVMGROUP_ENABLE = "AUTOSCALEVMGROUP.ENABLE";
public static final String EVENT_AUTOSCALEVMGROUP_DISABLE = "AUTOSCALEVMGROUP.DISABLE";
public static final String EVENT_AUTOSCALEVMGROUP_SCALEDOWN = "AUTOSCALEVMGROUP.SCALEDOWN";
public static final String EVENT_AUTOSCALEVMGROUP_SCALEUP = "AUTOSCALEVMGROUP.SCALEUP";

public static final String EVENT_BAREMETAL_DHCP_SERVER_ADD = "PHYSICAL.DHCP.ADD";
public static final String EVENT_BAREMETAL_DHCP_SERVER_DELETE = "PHYSICAL.DHCP.DELETE";
Expand Down Expand Up @@ -1038,6 +1041,8 @@ public class EventTypes {
entityEventDetails.put(EVENT_AUTOSCALEVMGROUP_UPDATE, AutoScaleVmGroup.class);
entityEventDetails.put(EVENT_AUTOSCALEVMGROUP_ENABLE, AutoScaleVmGroup.class);
entityEventDetails.put(EVENT_AUTOSCALEVMGROUP_DISABLE, AutoScaleVmGroup.class);
entityEventDetails.put(EVENT_AUTOSCALEVMGROUP_SCALEDOWN, AutoScaleVmGroup.class);
entityEventDetails.put(EVENT_AUTOSCALEVMGROUP_SCALEUP, AutoScaleVmGroup.class);
entityEventDetails.put(EVENT_GUEST_VLAN_RANGE_DEDICATE, GuestVlan.class);
entityEventDetails.put(EVENT_DEDICATED_GUEST_VLAN_RANGE_RELEASE, GuestVlan.class);

Expand Down
1 change: 1 addition & 0 deletions api/src/main/java/com/cloud/network/Network.java
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,7 @@ public static class Capability {
public static final Capability NoVlan = new Capability("NoVlan");
public static final Capability PublicAccess = new Capability("PublicAccess");
public static final Capability ExtraDhcpOptions = new Capability("ExtraDhcpOptions");
public static final Capability VmAutoScaling = new Capability("VmAutoScaling");

private final String name;

Expand Down
9 changes: 5 additions & 4 deletions api/src/main/java/com/cloud/network/as/AutoScaleCounter.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,11 @@ public class AutoScaleCounter {
public static class AutoScaleCounterType {
private String _name;

public static final AutoScaleCounterType Snmp = new AutoScaleCounterType("snmp");
public static final AutoScaleCounterType Netscaler = new AutoScaleCounterType("netscaler");
public static final AutoScaleCounterType Cpu = new AutoScaleCounterType("cpu");
public static final AutoScaleCounterType Memory = new AutoScaleCounterType("memory");
public static final AutoScaleCounterType Snmp = new AutoScaleCounterType(Counter.Source.SNMP.name());
public static final AutoScaleCounterType Cpu = new AutoScaleCounterType(Counter.Source.CPU.name());
public static final AutoScaleCounterType Memory = new AutoScaleCounterType(Counter.Source.MEMORY.name());
public static final AutoScaleCounterType Netscaler = new AutoScaleCounterType(Counter.Source.NETSCALER.name());
public static final AutoScaleCounterType VirtualRouter = new AutoScaleCounterType(Counter.Source.VIRTUALROUTER.name());

public AutoScaleCounterType(String name) {
_name = name;
Expand Down
21 changes: 19 additions & 2 deletions api/src/main/java/com/cloud/network/as/AutoScalePolicy.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,26 @@

import org.apache.cloudstack.acl.ControlledEntity;
import org.apache.cloudstack.api.InternalIdentity;
import org.apache.commons.lang3.StringUtils;

public interface AutoScalePolicy extends ControlledEntity, InternalIdentity {

enum Action {
SCALEUP, SCALEDOWN;

public static Action fromValue(String action) {
if (StringUtils.isBlank(action)) {
return null;
} else if (action.equalsIgnoreCase("ScaleUp")) {
return SCALEUP;
} else if (action.equalsIgnoreCase("ScaleDown")) {
return SCALEDOWN;
} else {
throw new IllegalArgumentException("Unexpected AutoScale action : " + action);
}
}
}

@Override
long getId();

Expand All @@ -33,8 +50,8 @@ public interface AutoScalePolicy extends ControlledEntity, InternalIdentity {

public int getQuietTime();

public Date getLastQuiteTime();
public Date getLastQuietTime();

public String getAction();
public Action getAction();

}
5 changes: 4 additions & 1 deletion api/src/main/java/com/cloud/network/as/AutoScaleService.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
import org.apache.cloudstack.api.command.user.autoscale.UpdateAutoScalePolicyCmd;
import org.apache.cloudstack.api.command.user.autoscale.UpdateAutoScaleVmGroupCmd;
import org.apache.cloudstack.api.command.user.autoscale.UpdateAutoScaleVmProfileCmd;
import org.apache.cloudstack.api.command.user.autoscale.UpdateConditionCmd;

import com.cloud.exception.ResourceInUseException;
import com.cloud.exception.ResourceUnavailableException;
Expand All @@ -57,7 +58,7 @@ public interface AutoScaleService {

boolean configureAutoScaleVmGroup(CreateAutoScaleVmGroupCmd cmd) throws ResourceUnavailableException;

boolean deleteAutoScaleVmGroup(long vmGroupId);
boolean deleteAutoScaleVmGroup(long vmGroupId, Boolean cleanup);

AutoScaleVmGroup updateAutoScaleVmGroup(UpdateAutoScaleVmGroupCmd cmd);

Expand All @@ -78,4 +79,6 @@ public interface AutoScaleService {
List<? extends Condition> listConditions(ListConditionsCmd cmd);

boolean deleteCondition(long conditionId) throws ResourceInUseException;

Condition updateCondition(UpdateConditionCmd cmd) throws ResourceInUseException;
}
Loading