You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by ed...@apache.org on 2013/12/20 00:06:46 UTC

[03/10] git commit: updated refs/heads/master to 62bb5d8

0001-Fixed-issue-with-DataStoreDrivers-not-being-able-to-


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

Branch: refs/heads/master
Commit: 02ace3442db96c78da53bd79d544b1ab511f2a29
Parents: 864c91b
Author: edison su <su...@gmail.com>
Authored: Tue Dec 3 13:12:36 2013 -0800
Committer: Edison Su <su...@gmail.com>
Committed: Thu Dec 19 13:35:21 2013 -0800

----------------------------------------------------------------------
 .../apache/cloudstack/api/ServerApiException.java  |  4 ++++
 .../src/com/cloud/storage/StorageManagerImpl.java  | 17 ++++++++---------
 2 files changed, 12 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/02ace344/api/src/org/apache/cloudstack/api/ServerApiException.java
----------------------------------------------------------------------
diff --git a/api/src/org/apache/cloudstack/api/ServerApiException.java b/api/src/org/apache/cloudstack/api/ServerApiException.java
index 81184e3..a8bb2ed 100644
--- a/api/src/org/apache/cloudstack/api/ServerApiException.java
+++ b/api/src/org/apache/cloudstack/api/ServerApiException.java
@@ -82,4 +82,8 @@ public class ServerApiException extends CloudRuntimeException {
         _description = description;
     }
 
+    @Override
+    public String getMessage() {
+        return _description;
+    }
 }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/02ace344/server/src/com/cloud/storage/StorageManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/storage/StorageManagerImpl.java b/server/src/com/cloud/storage/StorageManagerImpl.java
index 831fac8..c7503b9 100755
--- a/server/src/com/cloud/storage/StorageManagerImpl.java
+++ b/server/src/com/cloud/storage/StorageManagerImpl.java
@@ -41,9 +41,6 @@ import javax.ejb.Local;
 import javax.inject.Inject;
 import javax.naming.ConfigurationException;
 
-import org.apache.log4j.Logger;
-import org.springframework.stereotype.Component;
-
 import org.apache.cloudstack.api.command.admin.storage.AddImageStoreCmd;
 import org.apache.cloudstack.api.command.admin.storage.CancelPrimaryStorageMaintenanceCmd;
 import org.apache.cloudstack.api.command.admin.storage.CreateSecondaryStagingStoreCmd;
@@ -87,6 +84,8 @@ import org.apache.cloudstack.storage.datastore.db.TemplateDataStoreDao;
 import org.apache.cloudstack.storage.datastore.db.TemplateDataStoreVO;
 import org.apache.cloudstack.storage.datastore.db.VolumeDataStoreDao;
 import org.apache.cloudstack.storage.datastore.db.VolumeDataStoreVO;
+import org.apache.log4j.Logger;
+import org.springframework.stereotype.Component;
 
 import com.cloud.agent.AgentManager;
 import com.cloud.agent.api.Answer;
@@ -658,12 +657,12 @@ public class StorageManagerImpl extends ManagerBase implements StorageManager, C
                 lifeCycle.attachZone(store, zoneScope, hypervisorType);
             }
         } catch (Exception e) {
-            s_logger.debug("Failed to add data store", e);
+            s_logger.debug("Failed to add data store: "+e.getMessage(), e);
             // clean up the db
             if (store != null) {
                 lifeCycle.deleteDataStore(store);
             }
-            throw new CloudRuntimeException("Failed to add data store", e);
+            throw new CloudRuntimeException("Failed to add data store: "+e.getMessage(), e);
         }
 
         return (PrimaryDataStoreInfo)dataStoreMgr.getDataStore(store.getId(), DataStoreRole.Primary);
@@ -1698,8 +1697,8 @@ public class StorageManagerImpl extends ManagerBase implements StorageManager, C
         try {
             store = lifeCycle.initialize(params);
         } catch (Exception e) {
-            s_logger.debug("Failed to add data store", e);
-            throw new CloudRuntimeException("Failed to add data store", e);
+            s_logger.debug("Failed to add data store: "+e.getMessage(), e);
+            throw new CloudRuntimeException("Failed to add data store: "+e.getMessage(), e);
         }
 
         if (((ImageStoreProvider)storeProvider).needDownloadSysTemplate()) {
@@ -1862,8 +1861,8 @@ public class StorageManagerImpl extends ManagerBase implements StorageManager, C
         try {
             store = lifeCycle.initialize(params);
         } catch (Exception e) {
-            s_logger.debug("Failed to add data store", e);
-            throw new CloudRuntimeException("Failed to add data store", e);
+            s_logger.debug("Failed to add data store: "+e.getMessage(), e);
+            throw new CloudRuntimeException("Failed to add data store: "+e.getMessage(), e);
         }
 
         return (ImageStore)_dataStoreMgr.getDataStore(store.getId(), DataStoreRole.ImageCache);