mirror of https://github.com/apache/cloudstack.git
0001-Fixed-issue-with-DataStoreDrivers-not-being-able-to-
This commit is contained in:
parent
864c91ba7f
commit
02ace3442d
|
|
@ -82,4 +82,8 @@ public class ServerApiException extends CloudRuntimeException {
|
|||
_description = description;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getMessage() {
|
||||
return _description;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue