use of org.ovirt.engine.core.bll.network.host.HostPoller in project ovirt-engine by oVirt.
the class HostConnectivityChecker method check.
public boolean check(final VDS host) {
PollTechnique pollTechnique = FeatureSupported.isPing2SupportedByVdsm(host.getClusterCompatibilityVersion()) ? POLL2 : POLL;
HostPoller poller = new HostPoller(new TimeBoundPollVDSCommandParameters(host.getId(), pollTechnique));
final long startTime = System.nanoTime();
while (System.nanoTime() - startTime < VDSM_RESPONSIVENESS_PERIOD_IN_NANOS) {
if (poller.poll()) {
log.info("Engine managed to communicate with VDSM agent on host '{}' with address '{}' ('{}')", host.getName(), host.getHostName(), host.getId());
return true;
}
}
return false;
}
Aggregations