mirror of https://github.com/apache/cloudstack.git
CLOUDSTACK-2947: fix create template from snapshot, in case of mix zone-wide/cluster wide primary storage
This commit is contained in:
parent
08cee8b38e
commit
b9d4dd0ffa
|
|
@ -123,6 +123,10 @@ under the License.
|
|||
<priority value="DEBUG"/>
|
||||
</category>
|
||||
|
||||
<category name="org.apache.cloudstack">
|
||||
<priority value="DEBUG"/>
|
||||
</category>
|
||||
|
||||
<category name="com.cloud.utils.nio">
|
||||
<priority value="INFO"/>
|
||||
</category>
|
||||
|
|
|
|||
|
|
@ -399,9 +399,15 @@ public class StorageManagerImpl extends ManagerBase implements StorageManager, C
|
|||
if (pool.getStatus() != StoragePoolStatus.Up) {
|
||||
continue;
|
||||
}
|
||||
ClusterVO cluster = _clusterDao.findById(pool.getClusterId());
|
||||
if (type == cluster.getHypervisorType()) {
|
||||
retPools.add(pool);
|
||||
if (pool.getScope() == ScopeType.ZONE) {
|
||||
if (pool.getHypervisor() != null && pool.getHypervisor() == type) {
|
||||
retPools.add(pool);
|
||||
}
|
||||
} else {
|
||||
ClusterVO cluster = _clusterDao.findById(pool.getClusterId());
|
||||
if (type == cluster.getHypervisorType()) {
|
||||
retPools.add(pool);
|
||||
}
|
||||
}
|
||||
}
|
||||
Collections.shuffle(retPools);
|
||||
|
|
|
|||
Loading…
Reference in New Issue