mirror of https://github.com/apache/cloudstack.git
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:
parent
c14c736d7a
commit
789ac14c14
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue