cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [cloudstack] anuragaw commented on a change in pull request #3425: [WIP DO NOT MERGE] Better tracking host maintanence success and failure
Date Mon, 25 Nov 2019 08:07:49 GMT
anuragaw commented on a change in pull request #3425: [WIP DO NOT MERGE] Better tracking host
maintanence success and failure
URL: https://github.com/apache/cloudstack/pull/3425#discussion_r350033135
 
 

 ##########
 File path: server/src/main/java/com/cloud/ha/HighAvailabilityManagerImpl.java
 ##########
 @@ -1004,4 +1031,15 @@ public boolean hasPendingHaWork(long vmId) {
         List<HaWorkVO> haWorks = _haDao.listPendingHaWorkForVm(vmId);
         return haWorks.size() > 0;
     }
+
+    @Override
+    public boolean hasPendingMigrationsWork(long vmId) {
+        List<HaWorkVO> haWorks = _haDao.listPendingMigrationsForVm(vmId);
+        for (HaWorkVO work : haWorks) {
+            if (work.getTimesTried() < _maxRetries) {
 
 Review comment:
   We start at 0 and increment on each failure by 1. So if work.getTimesTried() == maxRetries
then it should be ideally never be returned here as _haDao internally filters out all items
in Done, Canceled, Error state. I've added a warning in else here so that we know about any
possible cases which don't get updated to Done, Canceled, Error state.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message