Skip to content

Commit

Permalink
Remove check that prevents clusters with mixes OS hypervisors
Browse files Browse the repository at this point in the history
  • Loading branch information
remibergsma committed Oct 20, 2021
1 parent e4ec168 commit 3970c35
Showing 1 changed file with 0 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -313,18 +313,6 @@ public HostVO createHostVOForConnectedAgent(final HostVO host, final StartupComm
throw new IllegalArgumentException("cannot add host, due to can't find cluster: " + host.getClusterId());
}

final List<HostVO> hostsInCluster = this._resourceMgr.listAllHostsInCluster(clusterVO.getId());
if (!hostsInCluster.isEmpty()) {
final HostVO oneHost = hostsInCluster.get(0);
this._hostDao.loadDetails(oneHost);
final String hostOsInCluster = oneHost.getDetail("Host.OS");
final String hostOs = ssCmd.getHostDetails().get("Host.OS");
if (!hostOsInCluster.equalsIgnoreCase(hostOs)) {
throw new IllegalArgumentException("Can't add host: " + firstCmd.getPrivateIpAddress() + " with hostOS: " + hostOs + " into a cluster," +
"in which there are " + hostOsInCluster + " hosts added");
}
}

this._hostDao.loadDetails(host);

return this._resourceMgr.fillRoutingHostVO(host, ssCmd, getHypervisorType(), host.getDetails(), null);
Expand Down

0 comments on commit 3970c35

Please sign in to comment.