More logging to agent timer scan

Reviewed-by: Prachi
This commit is contained in:
Alena Prokharchyk 2012-08-29 11:18:16 -07:00
parent da23e9de67
commit 9a76ceda52
2 changed files with 5 additions and 0 deletions

View File

@ -754,7 +754,9 @@ public class AgentManagerImpl implements AgentManager, HandlerFactory, Manager {
s_logger.info("Could not to find a Discoverer to load the resource: "+ host.getId() +" for hypervisor type: "+host.getHypervisorType());
resource = loadResourcesWithoutHypervisor(host);
}else{
s_logger.debug("Reloading resource " + host);
resource = discoverer.reloadResource(host);
s_logger.debug("Reloaded resource " + host);
}
if(resource == null){

View File

@ -139,15 +139,18 @@ public abstract class DiscovererBase implements Discoverer {
@Override
public ServerResource reloadResource(HostVO host) {
String resourceName = host.getResource();
s_logger.debug("Reloading resource " + resourceName + " for host " + host);
ServerResource resource = getResource(resourceName);
if(resource != null){
_hostDao.loadDetails(host);
updateNetworkLabels(host);
s_logger.debug("Updated network labels for host " + host);
HashMap<String, Object> params = buildConfigParams(host);
try {
resource.configure(host.getName(), params);
s_logger.debug("Configured resource " + resourceName);
} catch (ConfigurationException e) {
s_logger.warn("Unable to configure resource due to " + e.getMessage());
return null;