bwsw commented on a change in pull request #2472: CLOUDSTACK-10310 Fix KVM 
reboot on storage issue
URL: https://github.com/apache/cloudstack/pull/2472#discussion_r172004532
 
 

 ##########
 File path: 
plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/KVMHAMonitor.java
 ##########
 @@ -115,22 +115,33 @@ protected void runInContext() {
                     }
 
                     String result = null;
-                    for (int i = 0; i < 5; i++) {
+                    // Try 3 times, but sleep in between tries to ensure it 
isn't a short lived transient error
+                    for (int i = 1; i <= 4; i++) {
                         Script cmd = new Script(s_heartBeatPath, 
_heartBeatUpdateTimeout, s_logger);
                         cmd.add("-i", primaryStoragePool._poolIp);
                         cmd.add("-p", primaryStoragePool._poolMountSourcePath);
                         cmd.add("-m", primaryStoragePool._mountDestPath);
                         cmd.add("-h", _hostIP);
                         result = cmd.execute();
                         if (result != null) {
-                            s_logger.warn("write heartbeat failed: " + result 
+ ", retry: " + i);
+                            s_logger.warn("write heartbeat failed: " + result 
+ ", retry: " + i + " of 4");
 
 Review comment:
   I disabled that behaviour in our 4.3 completely.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to