DaanHoogland commented on code in PR #13561:
URL: https://github.com/apache/cloudstack/pull/13561#discussion_r3616274230
##########
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:
well, I’d prefer to have no comment in a method unless there are some really
nasty quirks needed. In this case I don’t think any comment is needed to be
honest. I summary of the method is more useful in my opinion. (no hard demands)
--
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]