Pearl1594 commented on code in PR #14410:
URL: https://github.com/apache/cloudstack/pull/14410#discussion_r4295525190
##########
plugins/hypervisors/kvm/src/main/java/com/cloud/hypervisor/kvm/resource/KVMHAChecker.java:
##########
@@ -60,6 +53,22 @@ public Boolean checkingHeartBeat() {
return validResult;
}
+ /*
+ * With reportFailureIfOneStorageIsDown the host is dead as soon as one
pool has no heart beat,
+ * otherwise it is dead only when none of the pools has one.
+ */
+ private boolean checkPoolsHeartBeat() {
+ boolean anyPoolHasHeartBeat = false;
+ for (HAStoragePool pool : storagePools) {
+ boolean poolHasHeartBeat = pool.getPool().checkingHeartBeat(pool,
host);
+ if (reportFailureIfOneStorageIsDown && !poolHasHeartBeat) {
+ return false;
+ }
+ anyPoolHasHeartBeat = anyPoolHasHeartBeat || poolHasHeartBeat;
+ }
+ return anyPoolHasHeartBeat;
Review Comment:
Yes - with an empty pool list host would be marked Down. This is existing
behaviour and unchanged by this PR, which only fixes the result being taken
from the last pool.
--
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]