cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mc...@apache.org
Subject git commit: updated refs/heads/object_store to 792fc47
Date Wed, 24 Apr 2013 18:12:34 GMT
Updated Branches:
  refs/heads/object_store 0cfef3aa4 -> 792fc471a


Remove VolumeHostDao references from codebase.

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

Branch: refs/heads/object_store
Commit: 792fc471a20b9378555e984d977070edd0d45e14
Parents: 0cfef3a
Author: Min Chen <min.chen@citrix.com>
Authored: Wed Apr 24 11:11:58 2013 -0700
Committer: Min Chen <min.chen@citrix.com>
Committed: Wed Apr 24 11:11:58 2013 -0700

----------------------------------------------------------------------
 .../storage/motion/AncientDataMotionStrategy.java  |   27 +--
 .../driver/CloudStackImageStoreDriverImpl.java     |   29 ++--
 .../datastore/driver/S3ImageStoreDriverImpl.java   |   26 ++-
 .../driver/SwiftImageStoreDriverImpl.java          |   27 ++-
 server/src/com/cloud/api/ApiDBUtils.java           |    7 -
 .../src/com/cloud/storage/StorageManagerImpl.java  |  155 +++++----------
 .../src/com/cloud/storage/VolumeManagerImpl.java   |   19 +-
 .../storage/download/DownloadMonitorImpl.java      |    4 +-
 server/src/com/cloud/vm/UserVmManagerImpl.java     |    2 -
 9 files changed, 114 insertions(+), 182 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/792fc471/engine/storage/datamotion/src/org/apache/cloudstack/storage/motion/AncientDataMotionStrategy.java
----------------------------------------------------------------------
diff --git a/engine/storage/datamotion/src/org/apache/cloudstack/storage/motion/AncientDataMotionStrategy.java
b/engine/storage/datamotion/src/org/apache/cloudstack/storage/motion/AncientDataMotionStrategy.java
index 826a3c7..affe030 100644
--- a/engine/storage/datamotion/src/org/apache/cloudstack/storage/motion/AncientDataMotionStrategy.java
+++ b/engine/storage/datamotion/src/org/apache/cloudstack/storage/motion/AncientDataMotionStrategy.java
@@ -41,6 +41,8 @@ import org.apache.cloudstack.storage.datastore.db.PrimaryDataStoreDao;
 import org.apache.cloudstack.storage.datastore.db.StoragePoolVO;
 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;
 
@@ -55,13 +57,8 @@ import com.cloud.agent.api.CreateVolumeFromSnapshotCommand;
 import com.cloud.agent.api.UpgradeSnapshotCommand;
 import com.cloud.agent.api.storage.CopyVolumeAnswer;
 import com.cloud.agent.api.storage.CopyVolumeCommand;
-import com.cloud.agent.api.storage.CreateAnswer;
-import com.cloud.agent.api.storage.CreateCommand;
 import com.cloud.agent.api.storage.CreatePrivateTemplateAnswer;
-import com.cloud.agent.api.storage.PrimaryStorageDownloadAnswer;
-import com.cloud.agent.api.storage.PrimaryStorageDownloadCommand;
 import com.cloud.agent.api.to.S3TO;
-import com.cloud.agent.api.to.StorageFilerTO;
 import com.cloud.agent.api.to.SwiftTO;
 import com.cloud.configuration.Config;
 import com.cloud.configuration.dao.ConfigurationDao;
@@ -69,25 +66,19 @@ import com.cloud.exception.StorageUnavailableException;
 import com.cloud.host.HostVO;
 import com.cloud.host.dao.HostDao;
 import com.cloud.storage.DataStoreRole;
-import com.cloud.storage.DiskOfferingVO;
 import com.cloud.storage.SnapshotVO;
 import com.cloud.storage.Storage.ImageFormat;
 import com.cloud.storage.StorageManager;
 import com.cloud.storage.StoragePool;
-import com.cloud.storage.VMTemplateHostVO;
-import com.cloud.storage.VMTemplateStoragePoolVO;
 import com.cloud.storage.VMTemplateStorageResourceAssoc.Status;
 import com.cloud.storage.VMTemplateVO;
-import com.cloud.storage.VolumeHostVO;
 import com.cloud.storage.VolumeManager;
 import com.cloud.storage.VolumeVO;
 import com.cloud.storage.dao.DiskOfferingDao;
 import com.cloud.storage.dao.SnapshotDao;
 import com.cloud.storage.dao.VMTemplateDao;
-import com.cloud.storage.dao.VMTemplateHostDao;
 import com.cloud.storage.dao.VMTemplatePoolDao;
 import com.cloud.storage.dao.VolumeDao;
-import com.cloud.storage.dao.VolumeHostDao;
 import com.cloud.storage.s3.S3Manager;
 import com.cloud.storage.snapshot.SnapshotManager;
 import com.cloud.storage.swift.SwiftManager;
@@ -96,7 +87,6 @@ import com.cloud.utils.NumbersUtil;
 import com.cloud.utils.db.DB;
 import com.cloud.utils.db.Transaction;
 import com.cloud.utils.exception.CloudRuntimeException;
