incubator-cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wid...@apache.org
Subject [30/50] [abbrv] git commit: Unnecessary INFO log cluttering up the logs. Also make logs more informative
Date Tue, 24 Jul 2012 21:20:36 GMT
Unnecessary INFO log cluttering up the logs. Also make logs more informative


Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/308cb360
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/308cb360
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/308cb360

Branch: refs/heads/rbd
Commit: 308cb36066b155eb720381cbaedeb051235938a6
Parents: 44f289e
Author: Chiradeep Vittal <chiradeep@apache.org>
Authored: Thu Jul 19 16:35:45 2012 -0700
Committer: Chiradeep Vittal <chiradeep@apache.org>
Committed: Thu Jul 19 16:35:45 2012 -0700

----------------------------------------------------------------------
 .../cloud/storage/upload/UploadMonitorImpl.java    |   18 +++++++-------
 1 files changed, 9 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/308cb360/server/src/com/cloud/storage/upload/UploadMonitorImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/storage/upload/UploadMonitorImpl.java b/server/src/com/cloud/storage/upload/UploadMonitorImpl.java
index 25ada43..891d44f 100755
--- a/server/src/com/cloud/storage/upload/UploadMonitorImpl.java
+++ b/server/src/com/cloud/storage/upload/UploadMonitorImpl.java
@@ -437,8 +437,6 @@ public class UploadMonitorImpl implements UploadMonitor {
         @Override
         public void run() {
             try {
-                s_logger.info("Extract Monitor Garbage Collection Thread is running.");
-
                 GlobalLock scanLock = GlobalLock.getInternLock("uploadmonitor.storageGC");
                 try {
                     if (scanLock.lock(3)) {
@@ -476,24 +474,26 @@ public class UploadMonitorImpl implements UploadMonitor {
             if( getTimeDiff(extractJob.getLastUpdated()) > EXTRACT_URL_LIFE_LIMIT_IN_SECONDS
){                           
                 String path = extractJob.getInstallPath();
                 HostVO secStorage = ApiDBUtils.findHostById(extractJob.getHostId());
-                s_logger.debug("Sending deletion of extract URL "+extractJob.getUploadUrl());
+                
                 // Would delete the symlink for the Type and if Type == VOLUME then also
the volume
                 DeleteEntityDownloadURLCommand cmd = new DeleteEntityDownloadURLCommand(path,
extractJob.getType(),extractJob.getUploadUrl(), secStorage.getParent());
                 HostVO ssvm = _ssvmMgr.pickSsvmHost(secStorage);
                 if( ssvm == null ) {
-                	s_logger.warn("There is no secondary storage VM for secondary storage host
" + extractJob.getHostId());
-                	continue;
+                	s_logger.warn("UploadMonitor cleanup: There is no secondary storage VM for
secondary storage host " + extractJob.getHostId());
+                	continue; //TODO: why continue? why not break?
+                }
+                if (s_logger.isDebugEnabled()) {
+                	s_logger.debug("UploadMonitor cleanup: Sending deletion of extract URL "+
extractJob.getUploadUrl() + " to ssvm " + ssvm.getId());
                 }
-                
                 try {
-	                send(ssvm.getId(), cmd, null);
+                    send(ssvm.getId(), cmd, null); //TODO: how do you know if it was successful?
                     _uploadDao.remove(extractJob.getId());
                 } catch (AgentUnavailableException e) {
-                	s_logger.warn("Unable to delete the link for " +extractJob.getType()+ "
id=" +extractJob.getTypeId()+ " url="+extractJob.getUploadUrl(), e);
+                	s_logger.warn("UploadMonitor cleanup: Unable to delete the link for " +
extractJob.getType()+ " id=" + extractJob.getTypeId()+ " url="+ extractJob.getUploadUrl()
+ " on ssvm " + ssvm.getId(), e);
                 }
             }
         }
                 
     }
-	
+
 }


Mime
View raw message