You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by gi...@git.apache.org on 2017/06/20 05:45:09 UTC

[GitHub] SudharmaJain commented on issue #2054: CLOUDSTACK-9886 : After restarting cloudstack-management , It takes time to connect hosts

SudharmaJain commented on issue #2054: CLOUDSTACK-9886 : After restarting cloudstack-management , It takes time to connect hosts
URL: https://github.com/apache/cloudstack/pull/2054#issuecomment-309650871
 
 
   @mrunalinikankariya Possibly following change in updatestate method of HostDaoImpl may fix this issue.  
   
   diff --git a/engine/schema/src/com/cloud/host/dao/HostDaoImpl.java b/engine/schema/src/com/cloud/host/dao/HostDaoImpl.java
   index a74b908..9039355 100644
   --- a/engine/schema/src/com/cloud/host/dao/HostDaoImpl.java
   +++ b/engine/schema/src/com/cloud/host/dao/HostDaoImpl.java
   @@ -979,7 +979,9 @@ public class HostDaoImpl extends GenericDaoBase<HostVO, Long> implements HostDao
                }
            }
            if (event.equals(Event.ManagementServerDown)) {
   -            ub.set(host, _pingTimeAttr, ((System.currentTimeMillis() >> 10) - (10 * 60)));
   +            float pingTimeout = NumbersUtil.parseFloat(_configDao.getValue("ping.timeout"), 2.5f);
   +            int pingInterval = NumbersUtil.parseInt(_configDao.getValue("ping.interval"), 60);
   +            ub.set(host, _pingTimeAttr, ((System.currentTimeMillis() >> 10) - (long)(pingTimeout * pingInterval)));
            }
   
 
----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services