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
This commit is contained in:
Marcus Sorensen 2013-08-06 21:34:22 -06:00
parent c14c736d7a
commit 789ac14c14
1 changed files with 3 additions and 1 deletions

View File

@ -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);