-import com.cloud.vm.DiskProfile;
 
 @Component
 public class AncientDataMotionStrategy implements DataMotionStrategy {
@@ -107,7 +97,7 @@ public class AncientDataMotionStrategy implements DataMotionStrategy {
     @Inject
     TemplateManager templateMgr;
     @Inject
-    VolumeHostDao volumeHostDao;
+    VolumeDataStoreDao volumeStoreDao;
     @Inject
     HostDao hostDao;
     @Inject
@@ -151,15 +141,14 @@ public class AncientDataMotionStrategy implements DataMotionStrategy
{
         int _copyvolumewait = NumbersUtil.parseInt(value,
                 Integer.parseInt(Config.CopyVolumeWait.getDefaultValue()));
 
-        VolumeHostVO volumeHostVO = volumeHostDao.findByVolumeId(srcData
+        VolumeDataStoreVO volumeStoreVO = volumeStoreDao.findByVolume(srcData
                 .getId());
-        HostVO secStorage = hostDao.findById(volumeHostVO.getHostId());
-        String secondaryStorageURL = secStorage.getStorageUrl();
-        String[] volumePath = volumeHostVO.getInstallPath().split("/");
+        DataStore srcStore = srcData.getDataStore();
+        String[] volumePath = volumeStoreVO.getInstallPath().split("/");
         String volumeUUID = volumePath[volumePath.length - 1].split("\\.")[0];
         StoragePool destPool = (StoragePool) destData.getDataStore();
         CopyVolumeCommand cvCmd = new CopyVolumeCommand(srcData.getId(),
-                volumeUUID, destPool, secondaryStorageURL, false,
+                volumeUUID, destPool, srcStore.getUri(), false,
                 _copyvolumewait);
         CopyVolumeAnswer cvAnswer = null;
         String errMsg = null;
@@ -186,7 +175,7 @@ public class AncientDataMotionStrategy implements DataMotionStrategy {
         vol.setPodId(destPool.getPodId());
 
         this.volDao.update(vol.getId(), vol);
-        volumeHostDao.remove(volumeHostVO.getId());
+        volumeStoreDao.remove(volumeStoreVO.getId());
         txn.commit();
         return cvAnswer;
     }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/792fc471/plugins/storage/image/default/src/org/apache/cloudstack/storage/datastore/driver/CloudStackImageStoreDriverImpl.java
----------------------------------------------------------------------
diff --git a/plugins/storage/image/default/src/org/apache/cloudstack/storage/datastore/driver/CloudStackImageStoreDriverImpl.java
b/plugins/storage/image/default/src/org/apache/cloudstack/storage/datastore/driver/CloudStackImageStoreDriverImpl.java
index aca8afc..4f8096c 100644
--- a/plugins/storage/image/default/src/org/apache/cloudstack/storage/datastore/driver/CloudStackImageStoreDriverImpl.java
+++ b/plugins/storage/image/default/src/org/apache/cloudstack/storage/datastore/driver/CloudStackImageStoreDriverImpl.java
@@ -30,6 +30,7 @@ import org.apache.cloudstack.engine.subsystem.api.storage.CreateCmdResult;
 import org.apache.cloudstack.engine.subsystem.api.storage.DataObject;
 import org.apache.cloudstack.engine.subsystem.api.storage.DataObjectType;
 import org.apache.cloudstack.engine.subsystem.api.storage.DataStore;
+import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreManager;
 import org.apache.cloudstack.engine.subsystem.api.storage.DataTO;
 import org.apache.cloudstack.engine.subsystem.api.storage.EndPoint;
 import org.apache.cloudstack.engine.subsystem.api.storage.EndPointSelector;
@@ -38,6 +39,8 @@ import org.apache.cloudstack.framework.async.AsyncCompletionCallback;
 import org.apache.cloudstack.framework.async.AsyncRpcConext;
 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.cloudstack.storage.image.ImageStoreDriver;
 import org.apache.cloudstack.storage.image.store.ImageStoreImpl;
 import org.apache.cloudstack.storage.image.store.TemplateObject;
@@ -56,7 +59,6 @@ import com.cloud.agent.api.to.S3TO;
 import com.cloud.agent.api.to.SwiftTO;
 import com.cloud.event.EventTypes;
 import com.cloud.event.UsageEventUtils;
-import com.cloud.host.HostVO;
 import com.cloud.host.dao.HostDao;
 import com.cloud.storage.DataStoreRole;
 import com.cloud.storage.RegisterVolumePayload;
@@ -65,13 +67,11 @@ import com.cloud.storage.SnapshotVO;
 import com.cloud.storage.VMTemplateStorageResourceAssoc;
 import com.cloud.storage.VMTemplateVO;
 import com.cloud.storage.VMTemplateZoneVO;
-import com.cloud.storage.VolumeHostVO;
 import com.cloud.storage.VolumeVO;
 import com.cloud.storage.dao.SnapshotDao;
 import com.cloud.storage.dao.VMTemplateDao;
 import com.cloud.storage.dao.VMTemplateZoneDao;
 import com.cloud.storage.dao.VolumeDao;
-import com.cloud.storage.dao.VolumeHostDao;
 import com.cloud.storage.download.DownloadMonitor;
 import com.cloud.storage.s3.S3Manager;
 import com.cloud.storage.secondary.SecondaryStorageVmManager;
@@ -92,7 +92,7 @@ public class CloudStackImageStoreDriverImpl implements ImageStoreDriver
{
     VMTemplateDao templateDao;
     @Inject DownloadMonitor _downloadMonitor;
     @Inject VolumeDao volumeDao;
-    @Inject VolumeHostDao volumeHostDao;
+    @Inject VolumeDataStoreDao _volumeStoreDao;
     @Inject HostDao hostDao;
     @Inject SnapshotDao snapshotDao;
     @Inject AgentManager agentMgr;
@@ -109,6 +109,7 @@ public class CloudStackImageStoreDriverImpl implements ImageStoreDriver
{
     private AgentManager _agentMgr;
     @Inject TemplateDataStoreDao _templateStoreDao;
     @Inject EndPointSelector _epSelector;
+    @Inject DataStoreManager _dataStoreMgr;
 
 
     @Override
@@ -223,35 +224,35 @@ public class CloudStackImageStoreDriverImpl implements ImageStoreDriver
{
     }
 
     private void deleteVolume(DataObject data, AsyncCompletionCallback<CommandResult>
callback) {
-        // TODO Auto-generated method stub
         VolumeVO vol = volumeDao.findById(data.getId());
         if (s_logger.isDebugEnabled()) {
             s_logger.debug("Expunging " + vol);
         }
 
         // Find out if the volume is present on secondary storage
-        VolumeHostVO volumeHost = volumeHostDao.findByVolumeId(vol.getId());
-        if (volumeHost != null) {
-            if (volumeHost.getDownloadState() == VMTemplateStorageResourceAssoc.Status.DOWNLOADED)
{
-                HostVO ssHost = hostDao.findById(volumeHost.getHostId());
+        VolumeDataStoreVO volumeStore = _volumeStoreDao.findByVolume(vol.getId());
+        if (volumeStore != null) {
+            if (volumeStore.getDownloadState() == VMTemplateStorageResourceAssoc.Status.DOWNLOADED)
{
+                DataStore store = this._dataStoreMgr.getDataStore(volumeStore.getDataStoreId(),
DataStoreRole.Image);
+                EndPoint ep = _epSelector.select(store);
                 DeleteVolumeCommand dtCommand = new DeleteVolumeCommand(
-                        ssHost.getStorageUrl(), volumeHost.getInstallPath());
-                Answer answer = agentMgr.sendToSecStorage(ssHost, dtCommand);
+                        store.getUri(), volumeStore.getInstallPath());
+                Answer answer = ep.sendMessage(dtCommand);
                 if (answer == null || !answer.getResult()) {
                     s_logger.debug("Failed to delete "
-                            + volumeHost
+                            + volumeStore
                             + " due to "
                             + ((answer == null) ? "answer is null" : answer
                                     .getDetails()));
                     return;
                 }
-            } else if (volumeHost.getDownloadState() == VMTemplateStorageResourceAssoc.Status.DOWNLOAD_IN_PROGRESS)
{
+            } else if (volumeStore.getDownloadState() == VMTemplateStorageResourceAssoc.Status.DOWNLOAD_IN_PROGRESS)
{
                 s_logger.debug("Volume: " + vol.getName()
                         + " is currently being uploaded; cant' delete it.");
                 throw new CloudRuntimeException(
                         "Please specify a volume that is not currently being uploaded.");
             }
-            volumeHostDao.remove(volumeHost.getId());
+            _volumeStoreDao.remove(volumeStore.getId());
             volumeDao.remove(vol.getId());
             CommandResult result = new CommandResult();
             callback.complete(result);

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/792fc471/plugins/storage/image/s3/src/org/apache/cloudstack/storage/datastore/driver/S3ImageStoreDriverImpl.java
----------------------------------------------------------------------
diff --git a/plugins/storage/image/s3/src/org/apache/cloudstack/storage/datastore/driver/S3ImageStoreDriverImpl.java
b/plugins/storage/image/s3/src/org/apache/cloudstack/storage/datastore/driver/S3ImageStoreDriverImpl.java
index c7d2475..3bbbb70 100644
--- a/plugins/storage/image/s3/src/org/apache/cloudstack/storage/datastore/driver/S3ImageStoreDriverImpl.java
+++ b/plugins/storage/image/s3/src/org/apache/cloudstack/storage/datastore/driver/S3ImageStoreDriverImpl.java
@@ -31,6 +31,7 @@ import org.apache.cloudstack.engine.subsystem.api.storage.CreateCmdResult;
 import org.apache.cloudstack.engine.subsystem.api.storage.DataObject;
 import org.apache.cloudstack.engine.subsystem.api.storage.DataObjectType;
 import org.apache.cloudstack.engine.subsystem.api.storage.DataStore;
+import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreManager;
 import org.apache.cloudstack.engine.subsystem.api.storage.DataTO;
 import org.apache.cloudstack.engine.subsystem.api.storage.EndPoint;
 import org.apache.cloudstack.engine.subsystem.api.storage.EndPointSelector;
@@ -39,6 +40,8 @@ import org.apache.cloudstack.framework.async.AsyncRpcConext;
 import org.apache.cloudstack.storage.datastore.db.ImageStoreDetailsDao;
 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.cloudstack.storage.image.ImageStoreDriver;
 import org.apache.cloudstack.storage.image.store.ImageStoreImpl;
 import org.apache.cloudstack.storage.image.store.TemplateObject;
@@ -59,6 +62,7 @@ import com.cloud.host.HostVO;
 import com.cloud.host.dao.HostDao;
 import com.cloud.storage.RegisterVolumePayload;
 import com.cloud.storage.Storage.ImageFormat;
+import com.cloud.storage.DataStoreRole;
 import com.cloud.storage.SnapshotVO;
 import com.cloud.storage.VMTemplateStorageResourceAssoc;
 import com.cloud.storage.VMTemplateVO;
@@ -92,7 +96,7 @@ public class S3ImageStoreDriverImpl implements ImageStoreDriver {
     @Inject
     ImageStoreDetailsDao _imageStoreDetailsDao;
     @Inject VolumeDao volumeDao;
-    @Inject VolumeHostDao volumeHostDao;
+    @Inject VolumeDataStoreDao _volumeStoreDao;
     @Inject HostDao hostDao;
     @Inject SnapshotDao snapshotDao;
     @Inject AgentManager agentMgr;
@@ -109,6 +113,7 @@ public class S3ImageStoreDriverImpl implements ImageStoreDriver {
     private AgentManager _agentMgr;
     @Inject TemplateDataStoreDao _templateStoreDao;
     @Inject EndPointSelector _epSelector;
+    @Inject DataStoreManager _dataStoreMgr;
 
     @Override
     public String grantAccess(DataObject data, EndPoint ep) {
@@ -183,28 +188,29 @@ public class S3ImageStoreDriverImpl implements ImageStoreDriver {
         }
 
         // Find out if the volume is present on secondary storage
-        VolumeHostVO volumeHost = volumeHostDao.findByVolumeId(vol.getId());
-        if (volumeHost != null) {
-            if (volumeHost.getDownloadState() == VMTemplateStorageResourceAssoc.Status.DOWNLOADED)
{
-                HostVO ssHost = hostDao.findById(volumeHost.getHostId());
+        VolumeDataStoreVO volumeStore = _volumeStoreDao.findByVolume(vol.getId());
+        if (volumeStore != null) {
+            if (volumeStore.getDownloadState() == VMTemplateStorageResourceAssoc.Status.DOWNLOADED)
{
+                DataStore store = this._dataStoreMgr.getDataStore(volumeStore.getDataStoreId(),
DataStoreRole.Image);
+                EndPoint ep = _epSelector.select(store);
                 DeleteVolumeCommand dtCommand = new DeleteVolumeCommand(
-                        ssHost.getStorageUrl(), volumeHost.getInstallPath());
-                Answer answer = agentMgr.sendToSecStorage(ssHost, dtCommand);
+                        store.getUri(), volumeStore.getInstallPath());
+                Answer answer = ep.sendMessage(dtCommand);
                 if (answer == null || !answer.getResult()) {
                     s_logger.debug("Failed to delete "
-                            + volumeHost
+                            + volumeStore
                             + " due to "
                             + ((answer == null) ? "answer is null" : answer
                                     .getDetails()));
                     return;
                 }
-            } else if (volumeHost.getDownloadState() == VMTemplateStorageResourceAssoc.Status.DOWNLOAD_IN_PROGRESS)
{
+            } else if (volumeStore.getDownloadState() == VMTemplateStorageResourceAssoc.Status.DOWNLOAD_IN_PROGRESS)
{
                 s_logger.debug("Volume: " + vol.getName()
                         + " is currently being uploaded; cant' delete it.");
                 throw new CloudRuntimeException(
                         "Please specify a volume that is not currently being uploaded.");
             }
-            volumeHostDao.remove(volumeHost.getId());
+            _volumeStoreDao.remove(volumeStore.getId());
             volumeDao.remove(vol.getId());
             CommandResult result = new CommandResult();
             callback.complete(result);

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/792fc471/plugins/storage/image/swift/src/org/apache/cloudstack/storage/datastore/driver/SwiftImageStoreDriverImpl.java
----------------------------------------------------------------------
diff --git a/plugins/storage/image/swift/src/org/apache/cloudstack/storage/datastore/driver/SwiftImageStoreDriverImpl.java
b/plugins/storage/image/swift/src/org/apache/cloudstack/storage/datastore/driver/SwiftImageStoreDriverImpl.java
index 4c664d9..9ec73e6 100644
--- a/plugins/storage/image/swift/src/org/apache/cloudstack/storage/datastore/driver/SwiftImageStoreDriverImpl.java
+++ b/plugins/storage/image/swift/src/org/apache/cloudstack/storage/datastore/driver/SwiftImageStoreDriverImpl.java
@@ -31,6 +31,7 @@ import org.apache.cloudstack.engine.subsystem.api.storage.CreateCmdResult;
 import org.apache.cloudstack.engine.subsystem.api.storage.DataObject;
 import org.apache.cloudstack.engine.subsystem.api.storage.DataObjectType;
 import org.apache.cloudstack.engine.subsystem.api.storage.DataStore;
+import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreManager;
 import org.apache.cloudstack.engine.subsystem.api.storage.DataTO;
 import org.apache.cloudstack.engine.subsystem.api.storage.EndPoint;
 import org.apache.cloudstack.engine.subsystem.api.storage.EndPointSelector;
@@ -39,6 +40,8 @@ import org.apache.cloudstack.framework.async.AsyncRpcConext;
 import org.apache.cloudstack.storage.datastore.db.ImageStoreDetailsDao;
 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.cloudstack.storage.image.ImageStoreDriver;
 import org.apache.cloudstack.storage.image.store.ImageStoreImpl;
 import org.apache.cloudstack.storage.image.store.TemplateObject;
@@ -59,6 +62,7 @@ import com.cloud.host.HostVO;
 import com.cloud.host.dao.HostDao;
 import com.cloud.storage.RegisterVolumePayload;
 import com.cloud.storage.Storage.ImageFormat;
+import com.cloud.storage.DataStoreRole;
 import com.cloud.storage.SnapshotVO;
 import com.cloud.storage.VMTemplateStorageResourceAssoc;
 import com.cloud.storage.VMTemplateVO;
@@ -92,7 +96,7 @@ public class SwiftImageStoreDriverImpl implements ImageStoreDriver {
     @Inject
     ImageStoreDetailsDao _imageStoreDetailsDao;
     @Inject VolumeDao volumeDao;
-    @Inject VolumeHostDao volumeHostDao;
+    @Inject VolumeDataStoreDao _volumeStoreDao;
     @Inject HostDao hostDao;
     @Inject SnapshotDao snapshotDao;
     @Inject AgentManager agentMgr;
@@ -109,6 +113,8 @@ public class SwiftImageStoreDriverImpl implements ImageStoreDriver {
     private AgentManager _agentMgr;
     @Inject TemplateDataStoreDao _templateStoreDao;
     @Inject EndPointSelector _epSelector;
+    @Inject DataStoreManager _dataStoreMgr;
+
 
     @Override
     public String grantAccess(DataObject data, EndPoint ep) {
@@ -176,28 +182,29 @@ public class SwiftImageStoreDriverImpl implements ImageStoreDriver {
         }
 
         // Find out if the volume is present on secondary storage
-        VolumeHostVO volumeHost = volumeHostDao.findByVolumeId(vol.getId());
-        if (volumeHost != null) {
-            if (volumeHost.getDownloadState() == VMTemplateStorageResourceAssoc.Status.DOWNLOADED)
{
-                HostVO ssHost = hostDao.findById(volumeHost.getHostId());
+        VolumeDataStoreVO volumeStore = _volumeStoreDao.findByVolume(vol.getId());
+        if (volumeStore != null) {
+            if (volumeStore.getDownloadState() == VMTemplateStorageResourceAssoc.Status.DOWNLOADED)
{
+                DataStore store = this._dataStoreMgr.getDataStore(volumeStore.getDataStoreId(),
DataStoreRole.Image);
+                EndPoint ep = _epSelector.select(store);
                 DeleteVolumeCommand dtCommand = new DeleteVolumeCommand(
-                        ssHost.getStorageUrl(), volumeHost.getInstallPath());
-                Answer answer = agentMgr.sendToSecStorage(ssHost, dtCommand);
+                        store.getUri(), volumeStore.getInstallPath());
+                Answer answer = ep.sendMessage(dtCommand);
                 if (answer == null || !answer.getResult()) {
                     s_logger.debug("Failed to delete "
-                            + volumeHost
+                            + volumeStore
                             + " due to "
                             + ((answer == null) ? "answer is null" : answer
                                     .getDetails()));
                     return;
                 }
-            } else if (volumeHost.getDownloadState() == VMTemplateStorageResourceAssoc.Status.DOWNLOAD_IN_PROGRESS)
{
+            } else if (volumeStore.getDownloadState() == VMTemplateStorageResourceAssoc.Status.DOWNLOAD_IN_PROGRESS)
{
                 s_logger.debug("Volume: " + vol.getName()
                         + " is currently being uploaded; cant' delete it.");
                 throw new CloudRuntimeException(
                         "Please specify a volume that is not currently being uploaded.");
             }
-            volumeHostDao.remove(volumeHost.getId());
+            _volumeStoreDao.remove(volumeStore.getId());
             volumeDao.remove(vol.getId());
             CommandResult result = new CommandResult();
             callback.complete(result);

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/792fc471/server/src/com/cloud/api/ApiDBUtils.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/ApiDBUtils.java b/server/src/com/cloud/api/ApiDBUtils.java
index ecac9dd..df6c625 100755
--- a/server/src/com/cloud/api/ApiDBUtils.java
+++ b/server/src/com/cloud/api/ApiDBUtils.java
@@ -331,7 +331,6 @@ public class ApiDBUtils {
     static VolumeDao _volumeDao;
     static Site2SiteVpnGatewayDao _site2SiteVpnGatewayDao;
     static Site2SiteCustomerGatewayDao _site2SiteCustomerGatewayDao;
-    static VolumeHostDao _volumeHostDao;
     static DataCenterDao _zoneDao;
     static NetworkOfferingDao _networkOfferingDao;
     static NetworkDao _networkDao;
@@ -436,7 +435,6 @@ public class ApiDBUtils {
     @Inject private VolumeDao volumeDao;
     @Inject private Site2SiteVpnGatewayDao site2SiteVpnGatewayDao;
     @Inject private Site2SiteCustomerGatewayDao site2SiteCustomerGatewayDao;
-    @Inject private VolumeHostDao volumeHostDao;
     @Inject private DataCenterDao zoneDao;
     @Inject private NetworkOfferingDao networkOfferingDao;
     @Inject private NetworkDao networkDao;
@@ -539,7 +537,6 @@ public class ApiDBUtils {
         _volumeDao = volumeDao;
         _site2SiteVpnGatewayDao = site2SiteVpnGatewayDao;
         _site2SiteCustomerGatewayDao = site2SiteCustomerGatewayDao;
-        _volumeHostDao = volumeHostDao;
         _zoneDao = zoneDao;
         _securityGroupDao = securityGroupDao;
         _securityGroupJoinDao = securityGroupJoinDao;
@@ -865,10 +862,6 @@ public class ApiDBUtils {
         return template;
     }
 
-    public static VolumeHostVO findVolumeHostRef(long volumeId, long zoneId) {
-        return _volumeHostDao.findVolumeByZone(volumeId, zoneId);
-    }
-
     public static VMTemplateSwiftVO findTemplateSwiftRef(long templateId) {
         return _templateSwiftDao.findOneByTemplateId(templateId);
     }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/792fc471/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 b91c87e..ac9c6f4 100755
--- a/server/src/com/cloud/storage/StorageManagerImpl.java
+++ b/server/src/com/cloud/storage/StorageManagerImpl.java
@@ -148,7 +148,6 @@ import com.cloud.storage.dao.VMTemplatePoolDao;
 import com.cloud.storage.dao.VMTemplateS3Dao;
 import com.cloud.storage.dao.VMTemplateSwiftDao;
 import com.cloud.storage.dao.VolumeDao;
-import com.cloud.storage.dao.VolumeHostDao;
 import com.cloud.storage.listener.StoragePoolMonitor;
 import com.cloud.storage.listener.VolumeStateListener;
 import com.cloud.storage.s3.S3Manager;
@@ -235,8 +234,6 @@ public class StorageManagerImpl extends ManagerBase implements StorageManager,
C
     @Inject
     protected UserVmDao _userVmDao;
     @Inject
-    VolumeHostDao _volumeHostDao;
-    @Inject
     protected VMInstanceDao _vmInstanceDao;
     @Inject
     protected PrimaryDataStoreDao _storagePoolDao = null;
@@ -1171,15 +1168,15 @@ public class StorageManagerImpl extends ManagerBase implements StorageManager,
C
     }
 
     @DB
-    List<Long> findAllVolumeIdInSnapshotTable(Long hostId) {
-        String sql = "SELECT volume_id from snapshots WHERE sechost_id=? GROUP BY volume_id";
+    List<Long> findAllVolumeIdInSnapshotTable(Long storeId) {
+        String sql = "SELECT volume_id from snapshots, snapshot_store_ref WHERE store_id=?
GROUP BY volume_id";
         List<Long> list = new ArrayList<Long>();
         try {
             Transaction txn = Transaction.currentTxn();
             ResultSet rs = null;
             PreparedStatement pstmt = null;
             pstmt = txn.prepareAutoCloseStatement(sql);
-            pstmt.setLong(1, hostId);
+            pstmt.setLong(1, storeId);
             rs = pstmt.executeQuery();
             while (rs.next()) {
                 list.add(rs.getLong(1));
@@ -1187,7 +1184,7 @@ public class StorageManagerImpl extends ManagerBase implements StorageManager,
C
             return list;
         } catch (Exception e) {
             s_logger.debug("failed to get all volumes who has snapshots in secondary storage
"
-                    + hostId + " due to " + e.getMessage());
+                    + storeId + " due to " + e.getMessage());
             return null;
         }
 
@@ -1220,92 +1217,67 @@ public class StorageManagerImpl extends ManagerBase implements StorageManager,
C
         try {
             // Cleanup templates in secondary storage hosts
             List<DataStore> imageStores = this.dataStoreMgr.getImageStoresByScope(new
ZoneScope(null));
-             for (DataStore store : imageStores) {
+            for (DataStore store : imageStores) {
                 try {
                     long storeId = store.getId();
                     List<TemplateDataStoreVO> destroyedTemplateStoreVOs = this._templateStoreDao.listDestroyed(storeId);
-                    s_logger.debug("Secondary storage garbage collector found "
-                            + destroyedTemplateStoreVOs.size()
-                            + " templates to cleanup on secondary storage host: "
-                            + store.getName());
+                    s_logger.debug("Secondary storage garbage collector found " + destroyedTemplateStoreVOs.size()
+                            + " templates to cleanup on secondary storage host: " + store.getName());
                     for (TemplateDataStoreVO destroyedTemplateStoreVO : destroyedTemplateStoreVOs)
{
-                        if (!_tmpltMgr
-                                .templateIsDeleteable(destroyedTemplateStoreVO)) {
+                        if (!_tmpltMgr.templateIsDeleteable(destroyedTemplateStoreVO)) {
                             if (s_logger.isDebugEnabled()) {
-                                s_logger.debug("Not deleting template at: "
-                                        + destroyedTemplateStoreVO);
+                                s_logger.debug("Not deleting template at: " + destroyedTemplateStoreVO);
                             }
                             continue;
                         }
 
                         if (s_logger.isDebugEnabled()) {
-                            s_logger.debug("Deleting template store: "
-                                    + destroyedTemplateStoreVO);
+                            s_logger.debug("Deleting template store: " + destroyedTemplateStoreVO);
                         }
 
                         VMTemplateVO destroyedTemplate = this._vmTemplateDao.findById(destroyedTemplateStoreVO.getTemplateId());
-                        if ( destroyedTemplate == null ){
+                        if (destroyedTemplate == null) {
                             s_logger.error("Cannot find template : " + destroyedTemplateStoreVO.getTemplateId()
+ " from template table");
-                            throw new CloudRuntimeException("Template " + destroyedTemplateStoreVO.getTemplateId()
+ " is found in secondary storage, but not found in template table");
+                            throw new CloudRuntimeException("Template " + destroyedTemplateStoreVO.getTemplateId()
+                                    + " is found in secondary storage, but not found in template
table");
                         }
-                        String installPath = destroyedTemplateStoreVO
-                                .getInstallPath();
+                        String installPath = destroyedTemplateStoreVO.getInstallPath();
 
                         if (installPath != null) {
                             EndPoint ep = _epSelector.select(store);
-                            Command cmd = new DeleteTemplateCommand(
-                                    store.getTO(),
-                                    store.getUri(),
-                                    destroyedTemplateStoreVO
-                                            .getInstallPath(),
-                                    destroyedTemplate.getId(),
-                                    destroyedTemplate.getAccountId()
-                                    );
+                            Command cmd = new DeleteTemplateCommand(store.getTO(), store.getUri(),
destroyedTemplateStoreVO.getInstallPath(),
+                                    destroyedTemplate.getId(), destroyedTemplate.getAccountId());
                             Answer answer = ep.sendMessage(cmd);
 
                             if (answer == null || !answer.getResult()) {
-                                s_logger.debug("Failed to delete "
-                                        + destroyedTemplateStoreVO
-                                        + " due to "
-                                        + ((answer == null) ? "answer is null"
-                                                : answer.getDetails()));
+                                s_logger.debug("Failed to delete " + destroyedTemplateStoreVO
+ " due to "
+                                        + ((answer == null) ? "answer is null" : answer.getDetails()));
                             } else {
-                                _templateStoreDao
-                                        .remove(destroyedTemplateStoreVO.getId());
-                                s_logger.debug("Deleted template at: "
-                                        + destroyedTemplateStoreVO
-                                                .getInstallPath());
+                                _templateStoreDao.remove(destroyedTemplateStoreVO.getId());
+                                s_logger.debug("Deleted template at: " + destroyedTemplateStoreVO.getInstallPath());
                             }
                         } else {
-                            _templateStoreDao.remove(destroyedTemplateStoreVO
-                                    .getId());
+                            _templateStoreDao.remove(destroyedTemplateStoreVO.getId());
                         }
                     }
                 } catch (Exception e) {
-                    s_logger.warn(
-                            "problem cleaning up templates in secondary storage store "
-                                    + store.getName(), e);
+                    s_logger.warn("problem cleaning up templates in secondary storage store
" + store.getName(), e);
                 }
             }
 
-            List<HostVO> secondaryStorageHosts = _ssvmMgr
-                    .listSecondaryStorageHostsInAllZones();
             // Cleanup snapshot in secondary storage hosts
-            for (HostVO secondaryStorageHost : secondaryStorageHosts) {
+            for (DataStore store : imageStores) {
                 try {
-                    long hostId = secondaryStorageHost.getId();
-                    List<Long> vIDs = findAllVolumeIdInSnapshotTable(hostId);
+                    List<Long> vIDs = findAllVolumeIdInSnapshotTable(store.getId());
                     if (vIDs == null) {
                         continue;
                     }
                     for (Long volumeId : vIDs) {
                         boolean lock = false;
                         try {
-                            VolumeVO volume = _volsDao
-                                    .findByIdIncludingRemoved(volumeId);
+                            VolumeVO volume = _volsDao.findByIdIncludingRemoved(volumeId);
                             if (volume.getRemoved() == null) {
-                                volume = _volsDao.acquireInLockTable(volumeId,
-                                        10);
+                                volume = _volsDao.acquireInLockTable(volumeId, 10);
                                 if (volume == null) {
                                     continue;
                                 }
@@ -1315,25 +1287,18 @@ public class StorageManagerImpl extends ManagerBase implements StorageManager,
C
                             if (snapshots == null) {
                                 continue;
                             }
-                            CleanupSnapshotBackupCommand cmd = new CleanupSnapshotBackupCommand(
-                                    secondaryStorageHost.getStorageUrl(),
-                                    secondaryStorageHost.getDataCenterId(),
+                            EndPoint ep = _epSelector.select(store);
+                            CleanupSnapshotBackupCommand cmd = new CleanupSnapshotBackupCommand(store.getUri(),
store.getScope().getScopeId(),
                                     volume.getAccountId(), volumeId, snapshots);
 
-                            Answer answer = _agentMgr.sendToSecStorage(
-                                    secondaryStorageHost, cmd);
+                            Answer answer = ep.sendMessage(cmd);
                             if ((answer == null) || !answer.getResult()) {
-                                String details = "Failed to cleanup snapshots for volume
"
-                                        + volumeId
-                                        + " due to "
-                                        + (answer == null ? "null" : answer
-                                                .getDetails());
+                                String details = "Failed to cleanup snapshots for volume
" + volumeId + " due to "
+                                        + (answer == null ? "null" : answer.getDetails());
                                 s_logger.warn(details);
                             }
                         } catch (Exception e1) {
-                            s_logger.warn(
-                                    "problem cleaning up snapshots in secondary storage "
-                                            + secondaryStorageHost, e1);
+                            s_logger.warn("problem cleaning up snapshots in secondary storage
store " + store.getName(), e1);
                         } finally {
                             if (lock) {
                                 _volsDao.releaseFromLockTable(volumeId);
@@ -1341,63 +1306,41 @@ public class StorageManagerImpl extends ManagerBase implements StorageManager,
C
                         }
                     }
                 } catch (Exception e2) {
-                    s_logger.warn(
-                            "problem cleaning up snapshots in secondary storage "
-                                    + secondaryStorageHost, e2);
+                    s_logger.warn("problem cleaning up snapshots in secondary storage store
" + store.getName(), e2);
                 }
             }
 
             // CleanUp volumes on Secondary Storage.
-            for (HostVO secondaryStorageHost : secondaryStorageHosts) {
+            for (DataStore store : imageStores) {
                 try {
-                    long hostId = secondaryStorageHost.getId();
-                    List<VolumeHostVO> destroyedVolumeHostVOs = _volumeHostDao
-                            .listDestroyed(hostId);
-                    s_logger.debug("Secondary storage garbage collector found "
-                            + destroyedVolumeHostVOs.size()
-                            + " templates to cleanup on secondary storage host: "
-                            + secondaryStorageHost.getName());
-                    for (VolumeHostVO destroyedVolumeHostVO : destroyedVolumeHostVOs) {
+                    List<VolumeDataStoreVO> destroyedStoreVOs = _volumeStoreDao.listDestroyed(store.getId());
+                    s_logger.debug("Secondary storage garbage collector found " + destroyedStoreVOs.size()
+                            + " volumes to cleanup on secondary storage host: " + store.getName());
+                    for (VolumeDataStoreVO destroyedStoreVO : destroyedStoreVOs) {
                         if (s_logger.isDebugEnabled()) {
-                            s_logger.debug("Deleting volume host: "
-                                    + destroyedVolumeHostVO);
+                            s_logger.debug("Deleting volume on store: " + destroyedStoreVO);
                         }
 
-                        String installPath = destroyedVolumeHostVO
-                                .getInstallPath();
+                        String installPath = destroyedStoreVO.getInstallPath();
 
                         if (installPath != null) {
-                            Answer answer = _agentMgr.sendToSecStorage(
-                                    secondaryStorageHost,
-                                    new DeleteVolumeCommand(
-                                            secondaryStorageHost
-                                                    .getStorageUrl(),
-                                            destroyedVolumeHostVO
-                                                    .getInstallPath()));
-
+                            EndPoint ep = _epSelector.select(store);
+                            DeleteVolumeCommand cmd = new DeleteVolumeCommand(store.getUri(),
destroyedStoreVO.getInstallPath());
+                            Answer answer = ep.sendMessage(cmd);
                             if (answer == null || !answer.getResult()) {
-                                s_logger.debug("Failed to delete "
-                                        + destroyedVolumeHostVO
-                                        + " due to "
-                                        + ((answer == null) ? "answer is null"
-                                                : answer.getDetails()));
+                                s_logger.debug("Failed to delete " + destroyedStoreVO + "
due to "
+                                        + ((answer == null) ? "answer is null" : answer.getDetails()));
                             } else {
-                                _volumeHostDao.remove(destroyedVolumeHostVO
-                                        .getId());
-                                s_logger.debug("Deleted volume at: "
-                                        + destroyedVolumeHostVO
-                                                .getInstallPath());
+                                _volumeStoreDao.remove(destroyedStoreVO.getId());
+                                s_logger.debug("Deleted volume at: " + destroyedStoreVO.getInstallPath());
                             }
                         } else {
-                            _volumeHostDao
-                                    .remove(destroyedVolumeHostVO.getId());
+                            _volumeStoreDao.remove(destroyedStoreVO.getId());
                         }
                     }
 
                 } catch (Exception e2) {
-                    s_logger.warn(
-                            "problem cleaning up volumes in secondary storage "
-                                    + secondaryStorageHost, e2);
+                    s_logger.warn("problem cleaning up volumes in secondary storage store
" + store.getName(), e2);
                 }
             }
         } catch (Exception e3) {

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/792fc471/server/src/com/cloud/storage/VolumeManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/storage/VolumeManagerImpl.java b/server/src/com/cloud/storage/VolumeManagerImpl.java
index dcad55b..57241b1 100644
--- a/server/src/com/cloud/storage/VolumeManagerImpl.java
+++ b/server/src/com/cloud/storage/VolumeManagerImpl.java
@@ -61,6 +61,8 @@ import org.apache.cloudstack.storage.datastore.db.PrimaryDataStoreDao;
 import org.apache.cloudstack.storage.datastore.db.StoragePoolVO;
 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;
 
@@ -123,12 +125,10 @@ import com.cloud.storage.dao.SnapshotPolicyDao;
 import com.cloud.storage.dao.StoragePoolHostDao;
 import com.cloud.storage.dao.StoragePoolWorkDao;
 import com.cloud.storage.dao.VMTemplateDao;
-import com.cloud.storage.dao.VMTemplateHostDao;
 import com.cloud.storage.dao.VMTemplatePoolDao;
 import com.cloud.storage.dao.VMTemplateS3Dao;
 import com.cloud.storage.dao.VMTemplateSwiftDao;
 import com.cloud.storage.dao.VolumeDao;
-import com.cloud.storage.dao.VolumeHostDao;
 import com.cloud.storage.download.DownloadMonitor;
 import com.cloud.storage.s3.S3Manager;
 import com.cloud.storage.secondary.SecondaryStorageVmManager;
@@ -149,9 +149,6 @@ import com.cloud.utils.Pair;
 import com.cloud.utils.UriUtils;
 import com.cloud.utils.component.ManagerBase;
 import com.cloud.utils.db.DB;
-import com.cloud.utils.db.JoinBuilder;
-import com.cloud.utils.db.SearchBuilder;
-import com.cloud.utils.db.SearchCriteria;
 import com.cloud.utils.db.Transaction;
 import com.cloud.utils.exception.CloudRuntimeException;
 import com.cloud.utils.fsm.NoTransitionException;
@@ -233,7 +230,7 @@ public class VolumeManagerImpl extends ManagerBase implements VolumeManager
{
     @Inject
     protected UserVmDao _userVmDao;
     @Inject
-    VolumeHostDao _volumeHostDao;
+    VolumeDataStoreDao _volumeStoreDao;
     @Inject
     protected VMInstanceDao _vmInstanceDao;
     @Inject
@@ -1248,9 +1245,9 @@ public class VolumeManagerImpl extends ManagerBase implements VolumeManager
{
         }
 
         if (volume.getState() == Volume.State.UploadOp) {
-            VolumeHostVO volumeHost = _volumeHostDao.findByVolumeId(volume
+            VolumeDataStoreVO volumeStore = _volumeStoreDao.findByVolume(volume
                     .getId());
-            if (volumeHost.getDownloadState() == VMTemplateStorageResourceAssoc.Status.DOWNLOAD_IN_PROGRESS)
{
+            if (volumeStore.getDownloadState() == VMTemplateStorageResourceAssoc.Status.DOWNLOAD_IN_PROGRESS)
{
                 throw new InvalidParameterValueException(
                         "Please specify a volume that is not uploading");
             }
@@ -1424,8 +1421,8 @@ public class VolumeManagerImpl extends ManagerBase implements VolumeManager
{
     private VolumeInfo copyVolume(StoragePoolVO rootDiskPool
             , VolumeInfo volume, VMInstanceVO vm, VMTemplateVO rootDiskTmplt, DataCenterVO
dcVO,
             HostPodVO pod, DiskOfferingVO diskVO, ServiceOfferingVO svo, HypervisorType rootDiskHyperType)
throws NoTransitionException {
-        VolumeHostVO volHostVO = _volumeHostDao.findByHostVolume(volume.getDataStore().getId(),
volume.getId());
-        if (!volHostVO
+        VolumeDataStoreVO volStoreVO = _volumeStoreDao.findByStoreVolume(volume.getDataStore().getId(),
volume.getId());
+        if (!volStoreVO
                 .getFormat()
                 .getFileExtension()
                 .equals(
@@ -1433,7 +1430,7 @@ public class VolumeManagerImpl extends ManagerBase implements VolumeManager
{
                                 .getClusterId()))) {
             throw new InvalidParameterValueException(
                     "Failed to attach volume to VM since volumes format "
-                            + volHostVO.getFormat()
+                            + volStoreVO.getFormat()
                             .getFileExtension()
                             + " is not compatible with the vm hypervisor type");
         }

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/792fc471/server/src/com/cloud/storage/download/DownloadMonitorImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/storage/download/DownloadMonitorImpl.java b/server/src/com/cloud/storage/download/DownloadMonitorImpl.java
index b72c202..2afa4e6 100755
--- a/server/src/com/cloud/storage/download/DownloadMonitorImpl.java
+++ b/server/src/com/cloud/storage/download/DownloadMonitorImpl.java
@@ -96,8 +96,6 @@ public class DownloadMonitorImpl extends ManagerBase implements DownloadMonitor
     @Inject
     VolumeDao _volumeDao;
     @Inject
-    VolumeHostDao _volumeHostDao;
-    @Inject
     VolumeDataStoreDao _volumeStoreDao;
     @Inject
     AlertManager _alertMgr;
@@ -310,7 +308,7 @@ public class DownloadMonitorImpl extends ManagerBase implements DownloadMonitor
 
         VMTemplateVO tmplt = _templateDao.findById(srcTmpltStore.getTemplateId());
         HypervisorType hyperType = tmplt.getHypervisorType();
-        
+
         if (hyperType != null && hyperType == HypervisorType.KVM) {
             //return "file://" + sourceServer.getParent() + "/" + srcTmpltStore.getInstallPath();
             return "file://"  + "/" + srcTmpltStore.getInstallPath();

http://git-wip-us.apache.org/repos/asf/cloudstack/blob/792fc471/server/src/com/cloud/vm/UserVmManagerImpl.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/vm/UserVmManagerImpl.java b/server/src/com/cloud/vm/UserVmManagerImpl.java
index f1b32ed..000430f 100755
--- a/server/src/com/cloud/vm/UserVmManagerImpl.java
+++ b/server/src/com/cloud/vm/UserVmManagerImpl.java
@@ -355,8 +355,6 @@ public class UserVmManagerImpl extends ManagerBase implements UserVmManager,
Use
     @Inject
     protected ItWorkDao _workDao;
     @Inject
-    protected VolumeHostDao _volumeHostDao;
-    @Inject
     ResourceTagDao _resourceTagDao;
     @Inject
     PhysicalNetworkDao _physicalNetworkDao;


Mime
View raw message