Updated Branches:
  refs/heads/4.2 33d06d25b -> 7fced6460

Summary: CLOUDSTACK-4121 fix local storage volume deployment

Detail: Fix hypervisor type lookup for local storage volumes by
adding in a statement for the 'HOST' storage scope.

Reviewed-by: Rajesh Battala


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

Branch: refs/heads/4.2
Commit: 7fced6460f13468369550c968670c7d0b9837949
Parents: 33d06d2
Author: Marcus Sorensen <[email protected]>
Authored: Tue Aug 6 21:34:22 2013 -0600
Committer: Marcus Sorensen <[email protected]>
Committed: Tue Aug 6 21:34:22 2013 -0600

----------------------------------------------------------------------
 engine/schema/src/com/cloud/storage/dao/VolumeDaoImpl.java | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/7fced646/engine/schema/src/com/cloud/storage/dao/VolumeDaoImpl.java
----------------------------------------------------------------------
diff --git a/engine/schema/src/com/cloud/storage/dao/VolumeDaoImpl.java 
b/engine/schema/src/com/cloud/storage/dao/VolumeDaoImpl.java
index 273f7f9..efe41c9 100755
--- a/engine/schema/src/com/cloud/storage/dao/VolumeDaoImpl.java
+++ b/engine/schema/src/com/cloud/storage/dao/VolumeDaoImpl.java
@@ -242,10 +242,12 @@ public class VolumeDaoImpl extends 
GenericDaoBase<VolumeVO, Long> implements Vol
         try {
             ScopeType scope = getVolumeStoragePoolScope(volumeId);
             if (scope != null ) {
-                if (scope == ScopeType.CLUSTER)
+                if (scope == ScopeType.CLUSTER || scope == ScopeType.HOST)
                     sql = SELECT_HYPERTYPE_FROM_CLUSTER_VOLUME;
                 else if (scope == ScopeType.ZONE)
                     sql = SELECT_HYPERTYPE_FROM_ZONE_VOLUME;
+                else
+                    s_logger.error("Unhandled scope type '" + scope + "' when 
running getHypervisorType on volume id " + volumeId);
 
                 pstmt = txn.prepareAutoCloseStatement(sql);
                 pstmt.setLong(1, volumeId);

Reply via email to