New feature: Resource count (CPU/RAM) take only running vms into calculation#3760
Conversation
|
This is introducing a flexible way to calculate the resource only for running VMs. It's particulalry useful for some customer senario, e.g. quota calculation. Thanks weizhou ! |
|
@weizhouapache nice feature. its good to get the calculation in a better state. |
|
@blueorangutan package |
|
@andrijapanicsb a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
|
Packaging result: ✖centos6 ✔centos7 ✔debian. JID-528 |
|
@blueorangutan test |
|
@andrijapanicsb a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
|
wow, it only took 2 days for the monkey to kick the tests... nice |
|
Trillian test result (tid-780)
|
|
@ustcweizhou can you fix the merge conflict? |
6e7b7a5 to
1412acd
Compare
|
@rhtyd rebased with latest master |
|
@blueorangutan package |
|
@rhtyd a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
|
Packaging result: ✖centos6 ✖centos7 ✔debian. JID-688 |
DaanHoogland
left a comment
There was a problem hiding this comment.
good code with tests added. work to Wei standard! standard style remark; big methods are getting bigger, no biggy (in this case)
|
@blueorangutan package |
|
@DaanHoogland a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
|
Packaging result: ✖centos6 ✔centos7 ✔debian. JID-698 |
|
@blueorangutan test |
|
@DaanHoogland a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
|
Trillian test result (tid-848)
|
|
@ustcweizhou can you check the one failing Travis test? |
…ce consumption of only running vms Stopped VMs do not use CPU/RAM actually. A new global configuration resource.count.running.vms.only is added to determine whether resource (cpu/memory) of only running vms (including Starting/Stopping) will be taken into calculation of resource consumption.
1412acd to
c8b1f38
Compare
|
@rhtyd |
|
all travis failures are long logs. merging |
|
@ustcweizhou a new marvin test was added to component, if it's a fast tests (doesn't take time to run) - please move to smoke and also add it to |
|
@rhtyd we already suffer from failures due to long logs. I think we must skim the load we lay on travis. (someday soon) |
|
@DaanHoogland tests added to component are not run by default, so it's like not adding the test in the first place. A new job runner/block can be easily added to Travis. We've like 20 odd jobs/runs per PR. |
|
we are using 18. is 20 the maximum that you know, @rhtyd ? I would like to see each test run for each change, but that may be too costly. |
…ulation (apache#3760) * marvin: check resource count of more types * New feature: add flag resource.count.running.vms.only to count resource consumption of only running vms Stopped VMs do not use CPU/RAM actually. A new global configuration resource.count.running.vms.only is added to determine whether resource (cpu/memory) of only running vms (including Starting/Stopping) will be taken into calculation of resource consumption. * Add integration test for resource count of only running vms
Description
Stopped VMs do not use CPU/RAM actually.
A new global configuration resource.count.running.vms.only is added to determine whether resource (cpu/memory) of only running vms (including Starting/Stopping) will be taken into calculation of resource consumption.
Types of changes
Screenshots (if appropriate):
How Has This Been Tested?
all testing in test/integration/component/test_resource_count_running_vms.py passed, including
deploy/start/stop/reboot a vm
update a vm with displayvm
destroy/expunge vm
tested with resource.count.running.vms.only is true and false both.
Two issues found in the testing: #3758 #3759