From 789ac14c14fe3d37c1b49b6d0b32a6ee01f0017e Mon Sep 17 00:00:00 2001 From: Marcus Sorensen Date: Tue, 6 Aug 2013 21:34:22 -0600 Subject: [PATCH] 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 --- engine/schema/src/com/cloud/storage/dao/VolumeDaoImpl.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/engine/schema/src/com/cloud/storage/dao/VolumeDaoImpl.java b/engine/schema/src/com/cloud/storage/dao/VolumeDaoImpl.java index 273f7f94b8e..efe41c90973 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 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);