LibvirtServerDiscoverer should only process added KVM hosts (#324)

Don't use LibvirtServerDiscoverer's processHostAdded() in CustomServerDiscoverer

(cherry picked from commit ba0dfea6fd469063d6a154d2056f250feed84f10)
Signed-off-by: Rohit Yadav <rohit.yadav@shapeblue.com>
This commit is contained in:
Marcus Sorensen 2023-09-22 08:58:45 -06:00 committed by Rohit Yadav
parent 7ed872c1d6
commit d083df504d
2 changed files with 6 additions and 1 deletions

View File

@ -29,4 +29,9 @@ public class CustomServerDiscoverer extends LibvirtServerDiscoverer {
protected String getPatchPath() {
return "scripts/vm/hypervisor/kvm/";
}
@Override
public void processHostAdded(long hostId) {
// Not using super class implementation here.
}
}

View File

@ -110,7 +110,7 @@ public abstract class LibvirtServerDiscoverer extends DiscovererBase implements
@Override
public void processHostAdded(long hostId) {
HostVO host = hostDao.findById(hostId);
if (host != null) {
if (host != null && getHypervisorType().equals(host.getHypervisorType())) {
directDownloadManager.syncCertificatesToHost(hostId, host.getDataCenterId());
}
}