Bug 11430 - add host > Host Tags field missing from DB + UI even when host tags specified in add host 2.2.y -> 2.2.12 KVM

Changes:

A KVM agent always connects to the management server itself, we dont have to do direct connect. This part of code was missing updating the DB host entry with hosttags.
Corrected the code to save the hosttags while adding a KVM host.
This commit is contained in:
prachi 2011-09-14 10:26:44 -07:00
parent 78a5b651ac
commit ea97ce2a93

View File

@ -569,6 +569,12 @@ public class ResourceManagerImpl implements ResourceManager, ResourceService, Ma
List<HostVO> kvmHosts = _hostDao.listBy(Host.Type.Routing, clusterId, podId, dcId);
for (HostVO host : kvmHosts) {
if (host.getGuid().equalsIgnoreCase(guid)) {
if(hostTags != null){
if(s_logger.isTraceEnabled()){
s_logger.trace("Adding Host Tags for KVM host, tags: :"+hostTags);
}
_hostTagsDao.persist(host.getId(), hostTags);
}
hosts.add(host);
return hosts;
}