GaOrtiga commented on code in PR #13561:
URL: https://github.com/apache/cloudstack/pull/13561#discussion_r3613666085
##########
server/src/main/java/com/cloud/server/StatsCollector.java:
##########
@@ -1226,6 +1226,14 @@ protected void runInContext() {
Map<Object, Object> metrics = new HashMap<>();
for (HostVO host : hosts) {
+ if (HypervisorType.KVM.equals(host.getHypervisorType()) &&
ManagementServerNode.getManagementServerId() != host.getManagementServerId()) {
+ // When there are multiple Management Server nodes on
the environment, all of them request stat collections for the same VM in
different moments; with that,
+ // the interval from "vm.stats.interval" is not
respected. Also, the stats commands are routed to the Management Server
connected to the Agent where the VM is running.
+ // Furthermore, the number of stat entries on the DB
scales with the number of Management Servers. Therefore, we only request the
stat collections from
+ // hosts connected to the Management Server, honoring
the interval, presenting the correct data, and reducing the necessary storage
to store the VMs stats.
Review Comment:
@DaanHoogland
I can move it to the javadoc, I originally put it there because I believe
its a little weird to have a javadoc that refers to a single if in the method,
but I'm fine with changing it.
As far as summarizing, would it still be necessary? if we are moving it to
the javadocs it's no longer cluttering the code, and having the full
information on why this if is usefull won't hurt
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]