You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ni...@apache.org on 2014/06/03 02:55:26 UTC

git commit: updated refs/heads/master to 8b6dc7c

Repository: cloudstack
Updated Branches:
  refs/heads/master eb8e630f2 -> 8b6dc7ce2


CLOUDSTACK-6824: In case there is a failure to delete the soft link of a download url, dont bail out since there can be cases such as destroy ssvm where the soft links do not exist any more.
(cherry picked from commit 73330167228d14ea8494c9c1893627b6936626a7)


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

Branch: refs/heads/master
Commit: 8b6dc7ce2f0058b9cf29bd9c72e4e0db9162fe6e
Parents: eb8e630
Author: Nitin Mehta <ni...@citrix.com>
Authored: Mon Jun 2 17:52:37 2014 -0700
Committer: Nitin Mehta <ni...@citrix.com>
Committed: Mon Jun 2 17:55:09 2014 -0700

----------------------------------------------------------------------
 .../cloudstack/storage/template/UploadManagerImpl.java       | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/8b6dc7ce/services/secondary-storage/server/src/org/apache/cloudstack/storage/template/UploadManagerImpl.java
----------------------------------------------------------------------
diff --git a/services/secondary-storage/server/src/org/apache/cloudstack/storage/template/UploadManagerImpl.java b/services/secondary-storage/server/src/org/apache/cloudstack/storage/template/UploadManagerImpl.java
index d046eb9..a8ed9a8 100755
--- a/services/secondary-storage/server/src/org/apache/cloudstack/storage/template/UploadManagerImpl.java
+++ b/services/secondary-storage/server/src/org/apache/cloudstack/storage/template/UploadManagerImpl.java
@@ -316,9 +316,9 @@ public class UploadManagerImpl extends ManagerBase implements UploadManager {
         command.add("unlink /var/www/html/userdata/" + extractUrl.substring(extractUrl.lastIndexOf(File.separator) + 1));
         String result = command.execute();
         if (result != null) {
-            String errorString = "Error in deleting =" + result;
-            s_logger.warn(errorString);
-            return new Answer(cmd, false, errorString);
+            // FIXME - Ideally should bail out if you cant delete symlink. Not doing it right now.
+            // This is because the ssvm might already be destroyed and the symlinks do not exist.
+            s_logger.warn("Error in deleting symlink :" + result);
         }
 
         // If its a volume also delete the Hard link since it was created only for the purpose of download.
@@ -329,7 +329,7 @@ public class UploadManagerImpl extends ManagerBase implements UploadManager {
             s_logger.warn(" " + parentDir + File.separator + path);
             result = command.execute();
             if (result != null) {
-                String errorString = "Error in linking  err=" + result;
+                String errorString = "Error in deleting volume " + path + " : " + result;
                 s_logger.warn(errorString);
                 return new Answer(cmd, false, errorString);
             }