Uh oh!
There was an error while loading. Please reload this page.
Fix metrics stats for VMs not running - #5633
Conversation
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
@sureshanaparti and @DaanHoogland |
fc07f07 to
a78af60CompareDaanHoogland
commented
Nov 1, 2021
@blueorangutan package |
blueorangutan
commented
Nov 1, 2021
@DaanHoogland a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
blueorangutan
commented
Nov 1, 2021
Packaging result: ✔️ el7 ✔️ el8 ✔️ debian ✔️ suse15. SL-JID 1646 |
sureshanaparti
commented
Nov 1, 2021
@blueorangutan test |
blueorangutan
commented
Nov 1, 2021
@sureshanaparti a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
blueorangutan
commented
Nov 1, 2021
Trillian test result (tid-2502)
|
| */ | ||
| protected void cleanUpVirtualMachineStats() { | ||
| List<Long> allRunningVmIds = new ArrayList<Long>(); | ||
| for (UserVmVO vm : _userVmDao.listAllRunning()) { |
There was a problem hiding this comment.
VM stats are captured for running VMs only
removeVirtualMachineStats() removes the vm stat if the VM is stopped/destroyed after adding to the stats, so no need for this cleanup method.
There was a problem hiding this comment.
Thanks for the review @sureshanaparti!
The cleanUpVirtualMachineStats() method is important to maintain consistency of the metric stats shown by ACS even when there are cases of VMs changing state unexpectedly (e.g., when a VM crashes; or when the VM is stopped directly by the hypervisor interface, etc). In these cases the removeVirtualMachineStats() method is not executed, so the cleanUpVirtualMachineStats() method does its job.
joseflauzino
commented
Nov 16, 2021
Any update about this PR? |
DaanHoogland
commented
Nov 18, 2021
code looks good, let's retest |
blueorangutan
commented
Nov 18, 2021
@DaanHoogland a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
blueorangutan
commented
Nov 18, 2021
Packaging result: ✖️ el7 ✖️ el8 ✔️ debian ✖️ suse15. SL-JID 1734 |
DaanHoogland
commented
Nov 18, 2021
@blueorangutan package |
blueorangutan
commented
Nov 18, 2021
@DaanHoogland a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
blueorangutan
commented
Nov 18, 2021
Packaging result: ✔️ el7 ✖️ el8 ✔️ debian ✖️ suse15. SL-JID 1739 |
…metrics-stats-for-vms-not-running
joseflauzino
commented
Nov 19, 2021
@blueorangutan package |
blueorangutan
commented
Nov 19, 2021
@joseflauzino a Jenkins job has been kicked to build packages. I'll keep you posted as I make progress. |
blueorangutan
commented
Nov 19, 2021
Packaging result: ✔️ el7 ✔️ el8 ✔️ debian ✔️ suse15. SL-JID 1749 |
DaanHoogland
commented
Nov 22, 2021
@blueorangutan test |
blueorangutan
commented
Nov 22, 2021
@DaanHoogland a Trillian-Jenkins test job (centos7 mgmt + kvm-centos7) has been kicked to run smoke tests |
blueorangutan
commented
Nov 22, 2021
Trillian test result (tid-2572)
|
GutoVeronezi
left a comment
There was a problem hiding this comment.
LGTM
@DaanHoogland can we merge this?
DaanHoogland
commented
Dec 6, 2021
@GutoVeronezi yes, I think @sureshanaparti's question was answered to satisfaction as well. let's merge. |
sureshanaparti
commented
Dec 6, 2021
@joseflauzino Is this good to go in 4.16.1? If so, please rebase with '4.16'. |
joseflauzino
commented
Dec 6, 2021
@sureshanaparti for me we can keep it in the main (4.17). |
GutoVeronezi
commented
Dec 6, 2021
* Fix metrics stats for VMs that are not running * Improves the way to get vmIdsToRemoveStats * Improves test Co-authored-by: José Flauzino <jose@scclouds.com.br>
Description
This PR fixes the behavior of the stats collector with respect to VMs that are not running. The need for this is that if a running VM has a state change for some reason, ACS keeps showing the latest metrics stats collected.
Types of changes
Feature/Enhancement Scale or Bug Severity
Feature/Enhancement Scale
Bug Severity
How Has This Been Tested?
Using ACS UI, I performed the following steps: