Skip to content

Commit 348a63d

Browse files
Marcus SorensenMarcus Sorensen
andauthored
LibvirtServerDiscoverer should only process added KVM hosts (#7979)
Don't use LibvirtServerDiscoverer's processHostAdded() in CustomServerDiscoverer Signed-off-by: Marcus Sorensen <mls@apple.com> Co-authored-by: Marcus Sorensen <mls@apple.com>
1 parent b205548 commit 348a63d

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

server/src/main/java/com/cloud/hypervisor/discoverer/CustomServerDiscoverer.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,9 @@ public Hypervisor.HypervisorType getHypervisorType() {
2929
protected String getPatchPath() {
3030
return "scripts/vm/hypervisor/kvm/";
3131
}
32+
33+
@Override
34+
public void processHostAdded(long hostId) {
35+
// Not using super class implementation here.
36+
}
3237
}

server/src/main/java/com/cloud/hypervisor/kvm/discoverer/LibvirtServerDiscoverer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ public AgentControlAnswer processControlCommand(long agentId, AgentControlComman
110110
@Override
111111
public void processHostAdded(long hostId) {
112112
HostVO host = hostDao.findById(hostId);
113-
if (host != null) {
113+
if (host != null && getHypervisorType().equals(host.getHypervisorType())) {
114114
directDownloadManager.syncCertificatesToHost(hostId, host.getDataCenterId());
115115
}
116116
}

0 commit comments

Comments
 (0)