Repository navigation
Collect VM stats only from hosts connected to this management server - #14398
MitchDrage wants to merge 1 commit into
Conversation
Damans227
left a comment
There was a problem hiding this comment.
thanks @MitchDrage, fix looks right. LGTM.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## 4.20 #14398 +/- ##
=========================================
Coverage 16.41% 16.42%
- Complexity 13657 13658 +1
=========================================
Files 5669 5669
Lines 501628 501629 +1
Branches 60942 60942
=========================================
+ Hits 82336 82372 +36
+ Misses 410064 410025 -39
- Partials 9228 9232 +4
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
@blueorangutan package |
|
@DaanHoogland a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress. |
|
it looks good but I will do a quick manual verification once smoke tests pass. |
|
Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 19647 |
|
@blueorangutan test keepEnv |
|
@DaanHoogland a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests |
Description
Fixes #14397
Fixes #14411
This PR makes each management server collect VM stats only from the hosts connected to it. Previously every management server polled every host, so with 3 management servers each VM got 3 rows in
vm_statsper interval.VmStatsCollectornow filters its host search onmanagementServerId.HostCollectoris unchanged and still collects from all hosts.When
vm.stats.increment.metricsis on, the network and disk values returned are the sum of all stored rows for the VM. What this change does to that sum depends on the hypervisor:With the setting off (the default), the API returns the latest row. On KVM each row now covers the full
vm.stats.interval, so single samples are larger and more consistent. On VMware and XenServer single samples are unchanged.Types of changes
Feature/Enhancement Scale or Bug Severity
Bug Severity
Screenshots (if appropriate):
How Has This Been Tested?
StatsCollectorTestpasses (60 tests), including the two new ones.VmStatsCollectortest fails.VmwareResource.getVmStats,CitrixResourceBase.getVmStats); I haven't tested on either.How did you try to break this feature and the system with this change?
vm_stats.mgmt_server_id.listVirtualMachinesuses the newest row (or the sum), the UI charts plot every row in the time range, and the cleanup job deletes by timestamp, so they all still see every VM's stats.agentStatusTransitTostamps the host with the msid on each status change, and VMware/XenServer hosts are claimed by one management server when they load. No host is left without stats.