From ea97ce2a93928b167b247b09e39c60c8148b2fa8 Mon Sep 17 00:00:00 2001 From: prachi Date: Wed, 14 Sep 2011 10:26:44 -0700 Subject: [PATCH] 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. --- server/src/com/cloud/resource/ResourceManagerImpl.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/server/src/com/cloud/resource/ResourceManagerImpl.java b/server/src/com/cloud/resource/ResourceManagerImpl.java index 76d38dd471d..64dd5e1a924 100755 --- a/server/src/com/cloud/resource/ResourceManagerImpl.java +++ b/server/src/com/cloud/resource/ResourceManagerImpl.java @@ -569,6 +569,12 @@ public class ResourceManagerImpl implements ResourceManager, ResourceService, Ma List 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; }